The method it uses is to write anonymous variables, in the same way you would in Perl. The following shows some examples.
One advantage of doing it in this method is that you do not have to co-ordinate variable names between your HTML templates and Perl. You could use a simple Template Toolkit phrase like the following to get data into your HTML templates.
The variables you dump can also be of arbitrary depth and complexity, with a few limitations.
- ARRAY and HASH only
are the only things you can use in your structs. Any references or a
different underlying type will be detected and an error returned.
- No Circular References
If needed, the argument can even be a normal text string, although it wouldn't do a lot to it. :)
Returns true is a scalar is numeric, or false otherwise.
You may also access method in using an instantiated object.
Options: quote_char : Set the quote_char for stirng scalars. Default is '"'.
SECONDARY METHODSThe following are a little less general, but may be of some use.
var_scalar $name, \$scalarCreates a named variable from a scalar reference.
var_array $name, \@arrayCreates a named variable from an array reference.
var_hash $name, \%hashCreates a named variable from a hash reference.
SUPPORTBugs should be reported via the CPAN bug tracker at:
For other comments or queries, contact the author.
AUTHORAdam Kennedy <[email protected]>
COPYRIGHTCopyright 2003 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.