This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Oops. You can’t do ->op_first on a baseop.
authorFather Chrysostomos <sprout@cpan.org>
Sun, 18 Dec 2011 07:44:42 +0000 (23:44 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 18 Dec 2011 07:50:08 +0000 (23:50 -0800)
This was the fault of commit 8dc99089.

op.c

diff --git a/op.c b/op.c
index cfdf618..8fc6ea8 100644 (file)
--- a/op.c
+++ b/op.c
@@ -9689,11 +9689,12 @@ Perl_ck_substr(pTHX_ OP *o)
 OP *
 Perl_ck_tell(pTHX_ OP *o)
 {
-    OP *kid;
     PERL_ARGS_ASSERT_CK_TELL;
     o = ck_fun(o);
-    kid = cLISTOPo->op_first;
-    if (kid && kid->op_type == OP_RV2GV) kid->op_private |= OPpALLOW_FAKE;
+    if (o->op_flags & OPf_KIDS) {
+     OP *kid = cLISTOPo->op_first;
+     if (kid->op_type == OP_RV2GV) kid->op_private |= OPpALLOW_FAKE;
+    }
     return o;
 }