Cataly...::Petal(3pm)

πŸ“¦
version 0.03 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– 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 with base set to $c->req->base, c set to $c, and name set 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 🫑


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