develooper Front page | perl.perl5.porters | Postings from September 2014

[perl #115254] Dead code in leave_scope?

Thread Previous
From:
Father Chrysostomos via RT
Date:
September 20, 2014 07:19
Subject:
[perl #115254] Dead code in leave_scope?
Message ID:
rt-4.0.18-25298-1411197569-1431.115254-15-0@perl.org
On Thu Oct 18 07:37:46 2012, rurban wrote:
> There is one edge case remaining, which prevents us from removing
> those two lines.
> 
> ./miniperl t/op/sort.t
> ...
> ok 143 - in-place sort of read-only array
> Modification of a read-only value attempted at t/op/sort.t line 786.
> and it dies, instead of continuing.

But, still, those two lines are wrong (or the first one of them):

$ ./perl -Ilib -e '{ my $x = 3; Internals::SvREADONLY $x, 1; () }'
$ ./perl -Ilib -e '{ my $x = ${qr//}; Internals::SvREADONLY $x, 1; () }'
Modification of a read-only value attempted at -e line 1.

It may or may not die, depending on the assigned value.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=115254

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About