diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-17 20:33:28 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-17 20:33:28 -0800 |
commit | ba510004112153622a7319559c8ca952193b3b8b (patch) | |
tree | d9831c5430cbe50d00f0693390f8d1b26764ecd9 /op.c | |
parent | c6fb3f6e3e5160581b78d87d4c62f42ef3cc0db5 (diff) | |
download | perl-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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")", |