This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix umask for mkstemp(3) calls
[perl5.git] / pod / perl5231delta.pod
CommitLineData
cf73ceda
MH
1=encoding utf8
2
3=head1 NAME
4
5perl5231delta - what is new for perl v5.23.1
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.23.0 release and the 5.23.1
10release.
11
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
15=head1 Core Enhancements
16
17=head2 Integer shift (C<< << >> and C<< >> >>) now more explicitly defined
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
28to do. For example, for the overshift a common C behavior is
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
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.
45
46=head2 Postfix dereferencing is no longer experimental
47
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.
54
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
61=head1 Incompatible Changes
62
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).
79
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
88=head1 Modules and Pragmata
89
90=head2 Updated Modules and Pragmata
91
92=over 4
93
94=item *
95
96The libnet distribution has been upgraded from version 3.06 to 3.07.
97
98=item *
99
100L<autodie> has been upgraded from version 2.27 to 2.29.
101
102=item *
103
104L<DynaLoader> has been upgraded from version 1.32 to 1.33.
105
106=item *
107
108L<Encode> has been upgraded from version 2.73 to 2.75.
109
110=item *
111
112L<encoding> has been upgraded from version 2.15 to 2.16.
113
114=item *
115
116L<feature> has been upgraded from version 1.41 to 1.42.
117
118=item *
119
120L<File::Path> has been upgraded from version 2.09 to 2.11.
121
122=item *
123
124L<Getopt::Long> has been upgraded from version 2.46 to 2.47.
125
126=item *
127
128L<I18N::Langinfo> has been upgraded from version 0.12 to 0.13.
129
130=item *
131
132L<IPC::Open3> has been upgraded from version 1.18 to 1.19.
133
134If a Perl exception was thrown from inside this module, the exception
135C<IPC::Open3> threw to the callers of C<open3> would have an irrelevant
136message derived from C<$!> which was in an undefined state, instead of the
137C<$@> message which triggers the failure path inside C<open3>.
138
139=item *
140
141L<Module::CoreList> has been upgraded from version 5.20150620 to 5.20150720.
142
143=item *
144
145L<Opcode> has been upgraded from version 1.32 to 1.33.
146
147=item *
148
149L<PerlIO::scalar> has been upgraded from version 0.22 to 0.23.
150
151=item *
152
153L<POSIX> has been upgraded from version 1.54 to 1.55.
154
155=item *
156
157L<Socket> has been upgraded from version 2.019 to 2.020.
158
159=item *
160
161L<Storable> has been upgraded from version 2.53 to 2.54.
162
163=item *
164
165L<Unicode::Collate> has been upgraded from version 1.12 to 1.14.
166
167=item *
168
169L<Unicode::Normalize> has been upgraded from version 1.18 to 1.19.
170
171=item *
172
173L<warnings> has been upgraded from version 1.32 to 1.33.
174
175=item *
176
177L<XS::Typemap> has been upgraded from version 0.13 to 0.14.
178
179=back
180
181=head1 Diagnostics
182
183The following additions or changes have been made to diagnostic output,
184including warnings and fatal error messages. For the complete list of
185diagnostic messages, see L<perldiag>.
186
187=head2 Changes to Existing Diagnostics
188
189=over 4
190
191=item *
192
193The C<printf> and C<sprintf> builtins are now more careful about the
194warnings they emit: argument reordering now disables the "redundant
195argument" warning in all cases; and invalid format strings are no longer
196treated as absorbing arguments (so "redundant argument" warnings can
197correctly be emitted by such code).
198
199=back
200
201=head1 Platform Support
202
203=head2 Platform-Specific Notes
204
205=over 4
206
207=item VMS
208
209=over
210
211=item *
212
213The minimum supported version of VMS is now v7.3-2, released in 2003. As a
214side effect of this change, VAX is no longer supported as the terminal
215release of OpenVMS VAX was v7.3 in 2001.
216
217=back
218
219=back
220
221=head1 Internal Changes
222
223=over 4
224
225=item *
226
227C<sv_catpvf> and related functions (including C<sv_vcatpvfn_flags> when
228called with a C<va_list> rather than an array of SV pointers) have never
229handled argument reordering. Attempts to reorder arguments now yield an
230exception, rather than being silently ignored.
231
232=back
233
234=head1 Selected Bug Fixes
235
236=over 4
237
238=item *
239
240A leak in the XS typemap caused one scalar to be leaked each time a C<FILE *>
241or a C<PerlIO *> was C<OUTPUT:>ed or imported to Perl, since perl 5.000. These
242particular typemap entries are thought to be extremely rarely used by XS
243modules. [perl #124181]
244
245=item *
246
247C<alarm()> and C<sleep()> will now warn if the argument is a negative number
248and return undef. Previously they would pass the negative value to the
249underlying C function which may have set up a timer with a surprising value.
250
251=back
252
253=head1 Acknowledgements
254
255Perl 5.23.1 represents approximately 4 weeks of development since Perl 5.23.0
256and contains approximately 8,400 lines of changes across 320 files from 22
257authors.
258
259Excluding auto-generated files, documentation and release tools, there were
260approximately 5,000 lines of changes to 140 .pm, .t, .c and .h files.
261
262Perl continues to flourish into its third decade thanks to a vibrant community
263of users and developers. The following people are known to have contributed the
264improvements that became Perl 5.23.1:
265
266Aaron Crane, Aristotle Pagaltzis, Chas. Owens, Chris 'BinGOs' Williams, Craig
267A. Berry, Daniel Dragan, David Mitchell, Father Chrysostomos, Herbert Breunung,
268H.Merijn Brand, James E Keenan, Jarkko Hietaniemi, Karen Etheridge, Karl
269Williamson, Leon Timmermans, Matthew Horsfall, Max Maischein, Rafael
270Garcia-Suarez, Ricardo Signes, Stanislaw Pusep, Steve Hay, Tony Cook.
271
272The list above is almost certainly incomplete as it is automatically generated
273from version control history. In particular, it does not include the names of
274the (very much appreciated) contributors who reported issues to the Perl bug
275tracker.
276
277Many of the changes included in this version originated in the CPAN modules
278included in Perl's core. We're grateful to the entire CPAN community for
279helping Perl to flourish.
280
281For a more complete list of all of Perl's historical contributors, please see
282the F<AUTHORS> file in the Perl source distribution.
283
284=head1 Reporting Bugs
285
286If you find what you think is a bug, you might check the articles recently
287posted to the comp.lang.perl.misc newsgroup and the perl bug database at
288L<https://rt.perl.org/> . There may also be information at
289L<http://www.perl.org/> , the Perl Home Page.
290
291If you believe you have an unreported bug, please run the L<perlbug> program
292included with your release. Be sure to trim your bug down to a tiny but
293sufficient test case. Your bug report, along with the output of C<perl -V>,
294will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
295
296If the bug you are reporting has security implications, which make it
297inappropriate to send to a publicly archived mailing list, then please send it
298to perl5-security-report@perl.org. This points to a closed subscription
299unarchived mailing list, which includes all the core committers, who will be
300able to help assess the impact of issues, figure out a resolution, and help
301co-ordinate the release of patches to mitigate or fix the problem across all
302platforms on which Perl is supported. Please only use this address for
303security issues in the Perl core, not for modules independently distributed on
304CPAN.
305
306=head1 SEE ALSO
307
308The F<Changes> file for an explanation of how to view exhaustive details on
309what changed.
310
311The F<INSTALL> file for how to build Perl.
312
313The F<README> file for general stuff.
314
315The F<Artistic> and F<Copying> files for copyright information.
316
317=cut