Commit
8990e30710 (perl 5.0 alpha 6) changed several SvREADONLY checks
to apply only to run time. This is convenient when it comes to modify-
ing op trees, whose SVs are, for the most part, marked read-only.
But several pieces of code that relied on this were buggy when dealing
with constants created by ‘use constant’. To make it harder to add
such bugs, I have changed all code that relies on this exception and
am now removing it.
#ifdef PERL_ANY_COW
if (SvREADONLY(sv)) {
- if (IN_PERL_RUNTIME)
Perl_croak_no_modify();
}
else if (SvIsCOW(sv)) {
}
#else
if (SvREADONLY(sv)) {
- if (IN_PERL_RUNTIME)
Perl_croak_no_modify();
}
else