Skip to content

Commit

Permalink
Revert "Make scalar() propagate lvalueness"
Browse files Browse the repository at this point in the history
This reverts commit d408447.
  • Loading branch information
Father Chrysostomos committed Dec 18, 2011
1 parent 544303e commit 41b1a11
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion op.c
Expand Up @@ -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;
}
Expand Down
9 changes: 1 addition & 8 deletions t/op/substr.t
Expand Up @@ -23,7 +23,7 @@ $SIG{__WARN__} = sub {

BEGIN { require './test.pl'; }

plan(382);
plan(381);

run_tests() unless caller;

Expand Down Expand Up @@ -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

{
Expand Down

0 comments on commit 41b1a11

Please sign in to comment.