On Thu Jan 19 02:30:12 2012, ANDK wrote:
Show quoted text
This perl change exposes an existing bug in Devel::EvalContext, that can already be triggered
with older perls.
It is not quoting the value assigned to ${^WARNING_BITS}, resulting in syntax errors.
Attached is a patch to fix it.
diff -rup Devel-EvalContext-0.09-Nmwtxz/lib/Devel/EvalContext.pm Devel-EvalContext-0.09-Nmwtxz-copy/lib/Devel/EvalContext.pm
--- Devel-EvalContext-0.09-Nmwtxz/lib/Devel/EvalContext.pm 2012-01-22 18:38:04.000000000 -0800
+++ Devel-EvalContext-0.09-Nmwtxz-copy/lib/Devel/EvalContext.pm 2012-01-22 18:33:59.000000000 -0800
@@ -93,7 +93,7 @@ sub run {
# I bet I could write a PP version of this using B
my $recreate_context = qq[\n#line 1 "<recreate_context>"\n];
for my $var_name (qw($^H $^W ${^WARNING_BITS})) {
- my $val = $$cxt->{hints}{$var_name} || 0;
+ my $val = B::perlstring($$cxt->{hints}{$var_name});
$recreate_context .=
qq[BEGIN { $var_name = $val; }\n];
}