GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Any::Template::Backend::Text::MicroMason(3) User Contributed Perl Documentation Any::Template::Backend::Text::MicroMason(3)

Any::Template::Backend::Text::MicroMason - Any::Template backend for Text::MicroMason

        use Any::Template;
        my $template = new Any::Template(
                Backend => 'Text::MicroMason',
                Options => {
                        Attributes => {global_vars => 1},      #MicroMason %attribs
                        Mixins => [qw(-HTMLTemplate -Filters)] #Specify mixins
                },
                File => 'page.tmpl'
        );      
        my $output = $template->process($data);

Attributes may be passed to Text::MicroMason in the {Options}{Attributes} key. The {Options}{Mixins} key is used to pass mixins to Text::MicroMason.

Inputs from a file and string are provided natively by Text::MicroMason. Input from a filehandle uses the default implementation (which is to read into a string).

Output to filehandle is based on the default implementation of capturing output in a string and writing this to a filehandle, so watch out for this if your output is very large. Output to a file uses the native Text::MicroMason implementation.

Output to a coderef uses the default implementation of buffering all the output in a string and passing this to a coderef, so again beware of the memory consumption if the output is large.

Any::Template, Any::Template::Backend, Text::MicroMason

$Revision: 1.7 $ on $Date: 2006/05/08 12:28:00 $ by $Author: mattheww $

John Alden <cpan _at_ bbc _dot_ co _dot_ uk>

(c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL.

See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt

2006-05-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.