summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-03-04 20:33:44 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-03-04 20:33:44 +0000
commit722969e2558105c9a60bf5758cf8dd5f3eedca60 (patch)
tree8a1dcf7ce8f875ec05b23ec49b9180a3115ce15a /op.c
parent6cd6e77025a610090e5c95f9e958636e90f647bd (diff)
downloadperl-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.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/op.c b/op.c
index 0c688da655..c8a74fdd10 100644
--- a/op.c
+++ b/op.c
@@ -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)