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


Any-Template documentation  | view source Contained in the Any-Template distribution.

Index


NAME

Top

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

SYNOPSIS

Top

	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

Top

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

Top

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

VERSION

Top

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

AUTHOR

Top

John Alden <cpan _at_ bbc _dot_ co _dot_ uk>

COPYRIGHT

Top


Any-Template documentation  | view source Contained in the Any-Template distribution.