Cataly...::Petal(3pm)
π NAME π
Catalyst::View::Petal β the Petal View Class, bestie. It's giving "your views, but with petals" πΈ
β¨ SYNOPSIS β¨
okay so first you grab the helper and let it do its little thing:
# use the helper
create.pl view Petal Petal
then your view class shows up in lib/MyApp/View/Petal.pm looking all cute like:
# lib/MyApp/View/Petal.pm
package MyApp::View::Petal;
use base 'Catalyst::View::Petal';
__PACKAGE__->config(
input => 'XML',
output => 'XML',
error_on_undef_var => 0
);
1;
and then, like, maybe inside an end action, you send it:
# Meanwhile, maybe in an 'end' action
$c->forward('MyApp::View::Petal');
slay π
π¦ DESCRIPTION π¦
This is the "Petal" view class, no cap. Your subclass should inherit from this class β that's literally the whole vibe, iykyk. π«Ά
πΈ METHODS πΈ
processβ Renders the template specified in$c->stash->{template}or$c->request->match. The template variables get set up from the contents of$c->stash, and they're augmented withbaseset to$c->req->base,cset to$c, andnameset to$c->config->{name}. Then the output is stored in$c->response->body. It's giving main character energy, fr fr β¨configβ This lets your view subclass pass additional settings along to the Petal config hash. So extra options? Yes ma'am, go off π
π SEE ALSO π
Petal, Catalyst, Catalyst::Base. Go read those too, they're iconic π
π AUTHOR π
Christian Hansen, ch@ngmedia.com β shoutout to the legend π«‘
π COPYRIGHT π
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. So like, go wild but keep it legal bestie π
okay so this was written up by perl v5.32.0 on 2021-01-05, and the page is Cataly...::Petal(3pm) β mwah, that's a wrap πΈβ¨π
π¦ where this page comes from
- debian bookworm: libcatalyst-view-petal-perl 0.03-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-view-petal-perl 0.03-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libcatalyst-view-petal-perl 0.03-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-view-petal-perl 0.03-1.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