summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerard Goossen <gerard@tty.nl>2008-03-10 16:44:03 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-03-10 21:34:23 +0000
commit27aaedc17a97efc227bf59e642a1a074461e266d (patch)
tree4abc8401278238ba808a4db7b3ebd9f7a18e55f5
parent58a97135f419acbdcb88dba507c236c50a193268 (diff)
downloadperl-27aaedc17a97efc227bf59e642a1a074461e266d.tar.gz
Re: [PATCH] MAD fix p55 $[
Message-ID: <20080310144403.GC28994@ostwald> p4raw-id: //depot/perl@33467
-rw-r--r--mad/t/p55.t8
-rw-r--r--op.c9
2 files changed, 7 insertions, 10 deletions
diff --git a/mad/t/p55.t b/mad/t/p55.t
index 770f6c567c..e1f35236a8 100644
--- a/mad/t/p55.t
+++ b/mad/t/p55.t
@@ -64,10 +64,6 @@ use Test::Differences;
our %failing = map { $_, 1 } qw|
../t/comp/require.t
-../t/op/array.t
-../t/op/local.t
-../t/op/substr.t
-
../t/comp/parser.t
../t/op/switch.t
@@ -172,10 +168,10 @@ eval { require 5.005 }
sub PerlIO::F_UTF8 () { 0x00008000 } # from perliol.h
BEGIN { PerlIO::Layer->find("encoding",1);}
########
-# TODO from ../t/op/array.t
+# from ../t/op/array.t
$[ = 1
########
-# TODO from t/comp/parser.t
+# from t/comp/parser.t
$x = 1 for ($[) = 0;
########
# from t/op/getppid.t
diff --git a/op.c b/op.c
index 8ea3fd81d4..db2a67bba7 100644
--- a/op.c
+++ b/op.c
@@ -4335,10 +4335,11 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right)
if (PL_eval_start)
PL_eval_start = 0;
else {
- /* FIXME for MAD */
- op_free(o);
- o = newSVOP(OP_CONST, 0, newSViv(CopARYBASE_get(&PL_compiling)));
- o->op_private |= OPpCONST_ARYBASE;
+ if (!PL_madskills) { /* assignment to $[ is ignored when making a mad dump */
+ op_free(o);
+ o = newSVOP(OP_CONST, 0, newSViv(CopARYBASE_get(&PL_compiling)));
+ o->op_private |= OPpCONST_ARYBASE;
+ }
}
}
return o;