CGI::A...ggable(3pm)
π NAME π
CGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplatePluggable β bestie, it's the HTML::Template::Pluggable driver for AnyTemplate. That's it, that's the girl. π
(and yes, the page header says CGI::A...ggable(3pm), because even perl's manpage formatter gets tired and abbreviates. iconic behavior honestly.)
β¨ SYNOPSIS β¨
# Load Pluggable and your plugins before using this driver.
use HTML::Template::Pluggable;
use HTML::Template::Plugin::Dot;
okay so read that comment, fr fr. Load Pluggable and your plugins BEFORE you touch this driver. Order matters, no cap. π
π¦ DESCRIPTION π¦
This is a driver for CGI::Application::Plugin::AnyTemplate, and its whole job is holding the implementation details that are specific to rendering templates through the HTML::Template::Pluggable templating system. Very niche, very demure. β¨
The way that all the AnyTemplate drivers work is literally the same, bestie β they're designed to be used identically. So for the general how-do-I-even-use-this instructions, go read the docs of CGI::Application::Plugin::AnyTemplate. This page is just the Pluggable-specific tea. π
πΈ EMBEDDED COMPONENT SYNTAX (HTML::Template::Pluggable) πΈ
π Syntax π
The HTML::Template::Pluggable syntax for embedding components is, and I need you to look at this carefully:
<TMPL_VAR NAME="cgiapp.embed('some_run_mode',
param1,
param2,
'literal string3')"
>
Look at her go. π
This can be overridden by the following configuration variables:
embed_tag_name # default 'cgiapp'
So for instance, by setting the following value in your configuration file:
embed_tag_name '__acme'
Then the embedded component tag will look like:
<TMPL_VAR NAME="__acme.embed('some_run_mode')">
β οΈ and here's the rules bit: the value of embed_tag_name must consist of numbers, letters and underscores (_), and must not begin with a number. Don't try it. It's giving invalid tag name energy and it will not slay. π
π CONFIGURATION π
The HTMLTemplatePluggable driver accepts the following config parameters, bestie, take notes:
embed_tag_nameβ the name of the tag used for embedding components. Defaults tocgiapp.template_extensionβ ifauto_add_template_extensionis true, then CGI::Application::Plugin::AnyTemplate will append the value oftemplate_extensiontofilename. By default thetemplate_extensionis.html. πassociate_queryβ π¨ this feature is now deprecated and will be removed in a future release. π¨
If this config parameter is true, then HTMLTemplatePluggable will copy all of the webapp's query params into the template using HTML::Template's associate mechanism:
my $driver = HTML::Template::Pluggable->new(
associate => $self->query,
);
By default associate_query is false.
And heads up: if you provide an associate config parameter of your own, that will disable the associate_query functionality. Yours wins, periodt.
All other configuration parameters are passed on unchanged to HTML::Template. Unchanged. Not touched. Straight through. π«
π required_modules π
The required_modules function returns the modules required for this driver to operate. In this case: HTML::Template. Short list, we love a low-maintenance queen. π
π DRIVER METHODS π
initializeβ initializes theHTMLTemplatedriver. See the docs forCGI::Application::Plugin::AnyTemplate::Basefor details. β¨render_templateβ fills theHTML::Template::Pluggableobject with$self->param, replacing any magic*embed*tags with the content generated by the appropriate runmodes.
Returns the output of the filled template as a string reference. (a string reference, bestie, not a plain string β don't get got. π«Ά)
See the docs for CGI::Application::Plugin::AnyTemplate::Base for details.
π§ SEE ALSO π§
CGI::Application::Plugin::AnyTemplateCGI::Application::Plugin::AnyTemplate::BaseCGI::Application::Plugin::AnyTemplate::ComponentHandlerCGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplateCGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplateExprCGI::Application::Plugin::AnyTemplate::Driver::TemplateToolkitCGI::Application::Plugin::AnyTemplate::Driver::PetalCGI::ApplicationTemplate::ToolkitHTML::TemplateHTML::Template::PluggableHTML::Template::Plugin::DotPetalExporter::RenamingCGI::Application::Plugin::TT
like... that's a whole friend group right there. go say hi. π
π AUTHOR π
Michael Graham, "<mgraham@cpan.org>" β thank you for your service, king. π«‘
π COPYRIGHT & LICENSE π
Copyright 2005 Michael Graham, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
legally binding but make it cute. same terms as Perl itself, bestie. π
and that's the whole page! π this gorgeous thing comes to you from perl v5.30.3, dated 2020-10-26, filed under User Contributed Perl Documentation, and the header/footer both just call it CGI::A...ggable(3pm) because it was too long for the margin. she's abbreviating, she's iconic, she ate. bye bestie!! π β¨π¦
π¦ where this page comes from
- debian bookworm: libcgi-application-plugin-anytemplate-perl 0.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcgi-application-plugin-anytemplate-perl 0.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libcgi-application-plugin-anytemplate-perl 0.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcgi-application-plugin-anytemplate-perl 0.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcgi-application-plugin-anytemplate-perl 0.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcgi-application-plugin-anytemplate-perl 0.18-3 Β· 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