This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don’t allow OPpTARGET_MY with integer negation
authorFather Chrysostomos <sprout@cpan.org>
Mon, 10 Nov 2014 07:53:42 +0000 (23:53 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 11 Nov 2014 01:47:21 +0000 (17:47 -0800)
commita9dec3fe491e66dff58a95299a532ad9c6d08439
treedc75eccb6f3604e6eb17d73f728da3918dac11bb
parent8ecc2ae2e9f2e6c27ecb5feb5c628ee59f6d8bba
Don’t allow OPpTARGET_MY with integer negation

$ ./perl -Ilib -le 'use integer; my $a = "fake"; $a = -$a; print "[$a]"'
[--]

As of 1c2b3fd6f1, negation under ‘use integer’ can do string negation,
which modifies the return value before reading the argument.  So, like
regular non-integer negation, it must forego this optimisation.
lib/B/Op_private.pm
opcode.h
regen/opcodes
t/op/lex_assign.t