Skip Menu |

This queue is for tickets about the File-LocalizeNewlines CPAN distribution.

Report information
The Basics
Id: 45176
Status: new
Priority: 0/
Queue: File-LocalizeNewlines

People
Owner: Nobody in particular
Requestors: dhorne [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.10
Fixed in: (no value)



Subject: Localizing a file saves the orginal content, not the localized version
The _localize_file method reads in a file, creates a localised copy with fied newlines and then writes the orginal rather than the localised copy back out. Attached is a patch to fix this.
Subject: localised.patch
--- /usr/local/lib/perl5/site_perl/5.10.0/File/LocalizeNewlines.pm 2008-07-10 19:25:33.000000000 +1200 +++ /usr/local/lib/perl5/site_perl/5.10.0/File/LocalizeNewlines.pm.new 2009-04-21 14:21:19.000000000 +1200 @@ -265,7 +265,7 @@ return 0 if $content eq $localized; # Save the localised version - File::Slurp::write_file( $file, $content ) or return undef; + File::Slurp::write_file( $file, $localized ) or return undef; $self->_message( "Localized $file\n" ) unless ref $file; 1;