26 Feb 2009 15:08:03 UTC
- Distribution: Template-Plugin-Handy
- Module version: 0.003
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (2356 / 0 / 0)
- KwaliteeBus factor: 0
- 35.71% Coverage
- License: perl_5
- Activity24 month
- Download (3.1KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionKARMAN Peter Karman
- COPYRIGHT & LICENSE
Template::Plugin::Handy - handy vmethods for Template Toolkit
[% USE Handy; mything.dump_data; mything.dump_stderr; mything.as_json; %]
Handy virtual methods I always use in my Template Toolkit files, especially for debugging.
Only new or overridden method are documented here.
Replacement for the Dumper plugin. You can call this method on any variable to see its Data::Dump representation in HTML-safe manner.
[% myvar.dump_data %]
Like dump_data but prints to STDERR instead of returning HTML-escaped string. Returns undef.
Encode the variable as a JSON string. Wrapper around the JSON->encode method. The string will be encoded as UTF-8, and the special JSON flags for converted_blessed and allow_blessed are
Increment a scalar number by one. Aliased as a scalar vmethod as 'inc'.
Decrement a scalar number by one. Aliased as a scalar vmethod as 'dec'.
Sort an array or hash ref of objects according to method_name. The sort assumes a
cmpcomparison and the return value of method_name is run through lc() first.
Returns a new sorted arrayref.
Please report any bugs or feature requests to
email@example.com, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
The Minnesota Supercomputing Institute
http://www.msi.umn.edu/sponsored the development of this software.
Copyright 2008 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Template::Plugin::Handy, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Template::Plugin::Handy
For more information on module installation, please visit the detailed CPAN module installation guide.