while (($caller = caller($i)) eq __PACKAGE__) { $i++ }
my $encoding = $enc{$caller} || "unicore";
(my $file = $type) =~ s!::!/!g;
- if ($file =~ /^In[- ]?(.+)/i) {
+ if ($file =~ /^In[- _]?(.+?)$/i) {
my $In = $1;
defined %utf8::In || do "$encoding/In.pl";
my $prefix = substr(lc($In), 0, 3);
"elseif" for the class returned by the following block. This is
unlikely to be what you want.
+=item Empty %s
+
+(F) Empty C<\p{}> or C<\P{}>.
+
=item entering effective %s failed
(F) While under the C<use filetest> pragma, switching the real and
(S) This is an educated guess made in conjunction with the message "%s
found where operator expected". Often the missing operator is a comma.
+=item Missing right brace on %s
+
+(F) Missing right brace in C<\p{...}> or C<\P{...}>.
+
=item Missing right curly or square bracket
(F) The lexer counted more opening curly or square brackets than closing
if (*RExC_parse == '{') {
e = strchr(RExC_parse++, '}');
if (!e)
- vFAIL("Missing right brace on \\p{}");
+ vFAIL2("Missing right brace on \\%c{}", value);
+ while (isSPACE(UCHARAT(RExC_parse)))
+ RExC_parse++;
+ if (e == RExC_parse)
+ vFAIL2("Empty \\%c{}", value);
n = e - RExC_parse;
+ while (isSPACE(UCHARAT(RExC_parse + n - 1)))
+ n--;
}
else {
e = RExC_parse;
n = 1;
}
if (!SIZE_ONLY) {
+ if (UCHARAT(RExC_parse) == '^') {
+ RExC_parse++;
+ n--;
+ value = value == 'p' ? 'P' : 'p'; /* toggle */
+ while (isSPACE(UCHARAT(RExC_parse))) {
+ RExC_parse++;
+ n--;
+ }
+ }
if (value == 'p')
- Perl_sv_catpvf(aTHX_ listsv,
- "+utf8::%.*s\n", (int)n, RExC_parse);
+ Perl_sv_catpvf(aTHX_ listsv,
+ "+utf8::%.*s\n", (int)n, RExC_parse);
else
- Perl_sv_catpvf(aTHX_ listsv,
- "!utf8::%.*s\n", (int)n, RExC_parse);
+ Perl_sv_catpvf(aTHX_ listsv,
+ "!utf8::%.*s\n", (int)n, RExC_parse);
}
RExC_parse = e + 1;
ANYOF_FLAGS(ret) |= ANYOF_UNICODE;