From: Steve Hay Date: Sun, 21 Feb 2010 19:41:49 +0000 (+0000) Subject: Stop pod/buildtoc from changing EOLs on Win32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2187fa1935eeeb892e1dbc1b13dce867d64c62e1;p=p5sagit%2Fp5-mst-13.2.git Stop pod/buildtoc from changing EOLs on Win32 --- diff --git a/pod/buildtoc b/pod/buildtoc index 4dd4271..12cbc94 100755 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -748,6 +748,7 @@ while (my ($target, $name) = each %Targets) { } print "Now processing $name\n" if $Verbose; open THING, $name or die "Can't open $name: $!"; + binmode THING; my @orig = ; my $orig = join '', @orig; close THING; @@ -762,6 +763,7 @@ while (my ($target, $name) = each %Targets) { } rename $name, "$name.old" or die "$0: Can't rename $name to $name.old: $!"; open THING, ">$name" or die "$0: Can't open $name for writing: $!"; + binmode THING; print THING $new or die "$0: print to $name failed: $!"; close THING or die "$0: close $name failed: $!"; }