This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlfunc: clarify kill()'s return value
[perl5.git] / pod / perl5195delta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perl5195delta - what is new for perl v5.19.5
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.19.4 release and the 5.19.5
10 release.
11
12 If you are upgrading from an earlier release such as 5.19.3, first read
13 L<perl5194delta>, which describes differences between 5.19.3 and 5.19.4.
14
15 =head1 Core Enhancements
16
17 =head2 Unicode 6.3 now supported
18
19 Perl now supports and is shipped with Unicode 6.3 (though Perl may be
20 recompiled with any previous Unicode release as well).  A detailed list of
21 Unicode 6.3 changes is at L<http://www.unicode.org/versions/Unicode6.3.0/>.
22
23 =head2 Experimental Postfix Dereferencing
24
25 When the C<postderef> feature is in effect, the following syntactical
26 equivalencies are set up:
27
28   $sref->$*;  # same as ${ $sref }  # interpolates
29   $aref->@*;  # same as @{ $aref }  # interpolates
30   $href->%*;  # same as %{ $href }
31   $cref->&*;  # same as &{ $cref }
32   $gref->**;  # same as *{ $gref }
33
34   $gref->*{ $slot }; # same as *{ $gref }{ $slot }
35
36   $aref->@[ ... ];  # same as @$aref[ ... ]  # interpolates
37   $href->@{ ... };  # same as @$href{ ... }  # interpolates
38   $aref->%[ ... ];  # same as %$aref[ ... ]
39   $href->%{ ... };  # same as %$href{ ... }
40
41 Those marked as interpolating only interpolate if the associated
42 C<postderef_qq> feature is also enabled.  This feature is B<experimental> and
43 will trigger C<experimental::postderef>-category warnings when used, unless
44 they are suppressed.
45
46 For more information, consult L<the Postfix Dereference Syntax section of
47 perlref|perlref/Postfix Dereference Syntax>.
48
49 =head2 C<sub>s now take a C<prototype> attribute
50
51 When declaring or defining a C<sub>, the prototype can now be specified inside
52 of a C<prototype> attribute instead of in parens following the name.
53
54 For example, C<sub foo($$){}> could be rewritten as
55 C<sub foo : prototype($$){}>.
56
57 =head1 Incompatible Changes
58
59 =head2 Functions C<PerlIO_vsprintf> and C<PerlIO_sprintf> have been removed
60
61 These two functions, undocumented, unused in CPAN, and problematic, have been
62 removed.
63
64 =head1 Performance Enhancements
65
66 =over 4
67
68 =item *
69
70 Perl has an optimizer for regular expression patterns.  It analyzes the pattern
71 to find things such as the minimum length a string has to be to match, etc.  It
72 now better handles code points that are above the Latin1 range.
73
74 =back
75
76 =head1 Modules and Pragmata
77
78 =head2 Updated Modules and Pragmata
79
80 =over 4
81
82 =item *
83
84 L<attributes> has been upgraded from version 0.21 to 0.22.
85
86 Support has been added for the C<prototype> attribute.
87
88 =item *
89
90 L<autodie> has been upgraded from version 2.21 to 2.22.
91
92 No changes have been made to the installed code other than the version bump to
93 keep in sync with the latest CPAN release.
94
95 =item *
96
97 L<CPAN::Meta> has been upgraded from version 2.132620 to 2.132830.
98
99 L<CPAN::Meta::Prereqs> now has a C<merged_requirements> method for combining
100 requirements across multiple phases and types, and an invalid 'meta-spec' is no
101 longer a fatal error.
102
103 =item *
104
105 L<CPAN::Meta::Requirements> has been upgraded from version 2.123 to 2.125.
106
107 No changes have been made to the installed code other than the version bump to
108 keep in sync with the latest CPAN release.
109
110 =item *
111
112 L<CPAN::Meta::YAML> has been upgraded from version 0.008 to 0.010.
113
114 No material changes have been made to the installed code other than the version
115 bump to keep in sync with the latest CPAN release.
116
117 =item *
118
119 L<Cwd> has been upgraded from version 3.44 to 3.45.
120
121 An obsolete #define has been removed from the XS code.
122
123 =item *
124
125 L<ExtUtils::Install> has been upgraded from version 1.60 to 1.61.
126
127 Some POD formatting errors in the documentation have been corrected.
128
129 =item *
130
131 L<ExtUtils::MakeMaker> has been upgraded from version 6.76 to 6.80.
132
133 Numerous updates and bug fixes are incorporated.  See the F<Changes> file in
134 the CPAN distribution for full details.
135
136 =item *
137
138 L<feature> has been upgraded from version 1.33 to 1.34.
139
140 The new features C<postderef> and C<postderef_qq> have been added.
141
142 =item *
143
144 L<File::Fetch> has been upgraded from version 0.42 to 0.44.
145
146 No changes have been made to the installed code other than the version bump to
147 keep in sync with the latest CPAN release.
148
149 =item *
150
151 L<File::Glob> has been upgraded from version 1.21 to 1.22.
152
153 Since Perl 5.16, code that used C<glob> inside a thread had been
154 unintentionally sharing state between threads.  This has now been fixed.  [perl
155 #119897/#117823]
156
157 =item *
158
159 L<File::Temp> has been upgraded from version 0.2301 to 0.2304.
160
161 Required versions of other modules used are now listed more explicitly, L<base>
162 is now used instead of L<parent>, and L<Exporter> is no longer inherited from.
163
164 =item *
165
166 L<Getopt::Long> has been upgraded from version 2.41 to 2.42.
167
168 The floating point specifier C<name=f> no longer erroneously accepts values
169 like 1.2.3.  [cpan #88707]
170
171 =item *
172
173 L<HTTP::Tiny> has been upgraded from version 0.035 to 0.036.
174
175 No changes have been made to the installed code other than the version bump to
176 keep in sync with the latest CPAN release.
177
178 =item *
179
180 L<IPC::Cmd> has been upgraded from version 0.84 to 0.84_01.
181
182 No changes have been made to the installed code, but a test script has been
183 fixed for Solaris (and potentially other SVR* variants).
184
185 =item *
186
187 L<JSON::PP> has been upgraded from version 2.27202_01 to 2.27203.
188
189 A return/or precedence issue in C<_incr_parse> has been fixed.
190
191 =item *
192
193 L<List::Util> has been upgraded from version 1.32 to 1.35.
194
195 The list functions C<any>, C<all>, C<none>, C<notall> and C<product> have been
196 added, and C<reduce> and C<first> are now implemented even in the absence of
197 MULTICALL.
198
199 =item *
200
201 L<Module::CoreList> has been upgraded from version 2.99 to 3.00.
202
203 The list of Perl versions covered has been updated, %delta is now exported, and
204 a bug in C<is_core> whereby it wrongly assumed a linear list of releases has
205 been fixed.
206
207 =item *
208
209 L<Module::Metadata> has been upgraded from version 1.000018 to 1.000019.
210
211 Warnings are now disabled during version evaluation.
212
213 =item *
214
215 L<Parse::CPAN::Meta> has been upgraded from version 1.4407 to 1.4409.
216
217 No changes have been made to the installed code other than the version bump to
218 keep in sync with the latest CPAN release.
219
220 =item *
221
222 L<Perl::OSType> has been upgraded from version 1.005 to 1.006.
223
224 No changes have been made to the installed code other than the version bump to
225 keep in sync with the latest CPAN release.
226
227 =item *
228
229 L<PerlIO::scalar> has been upgraded from version 0.16 to 0.17.
230
231 An infinite loop when reading from a filehandle opened from a reference has
232 been fixed by first stringifying the reference.  [perl #119529]
233
234 =item *
235
236 The podlators modules have been upgraded from version 2.5.1 to 2.5.3.
237
238 Numerous updates and bug fixes are incorporated.  See the F<Changes> file in
239 the CPAN distribution for full details.
240
241 =item *
242
243 L<Test::Harness> has been upgraded from version 3.28 to 3.29.
244
245 All modules now use C<our> rather than C<use vars>, have C<use warnings>
246 enabled and C<use parent> instead of @ISA.
247
248 =item *
249
250 L<Test::Simple> has been upgraded from version 0.98_06 to 0.99.
251
252 Numerous updates and bug fixes are incorporated.  See the F<Changes> file in
253 the CPAN distribution for full details.
254
255 =item *
256
257 L<threads> has been upgraded from version 1.87 to 1.89.
258
259 The documentation of C<alarm> and C<_handle> has been updated.
260
261 =item *
262
263 L<Unicode::Normalize> has been upgraded from version 1.16 to 1.17.
264
265 The module now C<die>s if it cannot get Unicode code points using C<unpack>.
266 (There is already a similar C<die> if Unicode code points cannot be stringified
267 using C<pack>.)
268
269 =item *
270
271 L<Unicode::UCD> has been upgraded from version 0.54 to 0.55.
272
273 An internals-only change has been made to handle changes in format within some
274 character database tables.
275
276 =item *
277
278 L<warnings> has been upgraded from version 1.19 to 1.20.
279
280 The new warnings category C<experimental::postderef> has been added.
281
282 =back
283
284 =head1 Documentation
285
286 =head2 Changes to Existing Documentation
287
288 =head3 L<perlref>
289
290 =over 4
291
292 =item *
293
294 Documentation of the new postfix dereference syntax has been added.
295
296 =back
297
298 =head3 L<perlreguts>
299
300 =over 4
301
302 =item *
303
304 The documentation has been updated in the light of recent changes to
305 F<regcomp.c>.
306
307 =back
308
309 =head3 L<perlvar>
310
311 =over 4
312
313 =item *
314
315 Three L<English> variable names which have long been documented but do not
316 actually exist have been removed from the documentation.
317
318 =back
319
320 =head1 Diagnostics
321
322 The following additions or changes have been made to diagnostic output,
323 including warnings and fatal error messages.  For the complete list of
324 diagnostic messages, see L<perldiag>.
325
326 =head2 New Diagnostics
327
328 =head3 New Warnings
329
330 =over 4
331
332 =item *
333
334 L<Attribute prototype(%s) discards earlier prototype attribute in same sub|perldiag/"Attribute prototype(%s) discards earlier prototype attribute in same sub">
335
336 (W misc) A sub was declared as sub foo : prototype(A) : prototype(B) {}, for
337 example.  Since each sub can only have one prototype, the earlier
338 declaration(s) are discarded while the last one is applied.
339
340 =item *
341
342 L<Postfix dereference is experimental|perldiag/"Postfix dereference is experimental">
343
344 (S experimental::postderef) This warning is emitted if you use the experimental
345 postfix dereference syntax.  Simply suppress the warning if you want to use the
346 feature, but know that in doing so you are taking the risk of using an
347 experimental feature which may change or be removed in a future Perl version:
348
349     no warnings "experimental::postderef";
350     use feature "postderef", "postderef_qq";
351     $ref->$*;
352     $aref->@*;
353     $aref->@[@indices];
354     ... etc ...
355
356 =item *
357
358 L<Prototype '%s' overridden by attribute 'prototype(%s)' in %s|perldiag/"Prototype '%s' overridden by attribute 'prototype(%s)' in %s">
359
360 (W prototype) A prototype was declared in both the parentheses after the sub
361 name and via the prototype attribute.  The prototype in parentheses is useless,
362 since it will be replaced by the prototype from the attribute before it's ever
363 used.
364
365 =back
366
367 =head1 Utility Changes
368
369 =head3 L<a2p>
370
371 =over 4
372
373 =item *
374
375 A possible crash from an off-by-one error when trying to access before the
376 beginning of a buffer has been fixed.  [perl #120244]
377
378 =back
379
380 =head1 Testing
381
382 =over 4
383
384 =item *
385
386 The new prototype attribute syntax is tested by a new test script,
387 F<t/op/attrproto.t>.
388
389 =item *
390
391 The new test script F<t/io/closepid.t> tests that C<close> on the original of a
392 popen handle dupped to a standard handle no longer blocks internally on
393 C<waitpid(0, ...)>.
394
395 =item *
396
397 The new postfix dereference syntax is tested by a new test script,
398 F<t/op/postfixderef.t>.
399
400 =back
401
402 =head1 Platform Support
403
404 =head2 Platform-Specific Notes
405
406 =over 4
407
408 =item Windows
409
410 The Windows MinGW/gcc build was broken in Perl 5.19.4 for some recent versions
411 of gcc-4.8, including those from http://mingw-w64.sourceforge.net/ .  This has
412 now been fixed.  [perl #120236]
413
414 =back
415
416 =head1 Selected Bug Fixes
417
418 =over 4
419
420 =item *
421
422 C<last> no longer returns values that the same statement has accumulated so
423 far, fixing amongst other things the long-standing bug that C<push @a, last>
424 would try to return the @a, copying it like a scalar in the process and
425 resulting in the error, "Bizarre copy of ARRAY in last."  [perl #3112]
426
427 =item *
428
429 An optimization in Perl 5.18 made incorrect assumptions causing a bad
430 interaction with the L<Devel::CallParser> CPAN module.  This was partially
431 fixed in Perl 5.19.4, but the fix was not sufficient and another fault has now
432 been corrected.
433
434 =item *
435
436 In some cases, closing file handles opened to pipe to or from a process, which
437 had been duplicated into a standard handle, would call perl's internal waitpid
438 wrapper with a pid of zero.  With the fix for [perl #85228] this zero pid was
439 passed to C<waitpid>, possibly blocking the process.  This wait for process
440 zero no longer occurs.  [perl #119893]
441
442 =item *
443
444 The code that parses regex backrefs (or ambiguous backref/octals) such as \123
445 did a simple atoi(), which could wrap round to negative values on long digit
446 strings and cause segmentation faults.  This has now been fixed.  [perl
447 #119505]
448
449 =item *
450
451 C<select> used to ignore magic on the fourth (timeout) argument, leading to
452 effects such as C<select> blocking indefinitely rather than the expected sleep
453 time.  This has now been fixed.  [perl #120102]
454
455 =item *
456
457 The class name in C<for my class $foo> is now parsed correctly.  In the case of
458 the second character of the class name being followed by a digit (e.g. 'a1b')
459 this used to give the error "Missing $ on loop variable".  [perl #120112]
460
461 =back
462
463 =head1 Acknowledgements
464
465 Perl 5.19.5 represents approximately 4 weeks of development since Perl 5.19.4
466 and contains approximately 76,000 lines of changes across 710 files from 27
467 authors.
468
469 Perl continues to flourish into its third decade thanks to a vibrant community
470 of users and developers. The following people are known to have contributed the
471 improvements that became Perl 5.19.5:
472
473 Andy Dougherty, Brian Fraser, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn
474 Ilmari MannsÃ¥ker, Daniel Dragan, David Golden, David Mitchell, David Nicol,
475 Dominic Hargreaves, Eric Brine, Father Chrysostomos, Gideon Israel Dsouza, Hio,
476 James E Keenan, Jerry D. Hedden, Jesse Luehrs, Karl Williamson, Matthew
477 Horsfall, Max Maischein, Neil Bowers, Nicholas Clark, Peter Martini, Philip
478 Guenther, Ricardo Signes, Steve Hay, Tony Cook.
479
480 The list above is almost certainly incomplete as it is automatically generated
481 from version control history. In particular, it does not include the names of
482 the (very much appreciated) contributors who reported issues to the Perl bug
483 tracker.
484
485 Many of the changes included in this version originated in the CPAN modules
486 included in Perl's core. We're grateful to the entire CPAN community for
487 helping Perl to flourish.
488
489 For a more complete list of all of Perl's historical contributors, please see
490 the F<AUTHORS> file in the Perl source distribution.
491
492 =head1 Reporting Bugs
493
494 If you find what you think is a bug, you might check the articles recently
495 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
496 http://rt.perl.org/perlbug/ .  There may also be information at
497 http://www.perl.org/ , the Perl Home Page.
498
499 If you believe you have an unreported bug, please run the L<perlbug> program
500 included with your release.  Be sure to trim your bug down to a tiny but
501 sufficient test case.  Your bug report, along with the output of C<perl -V>,
502 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
503
504 If the bug you are reporting has security implications, which make it
505 inappropriate to send to a publicly archived mailing list, then please send it
506 to perl5-security-report@perl.org.  This points to a closed subscription
507 unarchived mailing list, which includes all the core committers, who will be
508 able to help assess the impact of issues, figure out a resolution, and help
509 co-ordinate the release of patches to mitigate or fix the problem across all
510 platforms on which Perl is supported.  Please only use this address for
511 security issues in the Perl core, not for modules independently distributed on
512 CPAN.
513
514 =head1 SEE ALSO
515
516 The F<Changes> file for an explanation of how to view exhaustive details on
517 what changed.
518
519 The F<INSTALL> file for how to build Perl.
520
521 The F<README> file for general stuff.
522
523 The F<Artistic> and F<Copying> files for copyright information.
524
525 =cut