Templa...y::Play(3pm)
π NAME π
okay bestie, welcome to Templa...y::Play(3pm) β she's a Perl module page, from the User Contributed Perl Documentation, and her whole thing is Template::Alloy::Play, the Play role. and what does the Play role do?? it plays out the AST. iconic behaviour, honestly.
πΈ DESCRIPTION πΈ
so the Template::Alloy::Play role is the one that takes the AST your Parse role handed you and just⦠executes it directly. like, no middleman. no detour. straight vibes.
this is in contrast to Template::Alloy::Compile, which is the other girl β she takes that same AST and translates it into perl code first, and then executes the perl code. two different paths, same destination. pick your fighter. π
β¨ ROLE METHODS β¨
play_treeβ takes the AST output ofload_treeand executes it directly, no cap. you gotta pass it an AST tree and an output string reference, and all the content gets appended to that reference. here's the whole moment:
my $tree = $self->load_tree('somefile');
my $out = '';
$self->play_tree($tree, \$out);
play_*β methods with names like this are the onesexecute_treecalls to execute the parsed tree. soplay_plus literally anything, iykyk. π¦
π AUTHOR π
Paul Seamons <paul@seamons.com> β king behaviour, we love to see it. π
π LICENSE π
this module may be distributed under the same terms as Perl itself. so basically, same energy as Perl, fr fr. π
and that's the whole page, bestie!! this little beauty came from the perl v5.38.2 docs, dated 2024-03-07, and yeah β she's filed under Templa...y::Play(3pm). go forth and play that tree. πβ¨π«Ά
π¦ where this page comes from
- debian trixie: libtemplate-alloy-perl 1.022-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtemplate-alloy-perl 1.022-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtemplate-alloy-perl 1.022-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