This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: Remove duplicate entry; fix typo
[perl5.git] / pod / perlrecharclass.pod
index ce28771..89f4a7e 100644 (file)
@@ -863,7 +863,7 @@ Same for the two ASCII-only range forms.
 =back
 
 There are various other synonyms that can be used besides the names
-listed in the table.  For example, C<\p{PosixAlpha}> can be written as
+listed in the table.  For example, C<\p{XPosixAlpha}> can be written as
 C<\p{Alpha}>.  All are listed in
 L<perluniprops/Properties accessible through \p{} and \P{}>.
 
@@ -999,6 +999,9 @@ use it will raise a warning, unless disabled via
 Comments on this feature are welcome; send email to
 C<perl5-porters@perl.org>.
 
+The rules used by L<C<use re 'strict>|re/'strict' mode> apply to this
+construct.
+
 We can extend the example above:
 
  /(?[ ( \p{Thai} + \p{Lao} ) & \p{Digit} ])/
@@ -1051,8 +1054,9 @@ C<\N{...}>, etc.)
 
 This last example shows the use of this construct to specify an ordinary
 bracketed character class without additional set operations.  Note the
-white space within it; C<E<sol>x> is turned on even within bracketed
-character classes, except you can't have comments inside them.  Hence,
+white space within it; a limited version of C<E<sol>x> is turned on even
+within bracketed character classes, with only the SPACE and TAB (C<\t>)
+characters allowed, and no comments.  Hence,
 
  (?[ [#] ])
 
@@ -1106,8 +1110,12 @@ just three limitations:
 
 =item 1
 
-This construct cannot be used within the scope of
-C<use locale> (or the C<E<sol>l> regex modifier).
+When compiled within the scope of C<use locale> (or the C<E<sol>l> regex
+modifier), this construct assumes that the execution-time locale will be
+a UTF-8 one, and the generated pattern always uses Unicode rules.  What
+gets matched or not thus isn't dependent on the actual runtime locale, so
+tainting is not enabled.  But a C<locale> category warning is raised
+if the runtime locale turns out to not be UTF-8.
 
 =item 2