This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #115254] Fix flag check on scope exit
$ ./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.
The latter causes $x to be marked FAKE. At the time this code was
introduced in scope.c, read-only+fake meant cow, so the !fake check
was necessary. (That said, it has always behaved incorrectly for glob
copies that are also marked fake.)