CGI-Application-Plugin-AnyTemplate
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/AnyTemplate/Driver/HTMLTemplatePluggable.pm view on Meta::CPAN
package CGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplatePluggable;
=head1 NAME
CGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplatePluggable - HTML::Template::Pluggable driver to AnyTemplate
=head1 SYNOPSIS
# Load Pluggable and your plugins before using this driver.
use HTML::Template::Pluggable;
use HTML::Template::Plugin::Dot;
=head1 DESCRIPTION
This is a driver for L<CGI::Application::Plugin::AnyTemplate>, which
provides the implementation details specific to rendering templates via
the L<HTML::Template::Pluggable> templating system.
All C<AnyTemplate> drivers are designed to be used the same way. For
general usage instructions, see the documentation of
L<CGI::Application::Plugin::AnyTemplate>.
=head1 EMBEDDED COMPONENT SYNTAX (HTML::Template::Pluggable)
=head2 Syntax
The L<HTML::Template::Pluggable> syntax for embedding components is:
<TMPL_VAR NAME="cgiapp.embed('some_run_mode', param1, param2, 'literal string3')">
This can be overridden by the following configuration variables:
embed_tag_name # default 'cgiapp'
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')">
The value of C<embed_tag_name> must consist of numbers, letters and
underscores (C<_>), and must not begin with a number.
=cut
use strict;
use Carp;
use CGI::Application::Plugin::AnyTemplate::ComponentHandler;
use CGI::Application::Plugin::AnyTemplate::Base;
use vars qw(@ISA);
@ISA = ('CGI::Application::Plugin::AnyTemplate::Base');
=head1 CONFIGURATION
The L<CGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplatePluggable> driver
accepts the following config parameters:
=over 4
=item embed_tag_name
The name of the tag used for embedding components. Defaults to
C<cgiapp>.
=item template_extension
If C<auto_add_template_extension> is true, then
L<CGI::Application::Plugin::AnyTemplate> will append the value of
C<template_extension> to C<filename>. By default
the C<template_extension> is C<.html>.
=item associate_query
B<This feature is now deprecated and will be removed in a future release.>
If this config parameter is true, then
L<CGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplatePluggable> will
copy all of the webapp's query params into the template using
( run in 0.792 second using v1.01-cache-2.11-cpan-71847e10f99 )