Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

text::micromason::quicktemplate(3pm) [debian man page]

MicroMason::QuickTemplate(3pm)				User Contributed Perl Documentation			    MicroMason::QuickTemplate(3pm)

NAME
Text::MicroMason::QuickTemplate - Alternate Syntax like Text::QuickTemplate SYNOPSIS
Instead of using this class directly, pass its name to be mixed in: use Text::MicroMason; my $mason = Text::MicroMason::Base->new( -QuickTemplate ); Use the standard compile and execute methods to parse and evalute templates: print $mason->compile( text=>$template )->( @%args ); print $mason->execute( text=>$template, @args ); Or use Text::QuickTemplate's calling conventions: $template = Text::MicroMason->new( -HTMLTemplate, text=>'simple.tmpl' ); print $template->fill( %arguments ); Text::QuickTemplate provides a syntax to embed values into a text template: Good {{timeofday}}, {{name}}! DESCRIPTION
This mixin class overrides several methods to allow MicroMason to emulate the template syntax and some of the other features of Text::QuickTemplate. This class automatically includes the following other mixins: TemplateDir, HasParams, and StoreOne. Compatibility with Text::QuickTemplate This is not a drop-in replacement for Text::QuickTemplate, as the implementation is quite different, but it should be able to process most existing templates without major changes. The following features of EmbPerl syntax are supported: o Curly bracketed tags with parameter names. o Array of parameters hashes. o Special $DONTSET variable. SEE ALSO
The interface being emulated is described in Text::QuickTemplate. For an overview of this templating framework, see Text::MicroMason. This is a mixin class intended for use with Text::MicroMason::Base. For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe. perl v5.10.1 2007-01-29 MicroMason::QuickTemplate(3pm)

Check Out this Related Man Page

MicroMason::AllowGlobals(3pm)				User Contributed Perl Documentation			     MicroMason::AllowGlobals(3pm)

NAME
Text::MicroMason::AllowGlobals - Share package vars between templates SYNOPSIS
Instead of using this class directly, pass its name to be mixed in: use Text::MicroMason; my $mason = Text::MicroMason->new( -AllowGlobals ); Share package variables: $mason->set_globals( '$name' => 'Bob' ); Use the standard compile and execute methods to parse and evalute templates: print $mason->compile( text=>$template )->(); print $mason->execute( text=>$template ); Then, in a template, you can refer to those globals: Welcome, <% $name %>! DESCRIPTION
Public Methods set_globals() Accepts a list of pairs of global variable names and corresponding values. Adds each variable name to the allowed list and sets it to the initial value. allow_globals() Gets or sets the variables names to be allowed. If called with arguments, adds them to the list. Returns the variables to be allowed as a list, or as a space-separated string in scalar context. Supported Attributes allow_globals Optional array or space-separated string of global variable names to be allowed. Private Methods assemble() Adds the allow_globals_statement to each token stream before assembling it. allow_globals_statement() This method prepends the "use vars" statement needed for the template subroutines to compile. SEE ALSO
For an overview of this templating framework, see Text::MicroMason. This is a mixin class intended for use with Text::MicroMason::HTMLMason. For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe. perl v5.10.1 2007-01-29 MicroMason::AllowGlobals(3pm)
Man Page