summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerard Goossen <gerard@tty.nl>2007-05-08 17:15:09 +0200
committerDave Mitchell <davem@fdisolutions.com>2007-05-12 22:42:09 +0000
commite9cc17ba00cc39cdcabc27d876cb322b6bbd3a59 (patch)
tree05824ef224119c8d36635c68d8a2c4b7ab18d73e
parentb6214b8055070156c0c94b1aa6eb1e157422064b (diff)
downloadperl-e9cc17ba00cc39cdcabc27d876cb322b6bbd3a59.tar.gz
Disable slurping assigned of split when PL_madskills
Message-Id: <20070508164400.GA15860@ostwald> p4raw-id: //depot/perl@31206
-rwxr-xr-xmad/Nomad.pm10
-rw-r--r--op.c6
-rw-r--r--op.h1
3 files changed, 1 insertions, 16 deletions
diff --git a/mad/Nomad.pm b/mad/Nomad.pm
index c20d8b47c0..49659a8f04 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 60537ad5f0..ba5e200a6a 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 b835f9d667..a8cd55d787 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