summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-17 20:33:28 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-17 20:33:28 -0800
commitba510004112153622a7319559c8ca952193b3b8b (patch)
treed9831c5430cbe50d00f0693390f8d1b26764ecd9 /op.c
parentc6fb3f6e3e5160581b78d87d4c62f42ef3cc0db5 (diff)
downloadperl-ba510004112153622a7319559c8ca952193b3b8b.tar.gz
Don’t crash on @a =~ // warning
This is similar to bug #106726, caused by 579333ee9e3 and fixed by c6fb3f6. This bug was caused by c6771ab63d, which had exactly the same mistake. Attempting to use find_runcv at compile time to find a variable name is not going to work in general. It only works by accident some of the time.
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/op.c b/op.c
index a1f5d25cd4..2b7bc37c7d 100644
--- a/op.c
+++ b/op.c
@@ -2535,7 +2535,9 @@ Perl_bind_match(pTHX_ I32 type, OP *left, OP *right)
&& (gv = cGVOPx_gv(cUNOPx(left)->op_first))
? varname(gv, isary ? '@' : '%', 0, NULL, 0, 1)
: NULL
- : varname(NULL, isary ? '@' : '%', left->op_targ, NULL, 0, 1);
+ : varname(
+ (GV *)PL_compcv, isary ? '@' : '%', left->op_targ, NULL, 0, 1
+ );
if (name)
Perl_warner(aTHX_ packWARN(WARN_MISC),
"Applying %s to %"SVf" will act on scalar(%"SVf")",