HTML::...Classic(3pm)
β¨ NAME β¨
HTML::Template::Compiled::Classic β bestie, this one gives you the classic functionality, exactly like HTML::Template π
πΈ SYNOPSIS πΈ
use HTML::Template::Compiled::Classic compatible => 1;
my $htcc = HTML::Template::Compiled::Classic->new(
# usual parameters for HTML::Template::Compiled
);
okay so literally just that. the compatible => 1 is the moment, iykyk π
π¦ DESCRIPTION π¦
so this class hands you the features that can't coexist with the regular HTML::Template::Compiled features. like, you gotta pick a lane, bestie. here's the tea:
π dots in TMPL_VARs
if you wanna use
<TMPL_VAR NAME="some.var.with.dots">
then you cannot use the dot-feature
<TMPL_VAR NAME="some.hash.keys">
at the same time. nope. it's giving "one or the other", fr fr π
π«Ά Subref variables
in HTML::Template, this works:
my $ht = HTML::Template->new(
scalarref => \"<TMPL_VAR foo>",
);
$ht->param(foo => sub { return "bar" });
print $ht->output; # prints 'bar'
this doesn't work in HTML::Template::Compiled tho. and listen β in the past it did, but as of HTC version 0.70 it won't any more. sorry bestie, they really said "no π"
π METHODS π
compiler_classβ returnsHTML::Template::Compiled::Compiler::Classic. that's it, that's the whole method, slay β¨validate_varβ gets the var name (parsed out of"NAME="foo.bar"") and returns if the string is a valid var name. vibe check on your variable names, basically π
π SEE ALSO π
ngl there's nothing else listed here, so go forth and template, my love πΈ
that's the whole page, babe β perl v5.36.0, dated 2022-11-19, from the HTML::...Classic(3pm) era of User Contributed Perl Documentation. iconic, no cap π
β¨
π¦ where this page comes from
- debian bookworm: libhtml-template-compiled-perl 1.003-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhtml-template-compiled-perl 1.003-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-template-compiled-perl 1.003-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-template-compiled-perl 1.003-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhtml-template-compiled-perl 1.003-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms