The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Template::Parser::LocalizeNewlines - Drop-in replacement Template::Parser that fixes bad newlines

DESCRIPTION

Template::Parser has a problem with PRE_CHOMP and related options. They only work on local newlines. If a Template Toolkit instance on a Unix host encounters DOS newlines in a Template, it will fail to chomp the newline correctly, with potentially disasterous results.

Template::Parser::LocalizeNewlines is a drop-in replacement that behaves EXACTLY the same (and is a subclass of) as a normal parser, except that before it goes to parse the template content, it applies the newline localisation regex describes in http://ali.as/devel/newlines.html.

Using this Module

When creating your Template instance, simple pass an instance of this object along to the constructor.

METHODS

This module is identical to Template::Parser.

SUPPORT

Bugs should be reported via the following link.

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Template-Parser-LocalizeNewlines

For other issues, contact the author.

AUTHOR

Adam Kennedy <adamk@cpan.org>

COPYRIGHT

Copyright 2004 - 2008 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.