HTML::...r::Null(3pm)

πŸ’– HTML::Mason::Resolver::Null πŸ’–

okay bestie, so this is the HTML::Mason::Resolver::Null page from the User Contributed Perl Documentation (that's the 3pm manual section, iykyk), and it is literally the most chill resolver in the whole HTML::Mason family. she does NOTHING and she is thriving. πŸ’…


✨ NAME ✨

HTML::Mason::Resolver::Null β€” a do-nothing resolver 🫢


🌸 SYNOPSIS 🌸

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

that's it. that's the whole vibe. no cap. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, bestie. πŸ“

This HTML::Mason::Resolver subclass is useful if you wanna create components via the HTML::Mason::Interp->make_component method and you never plan to interact with the filesystem. like, ever. not even a little peek. πŸ™ˆ

Basically, it provides all of the necessary resolver methods but β€” plot twist β€” none of them do anything. iconic behaviour honestly. πŸ’€

This means that if you use this method, things like $interp->exec will simply not work at all. like, zero. nada. the vibe check has failed. 😭

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;

see? she's lowkey serving exactly what you need and absolutely nothing else. main character energy but make it minimal. πŸ‘‘


⚠️ bestie warning: $interp->exec is a no-go here. don't come crying to me when it doesn't work, I told you fr fr. πŸ™ˆ

and that's the whole page!! no options, no env vars, no exit statuses, no bugs, no authors, no SEE ALSO β€” just vibes. sometimes a girl just doesn't need a table of contents. periodt. πŸŽ€


mwah πŸ’‹ this page came from perl v5.38.2, dated 2024-03-05, and yes she's filed under HTML::Mason::Resolver::Null(3pm). take care of her, she's doing her best. 🫢✨

πŸ“¦ where this page comes from