GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTML::Mason::Resolver::Null(3) User Contributed Perl Documentation HTML::Mason::Resolver::Null(3)

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.

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;
2020-05-16 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.