Catalyst::View(3pm)
π Catalyst::View β the manual, but make it cute π
okay so bestie, you found the Catalyst::View page, aka the base class for views in Catalyst. It lives in the User Contributed Perl Documentation corner of your system, and yes, we're reading it together. π«Ά
β¨ NAME β¨
Catalyst::View β it's the Catalyst View base class. That's the whole name. Iconic, brief, slays. π
πΈ SYNOPSIS πΈ
Here's the vibe, verbatim, no edits, no notes:
package Catalyst::View::Homebrew;
use base qw/Catalyst::View/;
sub process {
# template processing goes here.
}
Literally that's it. You subclass it, you write your own process, and the template magic goes in there. πͺ
π¦ DESCRIPTION π¦
So. This is the Catalyst View base class, and its whole purpose in life is to be used as a base class by Catalyst views. Like, it's the blueprint bestie, not the building. ποΈ
By convention (and convention is doing a LOT of heavy lifting here), views are expected to:
- read template names from
$c->stash->{template}π - put the output into
$c->res->bodyπ€
Some views will lowkey just default to rendering a template named after the dispatched action's private name. (If you wanna know what that means, go look at Catalyst::Action β it's linked in spirit, iykyk. β¨)
π METHODS π
Not me implementing the exact same methods as every other Catalyst component β because yes, that's the whole point. Go check Catalyst::Component for the full tea. π΅
π process π
gives an error message about direct use.
That's it. That's the method. It does NOT want to be called directly, bestie β it will literally just yell at you about it. Direct use = error message, periodt. π So please, subclass it and override it like a normal person. π
π AUTHORS π
Catalyst Contributors, see Catalyst.pm β the whole squad, credited as one. We love a collective moment. π«Ά
π COPYRIGHT π
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. Go wild, legally. β¨
friendly reminder from your girl: the vibe is cute but the facts are sacred β every flag, path, and warning up there is exactly as the original says it. don't come for me, come for the docs. π
mwah π This page was brought to you by perl v5.40.0, dated 2024-11-15, straight from the User Contributed Perl Documentation. Go forth and render some templates, main character. πΈπ¦πβ
π¦ 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