MasonX::Resolver::ExtendedCompRoot - Extend functionality of HTML::Mason::Resolver::File to allow specific comp_roots to be called
HTML::Mason::Resolver::File
In your httpd.conf file:
PerlSetVar MasonResolverClass MasonX::Resolver::ExtendedCompRoot
Or when creating an ApacheHandler object:
my $ah = HTML::Mason::ApacheHandler->new ( resolver_class => 'MasonX::Resolver::ExtendedCompRoot', );
Or when using Mason in standalone mode:
my $resolver = MasonX::Resolver::ExtendedCompRoot->new( comp_root => '/var/www/mason' ); my $info = $resolver->get_info('/some/comp.html');
This subclass of HTML::Mason::Resolver::File, the basic default Mason resolver, enables calls to specific component roots to be made, eg.
<& comp_root_name=>path/to/comp &>
It is dependent on MasonX::Request::ExtendedCompRoot - otherwise its behaviour is identical to that of HTML::Mason::Resolver::File.
MasonX::Request::ExtendedCompRoot
To use this module you need to tell Mason to use this class for its resolver and MasonX::Request::ExtendedCompRoot for requests. This can be done in two ways. If you are configuring Mason via your httpd.conf file, simply add this:
PerlSetVar MasonRequestClass MasonX::Request::ExtendedCompRoot PerlSetVar MasonResolverClass MasonX::Resolver::ExtendedCompRoot
If you are using a handler.pl file, simply add this parameter to the parameters given to the ApacheHandler constructor:
request_class => 'MasonX::Request::ExtendedCompRoot' resolver_class => 'MasonX::Resolver::ExtendedCompRoot'
HTML::Mason
No known bugs.
0.03
HTML::Mason::Resolver::File, MasonX::Request::ExtendedCompRoot, MasonX::Request::ExtendedCompRoot::WithApacheSession
Alex Robinson, <cpan[@]alex.cloudband.com>
MasonX::Resolver::ExtendedCompRoot is free software and can be used under the same terms as Perl, i.e. either the GNU Public Licence or the Artistic License.
To install MasonX::Request::ExtendedCompRoot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MasonX::Request::ExtendedCompRoot
CPAN shell
perl -MCPAN -e shell install MasonX::Request::ExtendedCompRoot
For more information on module installation, please visit the detailed CPAN module installation guide.