summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-02-09 21:18:48 -0700
committerKarl Williamson <public@khwilliamson.com>2011-02-09 22:46:03 -0700
commit17a3df4c6a07533e2c03c46fdd27e3ee295d61d0 (patch)
treee0ee85739319695ef7c320b28890ad2f49ebade2 /pod
parent3efe3cb8c0229e34f5e21774151ddbfdcf27adf4 (diff)
downloadperl-17a3df4c6a07533e2c03c46fdd27e3ee295d61d0.tar.gz
Fix up \cX for 5.14
Throughout 5.13 there was temporary code to deprecate and forbid certain values of X following a \c in qq strings. This patch fixes this to the final 5.14 semantics. These are: 1) a utf8 non-ASCII character will croak. This is the same behavior as pre-5.13, but it gives a correct error message, rather than the malformed utf8 message previously. 2) \c{ and \cX where X is above ASCII will generate a deprecated message. The intent is to remove these capabilities in 5.16. The original agreement was to croak on above ASCII, but that does violate our stability policy, so I'm deprecating it instead. 3) A non-deprecated warning is generated for all other \cX; this is the same as throughout the 5.13 series. I did not have the tuits to use \c{} as I had planned in 5.14, but \N{} can be used instead.
Diffstat (limited to 'pod')
-rw-r--r--pod/perldiag.pod21
-rw-r--r--pod/perlop.pod3
2 files changed, 19 insertions, 5 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index bf22e1e511..3d35b1ce6f 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1258,7 +1258,12 @@ Perhaps you need to copy the value to a temporary, and repeat that.
=item Character following "\c" must be ASCII
-(F) In C<\cI<X>>, I<X> must be an ASCII character.
+(F|W deprecated, syntax) In C<\cI<X>>, I<X> must be an ASCII character.
+It is planned to make this fatal in all instances in Perl 5.16. In the
+cases where it isn't fatal, the character this evaluates to is
+derived by exclusive or'ing the code point of this character with 0x40.
+
+Note that non-alphabetic ASCII characters are discouraged here as well.
=item Character in 'C' format wrapped in pack
@@ -1498,12 +1503,20 @@ valid magic number.
you have also specified an explicit size for the string. See
L<perlfunc/pack>.
-=item "\c%c" more clearly written simply as "%s"
+=item "\c{" is deprecated and is more clearly written as ";"
+
+(D deprecated, syntax) The C<\cI<X>> construct is intended to be a way
+to specify non-printable characters. You used it with a "{" which
+evaluates to ";", which is printable. It is planned to remove the
+ability to specify a semi-colon this way in Perl 5.16. Just use a
+semi-colon or a backslash-semi-colon without the "\c".
+
+=item "\c%c" is more clearly written simply as "%s"
-(D deprecated) The C<\cI<X>> construct is intended to be a way to specify
+(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. This message may not remain as Deprecated beyond 5.13.
+characters.
=item Deep recursion on subroutine "%s"
diff --git a/pod/perlop.pod b/pod/perlop.pod
index eb71b89a83..e11fff2019 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -1114,7 +1114,8 @@ L<perlebcdic/OPERATOR DIFFERENCES> for the complete list of what these
sequences mean on both ASCII and EBCDIC platforms.
Use of any other character following the "c" besides those listed above is
-discouraged, and may become deprecated or forbidden. What happens for those
+discouraged, and some are deprecated with the intention of removing
+those in Perl 5.16. What happens for any of these
other characters currently though, is that the value is derived by inverting
the 7th bit (0x40).