This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Clarify -Dr output under /l
authorKarl Williamson <khw@cpan.org>
Mon, 15 Feb 2016 23:20:43 +0000 (16:20 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 19 Feb 2016 17:41:43 +0000 (10:41 -0700)
It is now redundant to indicate that an ANYOF node is for locale, as the
regnode type ANYOFL now clearly indicates that.  But also sometimes the
node is only vaid if the runtime locale is a UTF-8 one.  That was not
clearly indicated.

regcomp.c

index ad22d66..c5378fa 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -18400,10 +18400,8 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
 
        if (OP(o) == ANYOFL) {
             if (ANYOFL_UTF8_LOCALE_REQD(flags)) {
-                sv_catpvs(sv, "{utf8-loc}");
+                sv_catpvs(sv, "{utf8-locale-reqd}");
             }
-            else {
-                sv_catpvs(sv, "{loc}");
             }
         }
        if (flags & ANYOFL_FOLD)