BBC (British Broadcasting Corporation) > Any-Template-1.015 > Any::Template::Backend::Text::MicroMason

Download:
Any-Template-1.015.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.007   Source  

NAME ^

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

SYNOPSIS ^

        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);

DESCRIPTION ^

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.

SEE ALSO ^

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

VERSION ^

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

AUTHOR ^

John Alden <cpan _at_ bbc _dot_ co _dot_ uk>

COPYRIGHT ^

(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

syntax highlighting: