From: Gerard Goossen Date: Tue, 8 May 2007 15:15:09 +0000 (+0200) Subject: Disable slurping assigned of split when PL_madskills X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e9cc17ba00cc39cdcabc27d876cb322b6bbd3a59;p=p5sagit%2Fp5-mst-13.2.git Disable slurping assigned of split when PL_madskills Message-Id: <20070508164400.GA15860@ostwald> p4raw-id: //depot/perl@31206 --- diff --git a/mad/Nomad.pm b/mad/Nomad.pm index c20d8b4..49659a8 100755 --- a/mad/Nomad.pm +++ b/mad/Nomad.pm @@ -2199,16 +2199,6 @@ sub ast { package PLXML::op_unpack; package PLXML::op_pack; package PLXML::op_split; - -sub ast { - my $self = shift; - my $results = $self->SUPER::ast(@_); - if (my @dest = $self->madness('R')) { - return PLXML::op_aassign->newtype->new(Kids => [@dest, $self->madness('ox'), $results]); - } - return $results; -} - package PLXML::op_join; package PLXML::op_list; diff --git a/op.c b/op.c index 60537ad..ba5e200 100644 --- a/op.c +++ b/op.c @@ -4073,7 +4073,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right) o->op_private |= OPpASSIGN_COMMON; } - if (right && right->op_type == OP_SPLIT) { + if (right && right->op_type == OP_SPLIT && !PL_madskills) { OP* tmpop = ((LISTOP*)right)->op_first; if (tmpop && (tmpop->op_type == OP_PUSHRE)) { PMOP * const pm = (PMOP*)tmpop; @@ -4103,11 +4103,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right) tmpop = ((UNOP*)tmpop)->op_first; /* to pushmark */ tmpop->op_sibling = NULL; /* don't free split */ right->op_next = tmpop->op_next; /* fix starting loc */ -#ifdef PERL_MAD - op_getmad(o,right,'R'); /* blow off assign */ -#else op_free(o); /* blow off assign */ -#endif right->op_flags &= ~OPf_WANT; /* "I don't know and I don't care." */ return right; diff --git a/op.h b/op.h index b835f9d..a8cd55d 100644 --- a/op.h +++ b/op.h @@ -712,7 +712,6 @@ struct token { * Q optimized qw// * r expression producing R * R tr/E/R/ s/E/R/ - * R assign slurped by split * s sub signature * S use import stub (no import) * S retired sort block