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