summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-12-08 12:16:29 -0700
committerKarl Williamson <khw@cpan.org>2019-12-09 15:32:49 -0700
commit1c2f3d7a101e8233a39695492df7bc03c8e2b3bc (patch)
tree7f8f41762241c799f77e7c7d0029f1fa952e36d5 /pod
parentc37687588b489d66c0093c09f5b6fe74c8772b4b (diff)
downloadperl-1c2f3d7a101e8233a39695492df7bc03c8e2b3bc.tar.gz
PATCH GH #17025 \p{user-defined} overrides official Unicode
Prior to this patch, they only sometimes overrode.
Diffstat (limited to 'pod')
-rw-r--r--pod/perldelta.pod14
-rw-r--r--pod/perlunicode.pod4
2 files changed, 17 insertions, 1 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 7ce4cf8f01..23d3fe7656 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -45,6 +45,20 @@ XXX For a release on a stable branch, this section aspires to be:
[ List each incompatible change as a =head2 entry ]
+=head2 C<\p{I<user-defined>}> properties now always override official
+Unicode ones
+
+Previously, if and only if a user-defined property was declared prior to
+the compilation of the regular expression pattern containing it, its
+definition was used instead of any official Unicode property with the
+same name. Now, it always overrides the offical property. This
+change could break existing code that relied (likely unwittingly) on the
+previous behavior. Without this fix, if Unicode released a new version
+with a new property that happens to have the same name as the one you
+had long been using, your program would break when you upgraded to a
+perl that used that new Unicode version. See L<perlunicode/User-Defined
+Character Properties>. [GH #17205]
+
=head1 Deprecations
XXX Any deprecated features, syntax, modules etc. should be listed here.
diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod
index e048df6df6..59058225b7 100644
--- a/pod/perlunicode.pod
+++ b/pod/perlunicode.pod
@@ -1066,7 +1066,9 @@ You can define your own binary character properties by defining subroutines
whose names begin with C<"In"> or C<"Is">. (The experimental feature
L<perlre/(?[ ])> provides an alternative which allows more complex
definitions.) The subroutines can be defined in any
-package. The user-defined properties can be used in the regular expression
+package. They override any Unicode properties expressed as the same
+names. The user-defined properties can be used in the regular
+expression
C<\p{}> and C<\P{}> constructs; if you are using a user-defined property from a
package other than the one you are in, you must specify its package in the
C<\p{}> or C<\P{}> construct.