This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Module::CoreList for 5.23.1
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
fc4c3cec 5perldelta - what is new for perl v5.23.1
eabfc7bc 6
2cfe9b50 7=head1 DESCRIPTION
eabfc7bc 8
fc4c3cec 9This document describes differences between the 5.23.0 release and the 5.23.1
2cfe9b50 10release.
eabfc7bc 11
fc4c3cec
RS
12If you are upgrading from an earlier release such as 5.22.0, first read
13L<perl5230delta>, which describes differences between 5.22.0 and 5.23.0.
14
2cfe9b50 15=head1 Core Enhancements
eabfc7bc 16
fb7e9cdd 17=head2 Integer shift (C<< << >> and C<< >> >>) now more explicitly defined
deaaea8c
JH
18
19Negative shifts are reverse shifts: left shift becomes right shift,
20and right shift becomes left shift.
21
22Shifting by the number of bits in a native integer (or more) is zero,
23except when the "overshift" is right shifting a negative value under
24C<use integer>, in which case the result is -1 (arithmetic shift).
25
26Until now negative shifting and overshifting have been undefined
27because they have relied on whatever the C implementation happens
fb7e9cdd 28to do. For example, for the overshift a common C behavior is
deaaea8c
JH
29"modulo shift":
30
31 1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1 # Common C behavior.
32
33 # And the same for <<, while Perl now produces 0 for both.
34
35Now these behaviors are well-defined under Perl, regardless of what
36the underlying C implementation does. Note, however, that you cannot
fb7e9cdd
JH
37escape the native integer width, you need to know how far left you
38can go. You can use for example:
39
40 use Config;
41 my $wordbits = $Config{uvsize} * 8; # Or $Config{uvsize} << 3.
42
43If you need a more bits on the left shift, you can use for example
44the C<bigint> pragma, or the C<Bit::Vector> module from CPAN.
deaaea8c 45
7d380357
RS
46=head2 Postfix dereferencing is no longer experimental
47
1c2511e0
AC
48Using the C<postderef> and C<postderef_qq> features no longer emits a
49warning. Existing code that disables the C<experimental::postderef> warning
50category that they previously used will continue to work. The C<postderef>
51feature has no effect; all Perl code can use postfix dereferencing,
52regardless of what feature declarations are in scope. The C<5.24> feature
53bundle now includes the C<postderef_qq> feature.
7d380357 54
0d610ac1
AC
55=head2 printf and sprintf now allow reordered precision arguments
56
57That is, C<< sprintf '|%.*2$|', 2, 3 >> now returns C<|002|>. This extends
58the existing reordering mechanism (which allows reordering for arguments
59that are used as format fields, widths, and vector separators).
60
2cfe9b50 61=head1 Incompatible Changes
eabfc7bc 62
ce4793f1
KW
63=head2 ASCII characters in variable names must now be all visible
64
65It was legal until now on ASCII platforms for variable names to contain
66non-graphical ASCII control characters (ordinals 0 through 31, and 127,
67which are the C0 controls and C<DELETE>). This usage has been
68deprecated since v5.20, and as of now causes a syntax error. The
69variables these names referred to are special, reserved by Perl for
70whatever use it may choose, now, or in the future. Each such variable
71has an alternative way of spelling it. Instead of the single
72non-graphic control character, a two character sequence beginning with a
73caret is used, like C<$^]> and C<${^GLOBAL_PHASE}>. Details are at
74L<perlvar>. It remains legal, though unwise and deprecated (raising a
75deprecation warning), to use certain non-graphic non-ASCII characters in
76variables names when not under S<C<use utf8>>. No code should do this,
77as all such variables are reserved by Perl, and Perl doesn't currently
78define any of them (but could at any time, without notice).
eabfc7bc 79
26230909
AC
80=head2 The C<autoderef> feature has been removed
81
82The experimental C<autoderef> feature (which allowed calling C<push>,
83C<pop>, C<shift>, C<unshift>, C<splice>, C<keys>, C<values>, and C<each> on
84a scalar argument) has been deemed unsuccessful. It has now been removed;
85trying to use the feature (or to disable the C<experimental::autoderef>
86warning it previously triggered) now yields an exception.
87
fc4c3cec 88=head1 Deprecations
eabfc7bc 89
fc4c3cec
RS
90=head2 Module removals
91
92XXX Remove this section if inapplicable.
93
94The following modules will be removed from the core distribution in a
95future release, and will at that time need to be installed from CPAN.
96Distributions on CPAN which require these modules will need to list them as
97prerequisites.
98
99The core versions of these modules will now issue C<"deprecated">-category
100warnings to alert you to this fact. To silence these deprecation warnings,
101install the modules in question from CPAN.
102
103Note that these are (with rare exceptions) fine modules that you are encouraged
104to continue to use. Their disinclusion from core primarily hinges on their
105necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
106not usually on concerns over their design.
107
108=over
109
110=item XXX
111
112XXX Note that deprecated modules should be listed here even if they are listed
113as an updated module in the L</Modules and Pragmata> section.
114
115=back
116
117[ List each other deprecation as a =head2 entry ]
118
fc4c3cec 119=head1 Modules and Pragmata
eabfc7bc 120
fc4c3cec
RS
121XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
122go here. If Module::CoreList is updated, generate an initial draft of the
123following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
124for important changes should then be added by hand. In an ideal world,
125dual-life modules would have a F<Changes> file that could be cribbed.
eabfc7bc 126
fc4c3cec 127[ Within each section, list entries as a =item entry ]
eabfc7bc 128
fc4c3cec 129=head2 New Modules and Pragmata
eabfc7bc 130
fc4c3cec 131=over 4
eabfc7bc 132
73d6481e 133=item *
eabfc7bc 134
fc4c3cec 135XXX
eabfc7bc 136
fc4c3cec 137=back
eabfc7bc 138
fc4c3cec
RS
139=head2 Updated Modules and Pragmata
140
141=over 4
eabfc7bc
RS
142
143=item *
144
dc013420
SH
145L<autodie> has been upgraded from version 2.28 to 2.29.
146
147=item *
148
c85f23b2
DD
149L<IPC::Open3> has been upgraded from version 1.18 to 1.19.
150
151If a Perl exception was thrown from inside this module, the exception
779c45ce 152C<IPC::Open3> threw to the callers of C<open3> would have an irrelevant
c85f23b2
DD
153message derived from C<$!> which was in an undefined state, instead of the
154C<$@> message which triggers the failure path inside C<open3>.
eabfc7bc 155
6962a25d
SH
156=item *
157
158L<Unicode::Collate> has been upgraded from version 1.12 to 1.14.
159
0b8e4842
SH
160=item *
161
162L<Unicode::Normalize> has been upgraded from version 1.18 to 1.19.
163
fc4c3cec
RS
164=back
165
166=head2 Removed Modules and Pragmata
eabfc7bc 167
fc4c3cec 168=over 4
374c951f
SH
169
170=item *
171
fc4c3cec 172XXX
e586de20 173
fc4c3cec 174=back
e586de20 175
fc4c3cec 176=head1 Diagnostics
b7b593d8 177
fc4c3cec
RS
178The following additions or changes have been made to diagnostic output,
179including warnings and fatal error messages. For the complete list of
180diagnostic messages, see L<perldiag>.
b7b593d8 181
fc4c3cec
RS
182=head2 Changes to Existing Diagnostics
183
fc4c3cec 184=over 4
4b951711
TC
185
186=item *
187
0d610ac1
AC
188The C<printf> and C<sprintf> builtins are now more careful about the
189warnings they emit: argument reordering now disables the "redundant
190argument" warning in all cases; and invalid format strings are no longer
191treated as absorbing arguments (so "redundant argument" warnings can
192correctly be emitted by such code).
eabfc7bc 193
fc4c3cec 194=back
eabfc7bc 195
73d6481e 196=head1 Platform Support
eabfc7bc 197
fc4c3cec 198=head2 Platform-Specific Notes
9c0328ac 199
fc4c3cec
RS
200=over 4
201
7d380357 202=item VMS
fc4c3cec 203
7d380357
RS
204=over
205
206=item *
207
208The minimum supported version of VMS is now v7.3-2, released in 2003. As a
209side effect of this change, VAX is no longer supported as the terminal
210release of OpenVMS VAX was v7.3 in 2001.
211
212=back
eabfc7bc 213
2cfe9b50 214=back
eabfc7bc 215
fc4c3cec
RS
216=head1 Internal Changes
217
2cfe9b50 218=over 4
eabfc7bc
RS
219
220=item *
221
0d610ac1
AC
222C<sv_catpvf> and related functions (including C<sv_vcatpvfn_flags> when
223called with a C<va_list> rather than an array of SV pointers) have never
224handled argument reordering. Attempts to reorder arguments now yield an
225exception, rather than being silently ignored.
eabfc7bc 226
fc4c3cec 227=back
302ef3d4 228
fc4c3cec 229=head1 Selected Bug Fixes
302ef3d4 230
fc4c3cec 231=over 4
eabfc7bc 232
73d6481e 233=item *
eabfc7bc 234
7ed1d857
DD
235A leak in the XS typemap caused one scalar to be leaked each time a C<FILE *>
236or a C<PerlIO *> was C<OUTPUT:>ed or imported to Perl, since perl 5.000. These
237particular typemap entries are thought to be extremely rarely used by XS
238modules. [perl #124181]
eabfc7bc 239
fc4c3cec 240=item *
2a7a05b4 241
2ad3e690
MH
242C<alarm()> and C<sleep()> will now warn if the argument is a negative number
243and return undef. Previously they would pass the negative value to the
244underlying C function which may have set up a timer with a surprising value.
30aa8e3f 245
fc4c3cec 246=back
30aa8e3f 247
fc4c3cec 248=head1 Acknowledgements
2a7a05b4 249
fc4c3cec 250XXX Generate this with:
2cfe9b50 251
fc4c3cec 252 perl Porting/acknowledgements.pl v5.23.1..HEAD
f5b73711 253
44691e6f
AB
254=head1 Reporting Bugs
255
e08634c5
SH
256If you find what you think is a bug, you might check the articles recently
257posted to the comp.lang.perl.misc newsgroup and the perl bug database at
fc4c3cec
RS
258L<https://rt.perl.org/> . There may also be information at
259L<http://www.perl.org/> , the Perl Home Page.
44691e6f 260
e08634c5
SH
261If you believe you have an unreported bug, please run the L<perlbug> program
262included with your release. Be sure to trim your bug down to a tiny but
263sufficient test case. Your bug report, along with the output of C<perl -V>,
264will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
265
266If the bug you are reporting has security implications, which make it
e08634c5
SH
267inappropriate to send to a publicly archived mailing list, then please send it
268to perl5-security-report@perl.org. This points to a closed subscription
269unarchived mailing list, which includes all the core committers, who will be
270able to help assess the impact of issues, figure out a resolution, and help
f9001595 271co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
272platforms on which Perl is supported. Please only use this address for
273security issues in the Perl core, not for modules independently distributed on
274CPAN.
44691e6f
AB
275
276=head1 SEE ALSO
277
e08634c5
SH
278The F<Changes> file for an explanation of how to view exhaustive details on
279what changed.
44691e6f
AB
280
281The F<INSTALL> file for how to build Perl.
282
283The F<README> file for general stuff.
284
285The F<Artistic> and F<Copying> files for copyright information.
286
287=cut