- bugfix in _store, which caused warning when saving
	   a config containing empty hashes. Reported by 
	   herbert breunung <deirdre_skye@web.de>.

	 - 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 <danial@infoxchange.net.au>,
	   scalars containing a backslash as the last character will
	   be written out as here-doc when storing a config to disk.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@53 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2009-10-10 16:30:35 +00:00
parent d270570ecc
commit 46b032f1b6
3 changed files with 20 additions and 6 deletions

View File

@@ -1,3 +1,18 @@
2.27
- bugfix in _store, which caused warning when saving
a config containing empty hashes. Reported by
herbert breunung <deirdre_skye@web.de>.
- 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 <danial@infoxchange.net.au>,
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

View File

@@ -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 <tom@daemon.de>
=head1 VERSION
2.26
2.27
=cut

2
README
View File

@@ -104,4 +104,4 @@ AUTHOR
VERSION
2.26
2.27