Cataly...Request(3pm)
π Cataly...Request(3pm) π
User Contributed Perl Documentation β yes bestie, you read that right, this is the SubRequest plugin for C::V::Component::SubInclude, and we're gonna walk through it together π«Ά
β¨ NAME β¨
Catalyst::View::Component::SubInclude::SubRequest β the sub-requests plugin for C::V::Component::SubInclude. it's giving "I render your subincludes by asking Catalyst nicely" π
πΈ VERSION πΈ
Version 0.07_03
π SYNOPSIS π
okay so first, in your application class:
package MyApp;
use Catalyst qw/
ConfigLoader
Static::Simple
...
SubRequest
/;
then in your view class:
package MyApp::View::TT;
use Moose;
extends 'Catalyst::View::TT';
with 'Catalyst::View::Component::SubInclude';
__PACKAGE__->config( subinclude_plugin => 'SubRequest' );
and then, somewhere in your templates:
[% subinclude('/my/widget') %]
and that's it, that's the whole vibe β¨
π¦ DESCRIPTION π¦
"Catalyst::View::Component::SubInclude::SubRequest" uses Catalyst sub-requests to render the subinclude contents. no cap, that's literally the whole job π«‘
it requires Catalyst::Plugin::SubRequest. so like, go get that one first, it's a hard requirement, not a suggestion π
π METHODS π
π "generate_subinclude( $c, $path, @args )" π
this will make a sub-request call to the action specified by $path. and listen β $path should be the private action path. the translation to the public path is handled internally, so don't you dare do it yourself, she's got it π
so, after path translation, the call will be (roughly) equivalent to:
$c->sub_request( $translated_path, {}, @args );
β οΈ notice that the stash will always be empty. like, always. zero. nada. this behavior could be configurable in the future through an additional switch β but for now, this behavior guarantees a common interface for all plugins. so it's a feature, not a bug, okay? π
π SEE ALSO π
Catalyst::View::Component::SubIncludeCatalyst::Plugin::SubRequest
go read those too, they're iconic, iykyk π§
β AUTHOR β
Nilson Santos Figueiredo Junior, "<nilsonsfj at cpan.org>" β ty for your service king π
π SPONSORSHIP π
Development sponsored by Ionzero LLC <http://www.ionzero.com/>. funding the arts, we love to see it π
π COPYRIGHT & LICENSE π
Copyright (C) 2009 Nilson Santos Figueiredo Junior.
Copyright (C) 2009 Ionzero LLC.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's a wrap, bestie!! this page came to you from perl v5.34.0, dated 2022-06-09, filed under Cataly...Request(3pm) in the User Contributed Perl Documentation section π
β¨ mwah, go build something cute π¦π
π¦ where this page comes from
- debian bookworm: libcatalyst-view-component-subinclude-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-view-component-subinclude-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-view-component-subinclude-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-view-component-subinclude-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-view-component-subinclude-perl 0.10-4 Β· 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