HTML::Mason::Resolver::Null - a do-nothing resolver
my $resolver = HTML::Mason::Resolver::Null->new;
This HTML::Mason::Resolver subclass is useful if you want to create components via the HTML::Mason::Interp->make_component method and you never plan to interact with the filesystem.
HTML::Mason::Interp->make_component
Basically, it provides all of the necessary resolver methods but none of them do anything.
This means that if you use this method things like $interp->exec will simply not work at all.
$interp->exec
However, if you just want to make an component with an interepreter and execute it then it can be useful. For example:
my $interp = HTML::Mason::Interp->new( resolver_class => 'HTML::Mason::Resolver::Null', data_dir => '/tmp' ); my $comp = $interp->make_component( comp_source => <<'EOF' ); % my $var = 'World'; Hello, <% $var %>! EOF my $buffer; my $output = $interp->make_request( out_method => \$var )->comp($comp); print $buffer;
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.