Revert "Make scalar() propagate lvalueness"
authorFather Chrysostomos <sprout@cpan.org>
Sun, 18 Dec 2011 18:43:51 +0000 (10:43 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 18 Dec 2011 19:15:01 +0000 (11:15 -0800)
This reverts commit d408447cb636e46fcb4f7fe7d0909bb351b7ba22.

op.c
t/op/substr.t

diff --git a/op.c b/op.c
index 08e9790..146c368 100644 (file)
--- a/op.c
+++ b/op.c
@@ -2001,7 +2001,6 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
        else if (!(o->op_flags & OPf_KIDS))
            break;
        if (o->op_targ != OP_LIST) {
-    case OP_SCALAR:
            op_lvalue(cBINOPo->op_first, type);
            break;
        }
index abd5d7f..ceacdf6 100644 (file)
@@ -23,7 +23,7 @@ $SIG{__WARN__} = sub {
 
 BEGIN { require './test.pl'; }
 
-plan(382);
+plan(381);
 
 run_tests() unless caller;
 
@@ -684,13 +684,6 @@ is($x, "\x{100}\x{200}\xFFb");
     }
 }
 
-# Also part of perl #24346; scalar(substr...) should not affect lvalueness
-{
-    my $str = "abcdef";
-    sub { $_[0] = 'dea' }->( scalar substr $str, 3, 2 );
-    is $str, 'abcdeaf', 'scalar does not affect lvalueness of substr';
-}
-
 # [perl #24200] string corruption with lvalue sub
 
 {