1HTML::Mason::Resolver::UNsuelrl(C3o)ntributed Perl DocumHeTnMtLa:t:iMoanson::Resolver::Null(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

12       This HTML::Mason::Resolver subclass is useful if you want to create
13       components via the "HTML::Mason::Interp->make_component" method and you
14       never plan to interact with the filesystem.
15
16       Basically, it provides all of the necessary resolver methods but none
17       of them do anything.
18
19       This means that if you use this method things like "$interp->exec" will
20       simply not work at all.
21
22       However, if you just want to make a component with an interpreter and
23       execute that component it can be useful.  For example:
24
25         my $interp = HTML::Mason::Interp->new( resolver_class => 'HTML::Mason::Resolver::Null',
26                                                data_dir => '/tmp' );
27
28         my $comp = $interp->make_component( comp_source => <<'EOF' );
29       % my $var = 'World';
30       Hello, <% $var %>!
31       EOF
32
33         my $buffer;
34         my $request = $interp->make_request( out_method => \$buffer, comp => $comp );
35         $request->exec;
36
37         print $buffer;
38
39
40
41perl v5.30.0                      2019-07-26    HTML::Mason::Resolver::Null(3)
Impressum