Cataly...e::ESI(3pm)
π Cataly...e::ESI(3pm) π
okay bestie, so this is a page from the User Contributed Perl Documentation collection β yes that whole vibe β and it's all about Catalyst::View::Component::SubInclude::ESI. Let's get into it π¦
β¨ NAME β¨
Catalyst::View::Component::SubInclude::ESI β it's the Edge Side Includes (ESI) plugin for C::V::Component::SubInclude. that's the whole thing, that's the name, slay π
πΈ VERSION πΈ
Version 0.07_03 β yeah it's got that underscore, that's a dev release vibe, no cap.
π SYNOPSIS π
first up, in your view class, you're gonna do this:
package MyApp::View::TT;
use Moose;
extends 'Catalyst::View::TT';
with 'Catalyst::View::Component::SubInclude';
__PACKAGE__->config( subinclude_plugin => 'ESI' );
and then, somewhere in your templates, literally just:
[% subinclude('/my/widget') %]
that's it. that's the whole ritual. iconic β¨
π¦ DESCRIPTION π¦
so "Catalyst::View::Component::SubInclude::ESI" takes your subinclude calls and renders them as Edge Side Includes (ESI) include directives. this is a feature that Varnish implements (<http://varnish.projects.linpro.no/>) and it lets you do cache-efficient uses of includes. cache-efficient!! we love a performance moment π₯
π METHODS π
π generate_subinclude( $c, $path, @args ) π
heads up bestie: $path should be the private action path β the translation to the public path is handled internally, don't you worry about it, the module's got you π«Ά
after translation, this roughly translates to the following code:
my $url = $c->uri_for( $translated_path, @args )->path_query;
return '<!--esi <esi:include src="$url" /> -->';
β οΈ also important: the stash will always be empty. like, always. this behavior could be configurable in the future through an additional switch β for now though, this behavior guarantees a common interface for plugins. so it's a feature not a bug, periodt π
π SEE ALSO π
go peek at these when you're done here:
Catalyst::View::Component::SubInclude- <http://www.catalystframework.org/calendar/2008/17>
- <http://varnish.projects.linpro.no/>
π«Ά AUTHOR π«Ά
Nilson Santos Figueiredo Junior, "<nilsonsfj at cpan.org>" β the main character who made this happen, we stan π
πΈ SPONSORSHIP πΈ
Development sponsored by Ionzero LLC <http://www.ionzero.com/>. thank you for funding the arts πβ¨
π 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 the whole page, bestie β you ate that π
this was brought to you by perl v5.34.0, dated 2022-06-09, straight out of Cataly...e::ESI(3pm). 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