HTML::Mason::Resolver::File - translates component paths into filesystem paths
my $resolver = HTML::Mason::Resolver::File->new( comp_root => '/var/www/mason' ); my $info = $resolver->get_info('/some/comp.html'); my $comp_root = $resolver->comp_root;
This HTML::Mason::Resolver subclass is used when components are stored on the filesystem, which is the norm for most Mason-based applications.
The new method takes a single mandatory parameter, comp_root. This parameter may be either a scalar or an array reference. If it is a scalar, it should be a filesystem path indicating the component root.
new
comp_root
If it is an array reference, it should be of the following form:
[ [ key1 => '/path/to/root' ], [ key2 => '/path/to/other/root' ] ]
The "keys" for each path must be unique names and their "values" must be filesystem paths. These paths will be searched in the provided order whenever a component path must be resolved to a filesystem path.
This parameter defaults to the current working directory. The ApacheHandler and CGIHandler modules default this parameter to the web server's document root.
Besides, the methods documented in the HTML::Mason::Resolver method, this class provides one additional method.
This method returns the component root, which will either be a scalar or an array reference, as documented in CONSTRUCTOR.
HTML::Mason
To install HTML::Mason, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Mason
CPAN shell
perl -MCPAN -e shell install HTML::Mason
For more information on module installation, please visit the detailed CPAN module installation guide.