fixed rt.cpan.org#56532

git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@84 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2010-06-08 06:58:32 +00:00
parent 792fb55180
commit 5f3800ba29
4 changed files with 13 additions and 4 deletions

View File

@@ -1,3 +1,10 @@
2.49
- fixed rt.cpan.org#56532, '#' missed during fix for
56370 in 2.45.
- added test case for this too
2.48
- arg, uploaded the wrong file to pause, so another version
bump up.

View File

@@ -32,7 +32,7 @@ use Carp::Heavy;
use Carp;
use Exporter;
$Config::General::VERSION = 2.48;
$Config::General::VERSION = 2.49;
use vars qw(@ISA @EXPORT_OK);
use base qw(Exporter);
@@ -1084,7 +1084,7 @@ sub _parse_value {
}
# are there any escaped characters left? put them out as is
$value =~ s/\\([\$\\\"])/$1/g;
$value =~ s/\\([\$\\\"#])/$1/g;
return $value;
}
@@ -2532,7 +2532,7 @@ Thomas Linden <tlinden |AT| cpan.org>
=head1 VERSION
2.48
2.49
=cut

View File

@@ -2,3 +2,4 @@ dollar = \$foo
backslash = contains \\ backslash
prize = 18 $
hostparam = "\"'wsh.dir'\""
bgcolor = \#fff

View File

@@ -8,7 +8,7 @@
use Data::Dumper;
use Test::More tests => 63;
use Test::More tests => 64;
#use Test::More qw(no_plan);
# ahem, we deliver the test code with a local copy of
@@ -696,6 +696,7 @@ is($hash51{dollar}, '$foo', "keep escaped dollar character");
is($hash51{backslash}, 'contains \ backslash', "keep escaped backslash character");
is($hash51{prize}, '18 $', "keep un-escaped dollar character");
is($hash51{hostparam}, q("'wsh.dir'"), "keep escaped quote character");
is($hash51{bgcolor}, '#fff', "keep escaped number sign");
# now save it to a file and re-read it in and see if everything remains escaped
$cfg51->save_file("t/cfg.51.out");