Template::Plugin::StringDump - String::Dump filter for TT
This document describes Template::Plugin::StringDump version 0.04.
Template:
[% USE StringDump %] [% SET msg = 'Ĝis! ☺' %] hex: [% msg | dump_hex %] dec: [% msg | dump_dec %] oct: [% msg | dump_oct %] bin: [% msg | dump_bin %]
Output:
hex: C4 9C 69 73 21 20 E2 98 BA dec: 196 156 105 115 33 32 226 152 186 oct: 304 234 151 163 41 40 342 230 272 bin: 11000100 10011100 1101001 1110011 100001 100000 11100010 10011000 10111010
This Template::Toolkit plugin adds five filters for dumping strings for display and debugging: dump_hex, dump_dec, dump_oct, dump_bin, and dump_names. Each octet (byte) is dumped on encoded strings and each character’s code point on decoded strings. These filters are simple wrappers around the functions of the same names from String::Dump. See that module for details.
dump_hex
dump_dec
dump_oct
dump_bin
dump_names
Nick Patch <patch@cpan.org>
© 2011–2012 Nick Patch
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Template::Plugin::StringDump, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::StringDump
CPAN shell
perl -MCPAN -e shell install Template::Plugin::StringDump
For more information on module installation, please visit the detailed CPAN module installation guide.