[ List each incompatible change as a =head2 entry ]
+=head2 \400 - \777
+
+Use of C<\400> - C<\777> in regexes in certain circumstances has given different,
+anomalous behavior than their use in all other double-quotish contexts. Since
+5.10.1, a deprecated warning message has been raised when this happens. Now,
+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">.
+
=head1 Deprecations
XXX Any deprecated features, syntax, modules etc. should be listed here.
you should remove AutoLoader from @ISA and change C<use AutoLoader;> to
C<use AutoLoader 'AUTOLOAD';>.
-=item Use of octal value above 377 is deprecated
-
-(D deprecated, W regexp) There is a constant in the regular expression whose
-value is interpeted by Perl as octal and larger than 377 (255 decimal, 0xFF
-hex). Perl may take this to mean different things depending on the rest of
-the regular expression. If you meant such an octal value, convert it to
-hexadecimal and use C<\xHH> or C<\x{HH}> instead. If you meant to have
-part of it mean a backreference, use C<\g> for that. See L<perlre>.
-
=item Use of %s in printf format not supported
(F) You attempted to use a feature of printf that is accessible from
matching the code point of the character you want to use. (In some contexts,
two or even one octal digits are also accepted, sometimes with a warning.) This
allows for 512 characters (C<\000> up to C<\777>) that can be expressed this
-way (but anything above C<\377> is deprecated). Enough in pre-Unicode days,
+way. Enough in pre-Unicode days,
but most Unicode characters cannot be escaped this way.
Note that a character that is expressed as an octal escape is considered
I32 flags = 0;
STRLEN numlen = 3;
ender = grok_oct(p, &numlen, &flags, NULL);
-
- /* An octal above 0xff is interpreted differently
- * depending on if the re is in utf8 or not. If it
- * is in utf8, the value will be itself, otherwise
- * it is interpreted as modulo 0x100. It has been
- * decided to discourage the use of octal above the
- * single-byte range. For now, warn only when
- * it ends up modulo */
- if (SIZE_ONLY && ender >= 0x100
- && ! UTF && ! PL_encoding) {
- ckWARNregdep(p, "Use of octal value above 377 is deprecated");
+ if (ender > 0xff) {
+ RExC_utf8 = 1;
}
p += numlen;
}
}
-plan tests => 2511; # Update this when adding/deleting tests.
+plan tests => 2510; # Update this when adding/deleting tests.
run_tests() unless caller;
iseq $te [0], '../';
}
- # This currently has to come before any "use encoding" in this file.
- {
- local $Message;
- local $BugId = '59342';
- must_warn 'qr/\400/', '^Use of octal value above 377';
- }
-
-
-
{
local $BugId = '60034';
my $a = "xyzt" x 8192;
\c1 - c - \"\\c1\" more clearly written simply as \"q\"
\cA \001 y $& \1
+\400 \x{100} y $& \x{100}
+\600 \x{180} y $& \x{180}
+\777 \x{1FF} y $& \x{1FF}
+[a\400] \x{100} y $& \x{100}
+[b\600] \x{180} y $& \x{180}
+[c\777] \x{1FF} y $& \x{1FF}
+
# vim: softtabstop=0 noexpandtab