Subject: | Default EOL doesn't work |
Per POD docs, the default for EOL should be $/. However, this is not
the case, as shown in this test case:
use Text::CSV;
my $scalar = '';
print "\$/ = '$/'\n";
open my $fh, ">", \$scalar;
my $CSV = Text::CSV->new();
$CSV->print($fh, [1, 2, 3]);
$CSV->print($fh, [4, 5, 6]);
close $fh;
print "\$/ = '$/'\n";
print $scalar; # output is 1,2,34,5,6
This appears to be a problem in both PP/XS versions. It will only work
if a "eol => $/" param is put into ->new().