perl5
perl5 copied to clipboard
Set `builtin::` globs to readonly so that attempted replacements of them do not break optimisations
A possible thought, based on discussions on p5p@ about optimisations around builtin functions.
Currently just emits the default "Modification of read-only value" message. I did attempt to have it say something special in this situation but that involves editing Perll_sv_setsv_flags() in sv.c, one of the hottest paths in the entire interpreter. I didn't think that was especially worth it just for this very rare case.
This is an alternative to https://github.com/Perl/perl5/pull/22668
- This set of changes requires a perldelta entry, and it is included.