diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-03-04 20:33:44 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-03-04 20:33:44 +0000 |
commit | 722969e2558105c9a60bf5758cf8dd5f3eedca60 (patch) | |
tree | 8a1dcf7ce8f875ec05b23ec49b9180a3115ce15a /op.c | |
parent | 6cd6e77025a610090e5c95f9e958636e90f647bd (diff) | |
download | perl-722969e2558105c9a60bf5758cf8dd5f3eedca60.tar.gz |
retract 22328 and 22332: deprecation warning for my $x if foo
p4raw-id: //depot/perl@22433
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 40 |
1 files changed, 1 insertions, 39 deletions
@@ -3320,9 +3320,7 @@ Perl_newSTATEOP(pTHX_ I32 flags, char *label, OP *o) } } - o = prepend_elem(OP_LINESEQ, (OP*)cop, o); - CHECKOP(cop->op_type, cop); - return o; + return prepend_elem(OP_LINESEQ, (OP*)cop, o); } @@ -5986,42 +5984,6 @@ Perl_ck_join(pTHX_ OP *o) } OP * -Perl_ck_state(pTHX_ OP *o) -{ - /* warn on C<my $x=1 if foo;> , C<$a && my $x=1;> style statements */ - OP *kid; - o = o->op_sibling; - if (!o || o->op_type != OP_NULL || !(o->op_flags & OPf_KIDS)) - return o; - kid = cUNOPo->op_first; - if (!(kid->op_type == OP_AND || kid->op_type == OP_OR)) - return o; - kid = kUNOP->op_first->op_sibling; - if (kid->op_type == OP_SASSIGN) - kid = kBINOP->op_first->op_sibling; - else if (kid->op_type == OP_AASSIGN) - kid = kBINOP->op_first->op_sibling; - - if (kid->op_type == OP_LIST - || (kid->op_type == OP_NULL && kid->op_targ == OP_LIST)) - { - kid = kUNOP->op_first; - if (kid->op_type == OP_PUSHMARK) - kid = kid->op_sibling; - } - if ((kid->op_type == OP_PADSV || kid->op_type == OP_PADAV - || kid->op_type == OP_PADHV) - && (kid->op_private & OPpLVAL_INTRO) - && (ckWARN(WARN_DEPRECATED))) - { - Perl_warner(aTHX_ packWARN(WARN_DEPRECATED), - "Deprecated use of my() in conditional"); - } - return o; -} - - -OP * Perl_ck_subr(pTHX_ OP *o) { OP *prev = ((cUNOPo->op_first->op_sibling) |