Skip to content

Commit

Permalink
ensure Document->save does not mangle newlines on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wchristian committed Apr 23, 2016
1 parent 2a888ea commit bdb491a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/PPI/Document.pm
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ sub save {
my $self = shift;
local *FILE;
open( FILE, '>', $_[0] ) or return undef;
binmode FILE;
print FILE $self->serialize or return undef;
close FILE or return undef;
return 1;
Expand Down

0 comments on commit bdb491a

Please sign in to comment.