NAME
Template::Plugin::YAML - Plugin interface to YAML
SYNOPSIS
[% USE YAML %]
[% YAML.dump(variable) %]
[% YAML.dump_html(variable) %]
DESCRIPTION
This is a very simple Template Toolkit Plugin Interface to the YAML module. A YAML object will be instantiated via the following directive:
[% USE YAML %]
As a standard plugin, you can also specify its name in lower case:
[% USE yaml %]
METHODS
There are two methods supported by the YAML object. Each will output into the template the contents of the variables passed to the object method.
dump()
Generates a raw text dump of the data structure(s) passed
[% USE Dumper %]
[% yaml.dump(myvar) %]
[% yaml.dump(myvar, yourvar) %]
dump_html()
Generates a dump of the data structures, as per dump(), but with the characters <, > and & converted to their equivalent HTML entities, spaces converted to and newlines converted to <br>.
[% USE yaml %]
[% yaml.dump_html(myvar) %]
AUTHOR
Richard Clamp <richardc@unixbeard.net>
based on Simon Matthews' Template::Plugin::Dumper
COPYRIGHT
Copyright 2003 Richard Clamp All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.