NAME
HTML::Template::Compiled::Plugin::LineBreak - HTC Plugin to replaces any newlines with <br> HTML tags.
SYNOPSIS
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>
DESCRIPTION
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.
METHODS
register gets called by HTC
SEE ALSO
HTML::Template::Compiled
AUTHOR
hagy <hagy@cpan.org>
COPYRIGHT AND LICENSE
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.