summaryrefslogtreecommitdiff
path: root/pod/perl5133delta.pod
diff options
context:
space:
mode:
authorKarl Williamson <khw@khw-desktop.(none)>2010-07-15 17:28:28 -0600
committerDavid Golden <dagolden@cpan.org>2010-07-17 21:50:48 -0400
commitf0a2b745ce6c03aec6412d79ce0b782f20eddce4 (patch)
treed1786b1a4a80f6b848dca1ab4eba6e3ffd5dc5d1 /pod/perl5133delta.pod
parent8e4698ef1ed0da722532bfcc769ba22fe85c4b47 (diff)
downloadperl-f0a2b745ce6c03aec6412d79ce0b782f20eddce4.tar.gz
Add \o{} escape
This commit adds the new construct \o{} to express a character constant by its octal ordinal value, along with ancillary tests and documentation. A function to handle this is added to util.c, and it is called from the 3 parsing places it could occur. The function is a candidate for in-lining, though I doubt that it will ever be used frequently.
Diffstat (limited to 'pod/perl5133delta.pod')
-rw-r--r--pod/perl5133delta.pod15
1 files changed, 14 insertions, 1 deletions
diff --git a/pod/perl5133delta.pod b/pod/perl5133delta.pod
index 476427e025..d4db338fd9 100644
--- a/pod/perl5133delta.pod
+++ b/pod/perl5133delta.pod
@@ -28,6 +28,17 @@ here, but most should go in the L</Performance Enhancements> section.
[ List each enhancement as a =head2 entry ]
+=head2 \o{...}
+
+The escape sequence C<"\o"> in double-quotish contexts is now defined. It
+must be followed by braces enclosing an octal number of at least one digit. It
+means the character whose ordinal value is that octal number. This construct
+allows large octal ordinals beyond the current max of 0777 to be represented.
+It also allows you to specify a character in octal which can safely be
+concatenated with other regex snippets without danger of changing its meaning,
+and one which won't ever be confused with being a backreference to a regex
+capture group. See L<perlre/Capture groups>
+
=head2 C<\N{I<name>}> and C<charnames> enhancements
C<\N{}> and C<charnames::vianame> now know about the abbreviated character
@@ -84,7 +95,9 @@ anomalous behavior than their use in all other double-quotish contexts. Since
all double-quotish contexts have the same behavior, namely to be equivalent to
C<\x{100}> - C<\x{1FF}>, with no deprecation warning. Use of these values in the
command line option C<"-0"> retains the current meaning to slurp input files
-whole; previously, this was documented only for C<"-0777">.
+whole; previously, this was documented only for C<"-0777">. It is recommended,
+however, because of various ambiguities, to use the new L</\o{...}> construct
+to represent characters in octal.
=head1 Deprecations