/usr/share/perl5/HTML/Mason/Resolver/Null.pm is in libhtml-mason-perl 1:1.48-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | # Copyright (c) 1998-2005 by Jonathan Swartz. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
package HTML::Mason::Resolver::Null;
use strict;
use warnings;
use HTML::Mason::Resolver;
use base qw(HTML::Mason::Resolver);
sub get_info {
return;
}
sub get_source {
return;
}
sub comp_class {
return 'HTML::Mason::Component';
}
sub glob_path {
return;
}
1;
__END__
=head1 NAME
HTML::Mason::Resolver::Null - a do-nothing resolver
=head1 SYNOPSIS
my $resolver = HTML::Mason::Resolver::Null->new;
=head1 DESCRIPTION
This HTML::Mason::Resolver subclass is useful if you want to create
components via the C<< 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 C<< $interp->exec >>
will simply not work at all.
However, if you just want to make a component with an interepreter 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;
=head1 SEE ALSO
L<HTML::Mason|HTML::Mason>
=cut
|