Cataly...ntainer(3pm)
π Catalyst::ActionContainer β Catalyst Action Container π
okay bestie, so this is Catalyst::ActionContainer, and fr fr it's exactly what it sounds like: a whole container for actions. that's it. that's the vibe. π
β¨ SYNOPSIS β¨
look, we're not gonna make this weird:
See Catalyst.
that's the whole synopsis. go read Catalyst, she's the main character here, this page is literally just her side quest. π¦
πΈ DESCRIPTION πΈ
okay so this thing? it's a container for actions. and the way the dispatcher uses it is lowkey iconic β it sets up a whole tree of these bad boys to represent all the various dispatch points in your application. yes, a tree. we're being organized. we're thriving. it's giving architecture. π
π METHODS π
π new(\%data | $part)
you can call this two ways, and both are valid, no cap:
- with
{ part => $part, actions => \%actions }β full construction, everything handed over upfront, very prepared of you π - or with just a part β in which case you get an empty actions hashref that you'll be populating later via
add_action
pick your fighter. β¨
π¦ get_action($name)
returns an action from this container, based on the action name. or undef. that's it. sometimes you get the action, sometimes you get undef, that's just life bestie π
π add_action($action, [ $name ])
adds an action. and optionally you can hand over a $name to override $action->name β because sometimes the action's own name just isn't the moment, and you know better. periodt. π
π actions
accessor to the actions hashref. it contains all the actions in this container. all of them. every single one. no action left behind π«Ά
π part
accessor to the path part this container resolves to. also, fun fact, it's what the container stringifies to. so like, when you stringify it, that's the part you get. iykyk β¨
β meta
provided by Moose. don't ask, she came with the furniture π
π AUTHORS π
Catalyst Contributors, see Catalyst.pm β the whole squad, we love them, they ate π₯
πΈ COPYRIGHT πΈ
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. go wild, be free, slay π β¨
and that's the page bestie!! π this was perl v5.40.0, dated 2024-11-15, from the User Contributed Perl Documentation β mwah, ty for reading, love u, bye ππ¦πΈπ
π¦ where this page comes from
- debian trixie: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-perl 5.90132-1 Β· 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