some day, even though it doesn't yet. Perhaps you should use a
mixed-case attribute name, instead. See L<attributes>.
+=item \p{} uses Unicode rules, not locale rules
+
+(W) You compiled a regular expression that contained a Unicode property
+match (C<\p> or C<\P>), but the regular expression is also being told to
+use the run-time locale, not Unicode. It's best to not use these
+Unicode properties with locale, as only if the locale is a properly
+implemented ISO 8859-1 (Latin1) locale (which is supposed to be a subset
+of Unicode) will there not be any anomalies.
+
=item pack/unpack repeat count overflow
(F) You can't specify a repeat count so large that it overflows your
e = RExC_parse;
n = 1;
}
- if (!SIZE_ONLY) {
+ if (SIZE_ONLY) {
+ if (LOC) {
+ ckWARN2reg(RExC_parse,
+ "\\%c uses Unicode rules, not locale rules",
+ (int) value);
+ }
+ }
+ else {
if (UCHARAT(RExC_parse) == '^') {
RExC_parse++;
n--;
$a = qr/(?^-i:foo)/;
EXPECT
Sequence (?^-...) not recognized in regex; marked by <-- HERE in m/(?^- <-- HERE i:foo)/ at - line 2.
+########
+# regcomp.c [S_regclass]
+use warnings 'regexp' ;
+$a = qr/(?^l:\pL)/;
+$a = qr/(?^l:\PL)/;
+no warnings 'regexp' ;
+$a = qr/(?^l:\pL)/;
+$a = qr/(?^l:\PL)/;
+EXPECT
+\p uses Unicode rules, not locale rules in regex; marked by <-- HERE in m/(?^l:\p <-- HERE L)/ at - line 3.
+\P uses Unicode rules, not locale rules in regex; marked by <-- HERE in m/(?^l:\P <-- HERE L)/ at - line 4.