diff options
author | Karl Williamson <khw@cpan.org> | 2017-12-19 16:03:39 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-01-19 11:20:11 -0700 |
commit | ba52ce15fe5ca68de1be69e394f41ccb48a731cc (patch) | |
tree | 12d167bb59e39ac5943c1a249f2cbe626170dfff /pod/perldeprecation.pod | |
parent | 78ba90076f5958f9830fb2559e21420018be4f8d (diff) | |
download | perl-ba52ce15fe5ca68de1be69e394f41ccb48a731cc.tar.gz |
Deprecate above \xFF in bitwise string ops
This is already a fatal error for operations whose outcome depends on
them, but in things like
"abc" & "def\x{100}"
the wide character doesn't actually need to participate in the AND, and
so perl doesn't. As a result of the discussion in the thread beginning
with http://nntp.perl.org/group/perl.perl5.porters/244884, it was
decided to deprecate these ones too.
Diffstat (limited to 'pod/perldeprecation.pod')
-rw-r--r-- | pod/perldeprecation.pod | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pod/perldeprecation.pod b/pod/perldeprecation.pod index e929314a68..8cd3eb950f 100644 --- a/pod/perldeprecation.pod +++ b/pod/perldeprecation.pod @@ -56,6 +56,24 @@ C<vec> views its string argument as a sequence of bits. A string containing a code point over 0xFF is nonsensical. This usage is deprecated in Perl 5.28, and will be removed in Perl 5.32. +=head3 Use of code points over 0xFF in string bitwise operators + +The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat their +operands as strings of bytes. As such, values above 0xFF are +nonsensical. Some instances of these have been deprecated since Perl +5.24, and were made fatal in 5.28, but it turns out that in cases where +the wide characters did not affect the end result, no deprecation +notice was raised, and so remain legal. Now, all occurrences either are +fatal or raise a deprecation warning, so that the remaining legal +occurrences will be fatal in 5.32. + +An example of this is + + "" & "\x{100}" + +The wide character is not used in the C<&> operation because the left +operand is shorter. This now warns anyway. + =head3 hostname() doesn't accept any arguments The function C<hostname()> in the L<Sys::Hostname> module has always |