Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
fc4c3cec | 5 | perldelta - what is new for perl v5.23.1 |
eabfc7bc | 6 | |
2cfe9b50 | 7 | =head1 DESCRIPTION |
eabfc7bc | 8 | |
fc4c3cec | 9 | This document describes differences between the 5.23.0 release and the 5.23.1 |
2cfe9b50 | 10 | release. |
eabfc7bc | 11 | |
fc4c3cec RS |
12 | If you are upgrading from an earlier release such as 5.22.0, first read |
13 | L<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 | |
19 | Negative shifts are reverse shifts: left shift becomes right shift, | |
20 | and right shift becomes left shift. | |
21 | ||
22 | Shifting by the number of bits in a native integer (or more) is zero, | |
23 | except when the "overshift" is right shifting a negative value under | |
24 | C<use integer>, in which case the result is -1 (arithmetic shift). | |
25 | ||
26 | Until now negative shifting and overshifting have been undefined | |
27 | because they have relied on whatever the C implementation happens | |
fb7e9cdd | 28 | to 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 | ||
35 | Now these behaviors are well-defined under Perl, regardless of what | |
36 | the underlying C implementation does. Note, however, that you cannot | |
fb7e9cdd JH |
37 | escape the native integer width, you need to know how far left you |
38 | can go. You can use for example: | |
39 | ||
40 | use Config; | |
41 | my $wordbits = $Config{uvsize} * 8; # Or $Config{uvsize} << 3. | |
42 | ||
43 | If you need a more bits on the left shift, you can use for example | |
44 | the 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 |
48 | Using the C<postderef> and C<postderef_qq> features no longer emits a |
49 | warning. Existing code that disables the C<experimental::postderef> warning | |
50 | category that they previously used will continue to work. The C<postderef> | |
51 | feature has no effect; all Perl code can use postfix dereferencing, | |
52 | regardless of what feature declarations are in scope. The C<5.24> feature | |
53 | bundle now includes the C<postderef_qq> feature. | |
7d380357 | 54 | |
0d610ac1 AC |
55 | =head2 printf and sprintf now allow reordered precision arguments |
56 | ||
57 | That is, C<< sprintf '|%.*2$|', 2, 3 >> now returns C<|002|>. This extends | |
58 | the existing reordering mechanism (which allows reordering for arguments | |
59 | that 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 | ||
65 | It was legal until now on ASCII platforms for variable names to contain | |
66 | non-graphical ASCII control characters (ordinals 0 through 31, and 127, | |
67 | which are the C0 controls and C<DELETE>). This usage has been | |
68 | deprecated since v5.20, and as of now causes a syntax error. The | |
69 | variables these names referred to are special, reserved by Perl for | |
70 | whatever use it may choose, now, or in the future. Each such variable | |
71 | has an alternative way of spelling it. Instead of the single | |
72 | non-graphic control character, a two character sequence beginning with a | |
73 | caret is used, like C<$^]> and C<${^GLOBAL_PHASE}>. Details are at | |
74 | L<perlvar>. It remains legal, though unwise and deprecated (raising a | |
75 | deprecation warning), to use certain non-graphic non-ASCII characters in | |
76 | variables names when not under S<C<use utf8>>. No code should do this, | |
77 | as all such variables are reserved by Perl, and Perl doesn't currently | |
78 | define any of them (but could at any time, without notice). | |
eabfc7bc | 79 | |
26230909 AC |
80 | =head2 The C<autoderef> feature has been removed |
81 | ||
82 | The experimental C<autoderef> feature (which allowed calling C<push>, | |
83 | C<pop>, C<shift>, C<unshift>, C<splice>, C<keys>, C<values>, and C<each> on | |
84 | a scalar argument) has been deemed unsuccessful. It has now been removed; | |
85 | trying to use the feature (or to disable the C<experimental::autoderef> | |
86 | warning it previously triggered) now yields an exception. | |
87 | ||
f282dc56 | 88 | =head1 Modules and Pragmata |
fc4c3cec | 89 | |
f282dc56 | 90 | =head2 Updated Modules and Pragmata |
fc4c3cec | 91 | |
f282dc56 | 92 | =over 4 |
fc4c3cec | 93 | |
f282dc56 | 94 | =item * |
fc4c3cec | 95 | |
f282dc56 | 96 | The libnet distribution has been upgraded from version 3.06 to 3.07. |
fc4c3cec | 97 | |
f282dc56 | 98 | =item * |
fc4c3cec | 99 | |
f282dc56 | 100 | L<autodie> has been upgraded from version 2.27 to 2.29. |
fc4c3cec | 101 | |
f282dc56 | 102 | =item * |
fc4c3cec | 103 | |
f282dc56 | 104 | L<DynaLoader> has been upgraded from version 1.32 to 1.33. |
fc4c3cec | 105 | |
f282dc56 | 106 | =item * |
fc4c3cec | 107 | |
f282dc56 | 108 | L<Encode> has been upgraded from version 2.73 to 2.75. |
eabfc7bc | 109 | |
f282dc56 | 110 | =item * |
eabfc7bc | 111 | |
f282dc56 | 112 | L<encoding> has been upgraded from version 2.15 to 2.16. |
eabfc7bc | 113 | |
f282dc56 | 114 | =item * |
eabfc7bc | 115 | |
f282dc56 | 116 | L<feature> has been upgraded from version 1.41 to 1.42. |
eabfc7bc | 117 | |
73d6481e | 118 | =item * |
eabfc7bc | 119 | |
f282dc56 | 120 | L<File::Path> has been upgraded from version 2.09 to 2.11. |
eabfc7bc | 121 | |
f282dc56 | 122 | =item * |
eabfc7bc | 123 | |
f282dc56 | 124 | L<Getopt::Long> has been upgraded from version 2.46 to 2.47. |
eabfc7bc RS |
125 | |
126 | =item * | |
127 | ||
f282dc56 | 128 | L<I18N::Langinfo> has been upgraded from version 0.12 to 0.13. |
dc013420 SH |
129 | |
130 | =item * | |
131 | ||
c85f23b2 DD |
132 | L<IPC::Open3> has been upgraded from version 1.18 to 1.19. |
133 | ||
134 | If a Perl exception was thrown from inside this module, the exception | |
779c45ce | 135 | C<IPC::Open3> threw to the callers of C<open3> would have an irrelevant |
c85f23b2 DD |
136 | message derived from C<$!> which was in an undefined state, instead of the |
137 | C<$@> message which triggers the failure path inside C<open3>. | |
eabfc7bc | 138 | |
6962a25d SH |
139 | =item * |
140 | ||
f282dc56 MH |
141 | L<Module::CoreList> has been upgraded from version 5.20150620 to 5.20150720. |
142 | ||
143 | =item * | |
144 | ||
145 | L<Opcode> has been upgraded from version 1.32 to 1.33. | |
146 | ||
147 | =item * | |
148 | ||
149 | L<PerlIO::scalar> has been upgraded from version 0.22 to 0.23. | |
150 | ||
151 | =item * | |
152 | ||
153 | L<POSIX> has been upgraded from version 1.54 to 1.55. | |
154 | ||
155 | =item * | |
156 | ||
157 | L<Socket> has been upgraded from version 2.019 to 2.020. | |
158 | ||
159 | =item * | |
160 | ||
161 | L<Storable> has been upgraded from version 2.53 to 2.54. | |
162 | ||
163 | =item * | |
164 | ||
6962a25d SH |
165 | L<Unicode::Collate> has been upgraded from version 1.12 to 1.14. |
166 | ||
0b8e4842 SH |
167 | =item * |
168 | ||
169 | L<Unicode::Normalize> has been upgraded from version 1.18 to 1.19. | |
170 | ||
f282dc56 | 171 | =item * |
eabfc7bc | 172 | |
f282dc56 | 173 | L<warnings> has been upgraded from version 1.32 to 1.33. |
374c951f SH |
174 | |
175 | =item * | |
176 | ||
f282dc56 | 177 | L<XS::Typemap> has been upgraded from version 0.13 to 0.14. |
e586de20 | 178 | |
fc4c3cec | 179 | =back |
e586de20 | 180 | |
fc4c3cec | 181 | =head1 Diagnostics |
b7b593d8 | 182 | |
fc4c3cec RS |
183 | The following additions or changes have been made to diagnostic output, |
184 | including warnings and fatal error messages. For the complete list of | |
185 | diagnostic messages, see L<perldiag>. | |
b7b593d8 | 186 | |
fc4c3cec RS |
187 | =head2 Changes to Existing Diagnostics |
188 | ||
fc4c3cec | 189 | =over 4 |
4b951711 TC |
190 | |
191 | =item * | |
192 | ||
0d610ac1 AC |
193 | The C<printf> and C<sprintf> builtins are now more careful about the |
194 | warnings they emit: argument reordering now disables the "redundant | |
195 | argument" warning in all cases; and invalid format strings are no longer | |
196 | treated as absorbing arguments (so "redundant argument" warnings can | |
197 | correctly be emitted by such code). | |
eabfc7bc | 198 | |
fc4c3cec | 199 | =back |
eabfc7bc | 200 | |
73d6481e | 201 | =head1 Platform Support |
eabfc7bc | 202 | |
fc4c3cec | 203 | =head2 Platform-Specific Notes |
9c0328ac | 204 | |
fc4c3cec RS |
205 | =over 4 |
206 | ||
7d380357 | 207 | =item VMS |
fc4c3cec | 208 | |
7d380357 RS |
209 | =over |
210 | ||
211 | =item * | |
212 | ||
213 | The minimum supported version of VMS is now v7.3-2, released in 2003. As a | |
214 | side effect of this change, VAX is no longer supported as the terminal | |
215 | release of OpenVMS VAX was v7.3 in 2001. | |
216 | ||
217 | =back | |
eabfc7bc | 218 | |
2cfe9b50 | 219 | =back |
eabfc7bc | 220 | |
fc4c3cec RS |
221 | =head1 Internal Changes |
222 | ||
2cfe9b50 | 223 | =over 4 |
eabfc7bc RS |
224 | |
225 | =item * | |
226 | ||
0d610ac1 AC |
227 | C<sv_catpvf> and related functions (including C<sv_vcatpvfn_flags> when |
228 | called with a C<va_list> rather than an array of SV pointers) have never | |
229 | handled argument reordering. Attempts to reorder arguments now yield an | |
230 | exception, rather than being silently ignored. | |
eabfc7bc | 231 | |
fc4c3cec | 232 | =back |
302ef3d4 | 233 | |
fc4c3cec | 234 | =head1 Selected Bug Fixes |
302ef3d4 | 235 | |
fc4c3cec | 236 | =over 4 |
eabfc7bc | 237 | |
73d6481e | 238 | =item * |
eabfc7bc | 239 | |
7ed1d857 DD |
240 | A leak in the XS typemap caused one scalar to be leaked each time a C<FILE *> |
241 | or a C<PerlIO *> was C<OUTPUT:>ed or imported to Perl, since perl 5.000. These | |
242 | particular typemap entries are thought to be extremely rarely used by XS | |
243 | modules. [perl #124181] | |
eabfc7bc | 244 | |
fc4c3cec | 245 | =item * |
2a7a05b4 | 246 | |
2ad3e690 MH |
247 | C<alarm()> and C<sleep()> will now warn if the argument is a negative number |
248 | and return undef. Previously they would pass the negative value to the | |
249 | underlying C function which may have set up a timer with a surprising value. | |
30aa8e3f | 250 | |
fc4c3cec | 251 | =back |
30aa8e3f | 252 | |
fc4c3cec | 253 | =head1 Acknowledgements |
2a7a05b4 | 254 | |
f282dc56 MH |
255 | Perl 5.23.1 represents approximately 4 weeks of development since Perl 5.23.0 |
256 | and contains approximately 8,400 lines of changes across 320 files from 22 | |
257 | authors. | |
258 | ||
259 | Excluding auto-generated files, documentation and release tools, there were | |
260 | approximately 5,000 lines of changes to 140 .pm, .t, .c and .h files. | |
261 | ||
262 | Perl continues to flourish into its third decade thanks to a vibrant community | |
263 | of users and developers. The following people are known to have contributed the | |
264 | improvements that became Perl 5.23.1: | |
265 | ||
266 | Aaron Crane, Aristotle Pagaltzis, Chas. Owens, Chris 'BinGOs' Williams, Craig | |
267 | A. Berry, Daniel Dragan, David Mitchell, Father Chrysostomos, Herbert Breunung, | |
268 | H.Merijn Brand, James E Keenan, Jarkko Hietaniemi, Karen Etheridge, Karl | |
269 | Williamson, Leon Timmermans, Matthew Horsfall, Max Maischein, Rafael | |
270 | Garcia-Suarez, Ricardo Signes, Stanislaw Pusep, Steve Hay, Tony Cook. | |
271 | ||
272 | The list above is almost certainly incomplete as it is automatically generated | |
273 | from version control history. In particular, it does not include the names of | |
274 | the (very much appreciated) contributors who reported issues to the Perl bug | |
275 | tracker. | |
276 | ||
277 | Many of the changes included in this version originated in the CPAN modules | |
278 | included in Perl's core. We're grateful to the entire CPAN community for | |
279 | helping Perl to flourish. | |
2cfe9b50 | 280 | |
f282dc56 MH |
281 | For a more complete list of all of Perl's historical contributors, please see |
282 | the F<AUTHORS> file in the Perl source distribution. | |
f5b73711 | 283 | |
44691e6f AB |
284 | =head1 Reporting Bugs |
285 | ||
e08634c5 SH |
286 | If you find what you think is a bug, you might check the articles recently |
287 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
fc4c3cec RS |
288 | L<https://rt.perl.org/> . There may also be information at |
289 | L<http://www.perl.org/> , the Perl Home Page. | |
44691e6f | 290 | |
e08634c5 SH |
291 | If you believe you have an unreported bug, please run the L<perlbug> program |
292 | included with your release. Be sure to trim your bug down to a tiny but | |
293 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
294 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
44691e6f AB |
295 | |
296 | If the bug you are reporting has security implications, which make it | |
e08634c5 SH |
297 | inappropriate to send to a publicly archived mailing list, then please send it |
298 | to perl5-security-report@perl.org. This points to a closed subscription | |
299 | unarchived mailing list, which includes all the core committers, who will be | |
300 | able to help assess the impact of issues, figure out a resolution, and help | |
f9001595 | 301 | co-ordinate the release of patches to mitigate or fix the problem across all |
e08634c5 SH |
302 | platforms on which Perl is supported. Please only use this address for |
303 | security issues in the Perl core, not for modules independently distributed on | |
304 | CPAN. | |
44691e6f AB |
305 | |
306 | =head1 SEE ALSO | |
307 | ||
e08634c5 SH |
308 | The F<Changes> file for an explanation of how to view exhaustive details on |
309 | what changed. | |
44691e6f AB |
310 | |
311 | The F<INSTALL> file for how to build Perl. | |
312 | ||
313 | The F<README> file for general stuff. | |
314 | ||
315 | The F<Artistic> and F<Copying> files for copyright information. | |
316 | ||
317 | =cut |