Template::Plugin::Filter::String::Truncate - String::Truncate filter for Template::Toolkit
version 0.03
[% USE Filter.String.Truncate %] # right side elide [% 'This is your brain' | elide(16) %] This is your ... # left side elide [% 'This is your brain' | elide(16, truncate => 'left') %] ...is your brain # middle elide [% 'This is your brain' | elide(16, truncate => 'middle') %] This is... brain # block syntax [% FILTER elide(16) -%] This is your brain [%- END %] THis is your ...
This module is a Template Toolkit filter, which uses String::Truncate to truncate strings.
String::Truncate
The development version is on github at http://github.com/mschout/template-plugin-filter-string-truncate and may be cloned from git://github.com/mschout/template-plugin-filter-string-truncate.git
Please report any bugs or feature requests to bug-template-plugin-filter-string-truncate@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=Template-Plugin-Filter-String-Truncate
Michael Schout <mschout@cpan.org>
This software is copyright (c) 2010 by Michael Schout.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Template::Plugin::Filter::String::Truncate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::Filter::String::Truncate
CPAN shell
perl -MCPAN -e shell install Template::Plugin::Filter::String::Truncate
For more information on module installation, please visit the detailed CPAN module installation guide.