From 5f3800ba29964ce55abb7f8e3829a1c8115852d9 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Tue, 8 Jun 2010 06:58:32 +0000 Subject: [PATCH] fixed rt.cpan.org#56532 git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@84 be1acefe-a474-0410-9a34-9b3221f2030f --- Changelog | 7 +++++++ General.pm | 6 +++--- t/cfg.51 | 1 + t/run.t | 3 ++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 2d5c21e..a403025 100644 --- a/Changelog +++ b/Changelog @@ -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. diff --git a/General.pm b/General.pm index 1f940cc..896d06a 100644 --- a/General.pm +++ b/General.pm @@ -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 =head1 VERSION -2.48 +2.49 =cut diff --git a/t/cfg.51 b/t/cfg.51 index 6971360..16462e2 100644 --- a/t/cfg.51 +++ b/t/cfg.51 @@ -2,3 +2,4 @@ dollar = \$foo backslash = contains \\ backslash prize = 18 $ hostparam = "\"'wsh.dir'\"" +bgcolor = \#fff diff --git a/t/run.t b/t/run.t index d7523a5..399df82 100644 --- a/t/run.t +++ b/t/run.t @@ -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");