This class is a replacement for HTML::Mason::Resolver::File.
If you don't know anything about what the resolver does or what comp roots are,
this whole thing might make no sense.
If you really like Mason,
though,
it might be worth reading about it.
Right now.

Okay,
are you caught up?

The next thing you need to keep in mind is that the comp_roots parameter is part of the interp and not part of the resolver.
Does this seem weird to you?
Me too,
but that's how it is.

So,
let's say you had this set of comp_roots:

my_app => /usr/myapp/mason
shared => /usr/share/mason

The idea is that you can have stuff in the my_app root that specializes generalized stuff in the shared root. Unfortunately, it's not really very useful. You can't have foo in the first comp root inherit from foo in the second. You can't easily take an existing set of templates and specialize them with an overlay.

That is the problem that this resolver is meant to solve. Instead of having the resolver try to find each path in each comp root independenly, the comp_roots are instead stored in the resolver's resolver_roots. When looking for a path, it looks in each root in turn. When it finds one, it returns that. If there's another one in one of the later paths, the one that was found will automatically be made to inherit from it and (by default) to call it by default.

Because you don't want the interp object to confuse things with comp roots, you must signal that you know that its comp roots will be ignored by setting comp_root to "/-".