Templa...:Stream(3pm)
π Template::Alloy::Stream β the perl 3pm page, bestie edition π
okay so you opened Template::Alloy::Stream(3pm) from the User Contributed Perl Documentation section and you're like "what is this" β don't worry, I got you. this is the page for the Stream role. it's lowkey iconic and highkey underrated. let's go π«Ά
β¨ NAME β¨
Template::Alloy::Stream β it's a Stream role, and what it does is let you play out the AST and print straight to a file handle. no buffering nonsense, just vibes β¨
πΈ DESCRIPTION πΈ
so Template::Alloy::Stream is a role that works similar to the PLAY role, except β and this is the whole point, bestie β instead of accumulating the data, it prints it as soon as it is available. like it does not wait. it does not hoard. it just sends it. main character energy fr π
- All directives are supported β every single one β except the
CLEARdirective, which is literally meaningless here. like girl, clear what? there's nothing being held. π« - Most configuration items are supported β except the
TRIMdirective. and no, it's not a bug, it's because the output is not buffered into a variable, so there's genuinely nothing to trim. can't trim what you never kept, periodt. - The
WRAPPERdirective is still supported π but heads up β it essentially turns off STREAM, because the content has to be generated before playing theWRAPPERtemplates. so the whole "print it immediately" thing? yeah, that's on pause while wrapper does its thing. the way that wrapper just takes over... π
ngl this is the tradeoff of the whole role: you get instant output, but instant output means some things (trimming, clearing) just don't have anything to work with. no cap.
π¦ ROLE METHODS π¦
β stream_tree
Similar to play_tree from the Play role β but it prints output to the screen as soon as it is ready. that's it, that's the method, and it ate π₯
π AUTHOR π
Paul Seamons <paul@seamons.com> β thank you for your service, legend π«‘π
π LICENSE π
This module may be distributed under the same terms as Perl itself. slay, that's the good license. π
and that's the whole page, bestie!! this was Template::Alloy::Stream, part of the User Contributed Perl Documentation, and it's living in perl v5.38.2, dated 2024-03-07. mwah, go stream something πβ¨π§
π¦ 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