Subject: | Extra \r in template output on Windows |
Even with POST_CHOMP and PRE_CHOMP set to 1, my templates come out with an extra CR character at the end of each line. This is a completely breaking bug for me, as my output LaTeX file is rendered invalid.
In 'file.template':
foo
bar
baz
qux
Perl script:
use strict;
use warnings;
use Template;
my $processor = Template->new( PRE_CHOMP => 1, POST_CHOMP => 1 );
my $output;
$processor->process('file.template', {}, \$output);
print $output;
The output is:
foo\r\r\nbar\r\r\nbaz\r\r\nqux\r\r\n
Using Template 2.24, Strawberry Perl 5.16.1, 64 bit.