Cataly...equest(3pm)
β¨ NAME β¨
Catalyst::Model::Factory::PerRequest β bestie, this is the module you use to turn a plain old class into a Catalyst model, and it makes a fresh one of them for every single Catalyst request. π
π¦ SYNOPSIS π¦
okay so this one is literally the twin of Catalyst::Model::Factory, no cap. Same energy, same everything β with exactly ONE difference that changes everything: a fresh instance of your adapted class gets made once per Catalyst request, not every time you go ask for the object via $c->model. π«Ά
Once per request. Not once per ask. That's the whole vibe. π
π CUSTOMIZING π
You customize your subclass exactly like you would with Catalyst::Model::Adaptor β same rules, same flow, go off. πΈ
One tiny plot twist tho: instead of $app, you get $c β the current request context. That's your girl. She's the one showing up to the function. π
π METHODS π
Heads up, these are NOT for you to call, bestie. Catalyst calls them. You just sit there and look pretty while the framework does its thing. π
β COMPONENT
Load your class. That's it, that's the job. β¨
β ACCEPT_CONTEXT
Create an instance of your class and return it. Iconic behaviour, truly. π
π SEE ALSO π
For all the critical documentation, go read Catalyst::Model::Adaptor. Like, actually go read it, it's giving required reading. ππ₯
ngl if you skipped the Adaptor docs you're gonna be confused and that's on you, not me π«Ά
k bye bestie, this page ships with perl v5.34.0 and it was last touched on 2022-06-09 β stay slay, stay per-request, periodt. πππ¦πΈπ β¨
π¦ where this page comes from
- debian bookworm: libcatalyst-model-adaptor-perl 0.10-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-model-adaptor-perl 0.10-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-model-adaptor-perl 0.10-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-model-adaptor-perl 0.10-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-model-adaptor-perl 0.10-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