HTML::Template::Compiled::Plugin::LineBreak - HTC Plugin to replaces any newlines with <br> HTML tags.
use HTML::Template::Compiled::Plugin::LineBreak; my $htc = HTML::Template::Compiled->new( plugin => [qw(HTML::Template::Compiled::Plugin::LineBreak)], ... ); $htc->param( note => "foo1\nfoo2\n" ); $htc->output; --- <TMPL_VAR note ESCAPE=BR> # Output: # foo1<br> # foo2<br> have the same effect <TMPL_VAR note ESCAPE=LINEBREAK>
HTML::Template::Compiled::Plugin::LineBreak is a plugin for HTC, which allows you to replaces any newlines with <br> HTML tags, thus preserving the line breaks of the original text in the HTML output. This would be especially useful for multiline message.
register gets called by HTC
HTML::Template::Compiled
hagy <hagy@cpan.org>
Copyright (C) 2007 by hagy <hagy@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install HTML::Template::Compiled::Plugin::LineBreak, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Template::Compiled::Plugin::LineBreak
CPAN shell
perl -MCPAN -e shell install HTML::Template::Compiled::Plugin::LineBreak
For more information on module installation, please visit the detailed CPAN module installation guide.