This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Deprecating the use of C<< \cI<X> >> to specify a printable character."
authorSawyer X <xsawyerx@cpan.org>
Wed, 8 Feb 2017 13:00:37 +0000 (14:00 +0100)
committerSawyer X <xsawyerx@cpan.org>
Sun, 12 Feb 2017 10:52:01 +0000 (12:52 +0200)
This reverts commit bfdc8cd3d5a81ab176f7d530d2e692897463c97d.

dquote.c
pod/perldeprecation.pod
pod/perldiag.pod
regcomp.c
t/lib/warnings/regcomp
t/lib/warnings/toke
t/re/reg_mesg.t

index ef03046..e02308e 100644 (file)
--- a/dquote.c
+++ b/dquote.c
@@ -46,10 +46,10 @@ Perl_grok_bslash_c(pTHX_ const char source, const bool output_warning)
         clearer[i++] = result;
         clearer[i++] = '\0';
 
-        Perl_ck_warner_d(aTHX_ packWARN2(WARN_SYNTAX,WARN_DEPRECATED),
-                          "\"\\c%c\" is more clearly written simply as \"%s\". "
-                          "This will be a fatal error in Perl 5.28",
-                          source, clearer);
+        Perl_ck_warner(aTHX_ packWARN(WARN_SYNTAX),
+                        "\"\\c%c\" is more clearly written simply as \"%s\"",
+                        source,
+                        clearer);
     }
 
     return result;
index 0a13504..1401bfb 100644 (file)
@@ -340,25 +340,6 @@ C<use AutoLoader 'AUTOLOAD';>.
 This feature was deprecated in Perl 5.004, and will be fatal in Perl 5.28.
 
 
-=head3 Use of C<< \cI<X> >> to specify a printable character.
-
-In a double quoted context, Perl has the C<< \c >> construct to write
-control characters in a readable way. For instance, the tab character
-can be written as C<< \cI >> (I<< control-I >>), and the escape 
-character can be written as C<< \c[ >>.
-
-Due to implementation details, the C<< \c >> construct can be used
-to create regular, printable, characters as well. For instance,
-C<< \c >> maps a C<< , >> to C<< l >>; that is C<< \c, >> is an
-obscure way of writing C<< l >>. And not only that, it's also not
-portable between ASCII and EBCDIC platforms.
-
-Using the C<< \c >> construct with an argument which maps to a
-printable character was deprecated in Perl 5.14, and will be a fatal
-error in Perl 5.28. You're recommended to just write the intended
-character instead.
-
-
 =head3 Use of code points over 0xFF in string bitwise operators
 
 The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat
index 0ac367b..c2408f0 100644 (file)
@@ -1546,7 +1546,7 @@ Perhaps you need to copy the value to a temporary, and repeat that.
 
 Note that ASCII characters that don't map to control characters are
 discouraged, and will generate the warning (when enabled)
-L</""\c%c" is more clearly written simply as "%s". This will be a fatal error in Perl 5.28">.
+L</""\c%c" is more clearly written simply as "%s"">.
 
 =item Character following \%c must be '{' or a single-character Unicode property name in regex; marked by <-- HERE in m/%s/
 
@@ -1653,15 +1653,13 @@ See L<charnames/CUSTOM ALIASES>.
 
 (W unopened) You tried chdir() on a filehandle that was never opened.
 
-=item "\c%c" is more clearly written simply as "%s". This will be a fatal error in Perl 5.28
+=item "\c%c" is more clearly written simply as "%s"
 
-(D deprecated, syntax) The C<\cI<X>> construct is intended to be a
-way to specify non-printable characters.  You used it for a printable
-one, which is better written as simply itself, perhaps preceded by
-a backslash for non-word characters.  Doing it the way you did is
-not portable between ASCII and EBCDIC platforms.
-
-This usage is going to result in a fatal error in Perl 5.28.
+(W syntax) The C<\cI<X>> construct is intended to be a way to specify
+non-printable characters.  You used it for a printable one, which
+is better written as simply itself, perhaps preceded by a backslash
+for non-word characters.  Doing it the way you did is not portable
+between ASCII and EBCDIC platforms.
 
 =item Cloning substitution context is unimplemented
 
@@ -3140,13 +3138,13 @@ code.
 In Perl 5.30, it will no longer be possible to use sysread(), recv(),
 syswrite() or send() to read or send bytes from/to :utf8 handles.
 
-=item "%s" is more clearly written simply as "%s" in regex. This will be a fatal error in Perl 5.28; marked by S<<-- HERE> in m/%s/
+=item "%s" is more clearly written simply as "%s" in regex; marked by S<<-- HERE> in m/%s/
 
-(W deprecated, regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>)
+(W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>)
 
 You specified a character that has the given plainer way of writing it,
 and which is also portable to platforms running with different character
-sets. This usage is deprecated, and will be a fatal error in Perl 5.28.
+sets.
 
 =item $* is no longer supported. Its use will be fatal in Perl 5.30
 
index f199e12..ec7fa3b 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -818,13 +818,6 @@ static const scan_data_t zero_scan_data =
                                        REPORT_LOCATION_ARGS(loc));      \
 } STMT_END
 
-#define        vWARN4dep(loc, m, a1, a2, a3) STMT_START {                             \
-    __ASSERT_(PASS2) Perl_warner(aTHX_ packWARN2(WARN_REGEXP,WARN_DEPRECATED), \
-                                       m REPORT_LOCATION,                      \
-                                      a1, a2, a3,                             \
-                                       REPORT_LOCATION_ARGS(loc));             \
-} STMT_END
-
 #define        ckWARN4reg(loc, m, a1, a2, a3) STMT_START {                     \
     __ASSERT_(PASS2) Perl_ck_warner(aTHX_ packWARN(WARN_REGEXP),        \
                                           m REPORT_LOCATION,            \
@@ -16933,22 +16926,20 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
                     literal[d++] = (char) value;
                     literal[d++] = '\0';
 
-                    vWARN4dep(RExC_parse,
-                           "\"%.*s\" is more clearly written simply as \"%s\". "
-                           "This will be a fatal error in Perl 5.28",
+                    vWARN4(RExC_parse,
+                           "\"%.*s\" is more clearly written simply as \"%s\"",
                            (int) (RExC_parse - rangebegin),
                            rangebegin,
                            literal
-                    );
+                        );
                 }
                 else if isMNEMONIC_CNTRL(value) {
-                    vWARN4dep(RExC_parse,
-                           "\"%.*s\" is more clearly written simply as \"%s\". "
-                           "This will be a fatal error in Perl 5.28",
+                    vWARN4(RExC_parse,
+                           "\"%.*s\" is more clearly written simply as \"%s\"",
                            (int) (RExC_parse - rangebegin),
                            rangebegin,
                            cntrl_to_mnemonic((U8) value)
-                    );
+                        );
                 }
             }
         }
index 44ef5c3..2b084c5 100644 (file)
@@ -31,12 +31,12 @@ BEGIN {
 use warnings;
 $a = qr/\c,/;
 $a = qr/[\c,]/;
-no warnings 'syntax', 'deprecated';
+no warnings 'syntax';
 $a = qr/\c,/;
 $a = qr/[\c,]/;
 EXPECT
-"\c," is more clearly written simply as "l". This will be a fatal error in Perl 5.28 at - line 9.
-"\c," is more clearly written simply as "l". This will be a fatal error in Perl 5.28 at - line 10.
+"\c," is more clearly written simply as "l" at - line 9.
+"\c," is more clearly written simply as "l" at - line 10.
 ########
 # This is because currently a different error is output under
 # use re 'strict', so can't go in reg_mesg.t
index c97abaf..fc51d9f 100644 (file)
@@ -1385,12 +1385,12 @@ BEGIN {
 use warnings;
 $a = "\c,";
 $a = "\c`";
-no warnings 'syntax', 'deprecated';
+no warnings 'syntax';
 $a = "\c,";
 $a = "\c`";
 EXPECT
-"\c," is more clearly written simply as "l". This will be a fatal error in Perl 5.28 at - line 9.
-"\c`" is more clearly written simply as "\ ". This will be a fatal error in Perl 5.28 at - line 10.
+"\c," is more clearly written simply as "l" at - line 9.
+"\c`" is more clearly written simply as "\ " at - line 10.
 ########
 # toke.c
 BEGIN {
index 22711d5..597df92 100644 (file)
@@ -532,10 +532,10 @@ my @warning = (
                   ],
     '/a{1,1}?\x{100}/' => 'Useless use of greediness modifier \'?\' {#} m/a{1,1}?{#}\x{100}/',
     "/(?[ [ % - % ] ])/" => "",
-    "/(?[ [ : - \\x$colon_hex ] ])\\x{100}/" => "\": - \\x$colon_hex \" is more clearly written simply as \":\". This will be a fatal error in Perl 5.28 {#} m/(?[ [ : - \\x$colon_hex {#}] ])\\x{100}/",
-    "/(?[ [ \\x$colon_hex - : ] ])\\x{100}/" => "\"\\x$colon_hex\ - : \" is more clearly written simply as \":\". This will be a fatal error in Perl 5.28 {#} m/(?[ [ \\x$colon_hex - : {#}] ])\\x{100}/",
-    "/(?[ [ \\t - \\x$tab_hex ] ])\\x{100}/" => "\"\\t - \\x$tab_hex \" is more clearly written simply as \"\\t\". This will be a fatal error in Perl 5.28 {#} m/(?[ [ \\t - \\x$tab_hex {#}] ])\\x{100}/",
-    "/(?[ [ \\x$tab_hex - \\t ] ])\\x{100}/" => "\"\\x$tab_hex\ - \\t \" is more clearly written simply as \"\\t\". This will be a fatal error in Perl 5.28 {#} m/(?[ [ \\x$tab_hex - \\t {#}] ])\\x{100}/",
+    "/(?[ [ : - \\x$colon_hex ] ])\\x{100}/" => "\": - \\x$colon_hex \" is more clearly written simply as \":\" {#} m/(?[ [ : - \\x$colon_hex {#}] ])\\x{100}/",
+    "/(?[ [ \\x$colon_hex - : ] ])\\x{100}/" => "\"\\x$colon_hex\ - : \" is more clearly written simply as \":\" {#} m/(?[ [ \\x$colon_hex - : {#}] ])\\x{100}/",
+    "/(?[ [ \\t - \\x$tab_hex ] ])\\x{100}/" => "\"\\t - \\x$tab_hex \" is more clearly written simply as \"\\t\" {#} m/(?[ [ \\t - \\x$tab_hex {#}] ])\\x{100}/",
+    "/(?[ [ \\x$tab_hex - \\t ] ])\\x{100}/" => "\"\\x$tab_hex\ - \\t \" is more clearly written simply as \"\\t\" {#} m/(?[ [ \\x$tab_hex - \\t {#}] ])\\x{100}/",
     "/(?[ [ $B_hex - C ] ])/" => "Ranges of ASCII printables should be some subset of \"0-9\", \"A-Z\", or \"a-z\" {#} m/(?[ [ $B_hex - C {#}] ])/",
     "/(?[ [ A - $B_hex ] ])/" => "Ranges of ASCII printables should be some subset of \"0-9\", \"A-Z\", or \"a-z\" {#} m/(?[ [ A - $B_hex {#}] ])/",
     "/(?[ [ $low_mixed_alpha - $high_mixed_alpha ] ])/" => "Ranges of ASCII printables should be some subset of \"0-9\", \"A-Z\", or \"a-z\" {#} m/(?[ [ $low_mixed_alpha - $high_mixed_alpha {#}] ])/",
@@ -611,10 +611,10 @@ my @warning_only_under_strict = (
     '/[\N{U+FF}-\x{100}]/' => 'Both or neither range ends should be Unicode {#} m/[\N{U+FF}-\x{100}{#}]/',
     '/[\N{U+100}-\x{101}]/' => "",
     "/[%-%]/" => "",
-    "/[:-\\x$colon_hex]\\x{100}/" => "\":-\\x$colon_hex\" is more clearly written simply as \":\". This will be a fatal error in Perl 5.28 {#} m/[:-\\x$colon_hex\{#}]\\x{100}/",
-    "/[\\x$colon_hex-:]\\x{100}/" => "\"\\x$colon_hex-:\" is more clearly written simply as \":\". This will be a fatal error in Perl 5.28 {#} m/[\\x$colon_hex\-:{#}]\\x{100}/",
-    "/[\\t-\\x$tab_hex]\\x{100}/" => "\"\\t-\\x$tab_hex\" is more clearly written simply as \"\\t\". This will be a fatal error in Perl 5.28 {#} m/[\\t-\\x$tab_hex\{#}]\\x{100}/",
-    "/[\\x$tab_hex-\\t]\\x{100}/" => "\"\\x$tab_hex-\\t\" is more clearly written simply as \"\\t\". This will be a fatal error in Perl 5.28 {#} m/[\\x$tab_hex\-\\t{#}]\\x{100}/",
+    "/[:-\\x$colon_hex]\\x{100}/" => "\":-\\x$colon_hex\" is more clearly written simply as \":\" {#} m/[:-\\x$colon_hex\{#}]\\x{100}/",
+    "/[\\x$colon_hex-:]\\x{100}/" => "\"\\x$colon_hex-:\" is more clearly written simply as \":\" {#} m/[\\x$colon_hex\-:{#}]\\x{100}/",
+    "/[\\t-\\x$tab_hex]\\x{100}/" => "\"\\t-\\x$tab_hex\" is more clearly written simply as \"\\t\" {#} m/[\\t-\\x$tab_hex\{#}]\\x{100}/",
+    "/[\\x$tab_hex-\\t]\\x{100}/" => "\"\\x$tab_hex-\\t\" is more clearly written simply as \"\\t\" {#} m/[\\x$tab_hex\-\\t{#}]\\x{100}/",
     "/[$B_hex-C]/" => "Ranges of ASCII printables should be some subset of \"0-9\", \"A-Z\", or \"a-z\" {#} m/[$B_hex-C{#}]/",
     "/[A-$B_hex]/" => "Ranges of ASCII printables should be some subset of \"0-9\", \"A-Z\", or \"a-z\" {#} m/[A-$B_hex\{#}]/",
     "/[$low_mixed_alpha-$high_mixed_alpha]/" => "Ranges of ASCII printables should be some subset of \"0-9\", \"A-Z\", or \"a-z\" {#} m/[$low_mixed_alpha-$high_mixed_alpha\{#}]/",