Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

HTML::Mason::Resolver::Null

Name HTML::Mason::Resolver::Null
Version 1.59
Located at /usr/share/perl5
File /usr/share/perl5/HTML/Mason/Resolver/Null.pm
Is Core No
Search CPAN for this module HTML::Mason::Resolver::Null
Documentation HTML::Mason::Resolver::Null
Module Details HTML::Mason::Resolver::Null

NAME

HTML::Mason::Resolver::Null - a do-nothing resolver


SYNOPSIS

  my $resolver = HTML::Mason::Resolver::Null->new;


DESCRIPTION

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.

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.

However, if you just want to make a component with an interpreter and execute that component 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 $request = $interp->make_request( out_method => \$buffer, comp => $comp );
  $request->exec;
  print $buffer;

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026