diff --git a/Changelog b/Changelog index 2356315..1787faf 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,18 @@ + 2.27 + - bugfix in _store, which caused warning when saving + a config containing empty hashes. Reported by + herbert breunung . + + - removed applied patch (added in 2.20), there are no more + calls to binmode(), this destroys portability, because + perls determines itself wether it uses \n or \r\n as newline. + Reported by herbert breunung too. + + - applied patch by Danial Pearce , + scalars containing a backslash as the last character will + be written out as here-doc when storing a config to disk. + + 2.26 - fixed invalid regexp in _open() which circumvented explicit empty block to work when the block statement diff --git a/General.pm b/General.pm index 62e6194..7ccbfaa 100644 --- a/General.pm +++ b/General.pm @@ -18,7 +18,7 @@ use strict; use Carp; use Exporter; -$Config::General::VERSION = "2.26"; +$Config::General::VERSION = "2.27"; use vars qw(@ISA @EXPORT); @ISA = qw(Exporter); @@ -324,7 +324,6 @@ sub _open { if (-e $configfile) { open $fh, "<$configfile" or croak "Could not open $configfile!($!)\n"; - binmode($fh); $this->_read($fh); } else { @@ -891,7 +890,7 @@ sub _store { local $_; my $indent = " " x $level; - my $config_string; + my $config_string = ""; foreach my $entry (sort keys %config) { if (ref($config{$entry}) eq "ARRAY") { @@ -927,7 +926,7 @@ sub _write_scalar { my $config_string; - if ($line =~ /\n/) { + if ($line =~ /\n/ || $line =~ /\\$/) { # it is a here doc my $delimiter; my $tmplimiter = "EOF"; @@ -1986,7 +1985,7 @@ Thomas Linden =head1 VERSION -2.26 +2.27 =cut diff --git a/README b/README index f360ccc..229646c 100644 --- a/README +++ b/README @@ -104,4 +104,4 @@ AUTHOR VERSION - 2.26 + 2.27