
interchange-cvs at icdevgroup
Apr 25, 2012, 10:49 PM
Post #1 of 1
(186 views)
Permalink
|
|
[interchange] Fix bug where hash keys are not properly escaped in uneval.
|
|
commit 67cc2df5449f61b0b7ae20910ece09c8101e8e87 Author: Peter Ajamian <peter [at] pajamian> Date: Thu Apr 26 17:47:22 2012 +1200 Fix bug where hash keys are not properly escaped in uneval. Fix bug where hash keys don't get properly escaped in uneval resulting in code that fails when an eval or reval attempt is made. lib/Vend/Util.pm | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) --- diff --git a/lib/Vend/Util.pm b/lib/Vend/Util.pm index ce76ad9..353dc80 100644 --- a/lib/Vend/Util.pm +++ b/lib/Vend/Util.pm @@ -655,6 +655,7 @@ sub uneval_it { } elsif ($r eq 'HASH') { $s = "{"; while (($key, $value) = each %$o) { + $key =~ s/(['\\])/\\$1/g; $s .= "'$key' => " . uneval_it($value) . ","; } $s .= "}"; _______________________________________________ interchange-cvs mailing list interchange-cvs [at] icdevgroup http://www.icdevgroup.org/mailman/listinfo/interchange-cvs
|