Branch: refs/heads/yves/fix_docs_for_keepcopy_regex_modifer_p
Home: https://github.com/Perl/perl5
Commit: 86ab0fd57c860b105fe75fc48a23790190af0df1
https://github.com/Perl/perl5/commit/86ab0fd57c860b105fe75fc48a23790190af0df1
Author: Yves Orton <[email protected]>
Date: 2026-07-11 (Sat, 11 Jul 2026)
Changed paths:
M pod/perldelta.pod
M pod/perlop.pod
M pod/perlre.pod
M pod/perlreapi.pod
M pod/perlretut.pod
M pod/perlvar.pod
Log Message:
-----------
regex pod fixes related to /p as it stands today
This documentation patch updates the docs to explain when and where
/p is still relevent, and documents the performance reasons why. For
a long time the docs have been incorrectly stating /p is not used or
relevant anymore and that COW has made it redundant. This is
unfortunately not the case, and it is still relevant for /g matches
where the target string is not copied. Its a weird edge case, I bet
no-one cares or actually needs it, but because of the flaws in our
COW model we would make some code quadratic out of the box by making
scalar /g matches copy the target string. As such we need an escape
hatch for when the user wants to override that for some reason.
I am inclined to think that removing PL_saw_ampersand was premature
as well, COW isnt a complete solution for the performance issues that
PL_saw_ampersand was solving.
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications