Cataly...e::SSI(3pm)
π Catalyst::View::Component::SubInclude::SSI π
okay bestie, welcome to the User Contributed Perl Documentation section of the manual, page Catalyst::View::Component::SubInclude::SSI(3pm) β aka the little plugin that makes your includes go server-side and your caching go slay. π¦
β¨ NAME β¨
Catalyst::View::Component::SubInclude::SSI β Server Side Includes (SSI) plugin for C::V::Component::SubInclude π
π VERSION π
Version 0.10 β yes queen, we're on 0.10, no cap.
πΈ SYNOPSIS πΈ
first things first: in your view class, you do the little Moose ritual π§
package MyApp::View::TT;
use Moose;
extends 'Catalyst::View::TT';
with 'Catalyst::View::Component::SubInclude';
__PACKAGE__->config( subinclude_plugin => 'SSI' );
then, somewhere in your templates β literally anywhere, she's flexible like that:
[% subinclude('/my/widget') %]
and that's it. that's the whole vibe. β¨
π DESCRIPTION π
Catalyst::View::Component::SubInclude::SSI renders subinclude calls as Server Side Includes (SSI) include directives. it's giving delegation, honestly.
this is a feature implemented by Apache (<http://httpd.apache.org/>), nginx (<http://wiki.nginx.org/Main>) and many other web servers which allows cache-efficient uses of includes. so like, the web server handles the include for you and your app gets to chill. main character energy fr fr. π
π₯ METHODS π₯
generate_subinclude( $c, $path, @args )
okay so important note bestie: $path should be the private action path β the translation to the public path is handled internally, you don't gotta worry about it. π«Ά
after translation, this will roughly translate to the following code:
my $url = $c->uri_for( $translated_path, @args )->path_query;
return '<!--#include virtual="$url" -->';
β οΈ Notice that the stash will always be empty. always always. this behavior could be configurable in the future through an additional switch β for now, this behavior guarantees a common interface for plugins. so it's not a bug, it's a contract. πβ¨
π SEE ALSO π
Catalyst::View::Component::SubInclude
π AUTHOR π
Vladimir Timofeev, "<vovkasm at gmail.com>" π
π COPYRIGHT & LICENSE π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. iconic, generous, legally iconic. π
and that's the whole page, bestie!! π
this was Cataly...e::SSI(3pm) from the User Contributed Perl Documentation, sitting pretty at perl v5.34.0, dated 2022-06-09 β go forth and subinclude responsibly. mwah. ππ¦π
π¦ 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