mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
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. git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@53 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
15
Changelog
15
Changelog
@@ -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
|
2.26
|
||||||
- fixed invalid regexp in _open() which circumvented
|
- fixed invalid regexp in _open() which circumvented
|
||||||
explicit empty block to work when the block statement
|
explicit empty block to work when the block statement
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use strict;
|
|||||||
use Carp;
|
use Carp;
|
||||||
use Exporter;
|
use Exporter;
|
||||||
|
|
||||||
$Config::General::VERSION = "2.26";
|
$Config::General::VERSION = "2.27";
|
||||||
|
|
||||||
use vars qw(@ISA @EXPORT);
|
use vars qw(@ISA @EXPORT);
|
||||||
@ISA = qw(Exporter);
|
@ISA = qw(Exporter);
|
||||||
@@ -324,7 +324,6 @@ sub _open {
|
|||||||
|
|
||||||
if (-e $configfile) {
|
if (-e $configfile) {
|
||||||
open $fh, "<$configfile" or croak "Could not open $configfile!($!)\n";
|
open $fh, "<$configfile" or croak "Could not open $configfile!($!)\n";
|
||||||
binmode($fh);
|
|
||||||
$this->_read($fh);
|
$this->_read($fh);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -891,7 +890,7 @@ sub _store {
|
|||||||
local $_;
|
local $_;
|
||||||
my $indent = " " x $level;
|
my $indent = " " x $level;
|
||||||
|
|
||||||
my $config_string;
|
my $config_string = "";
|
||||||
|
|
||||||
foreach my $entry (sort keys %config) {
|
foreach my $entry (sort keys %config) {
|
||||||
if (ref($config{$entry}) eq "ARRAY") {
|
if (ref($config{$entry}) eq "ARRAY") {
|
||||||
@@ -927,7 +926,7 @@ sub _write_scalar {
|
|||||||
|
|
||||||
my $config_string;
|
my $config_string;
|
||||||
|
|
||||||
if ($line =~ /\n/) {
|
if ($line =~ /\n/ || $line =~ /\\$/) {
|
||||||
# it is a here doc
|
# it is a here doc
|
||||||
my $delimiter;
|
my $delimiter;
|
||||||
my $tmplimiter = "EOF";
|
my $tmplimiter = "EOF";
|
||||||
@@ -1986,7 +1985,7 @@ Thomas Linden <tom@daemon.de>
|
|||||||
|
|
||||||
=head1 VERSION
|
=head1 VERSION
|
||||||
|
|
||||||
2.26
|
2.27
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user