This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Finalise perldelta
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
28ee95bc 5perldelta - what is new for perl v5.19.6
e128ab2c 6
4eabcf70 7=head1 DESCRIPTION
6db9054f 8
28ee95bc 9This document describes differences between the 5.19.5 release and the 5.19.6
e08634c5 10release.
6db9054f 11
28ee95bc
SH
12If you are upgrading from an earlier release such as 5.19.4, first read
13L<perl5195delta>, which describes differences between 5.19.4 and 5.19.5.
a9c9e371 14
28ee95bc 15=head1 Core Enhancements
12ea29d9 16
05d9825a
FC
17=head2 $a and $b warnings exemption
18
19The special variables $a and $b, used in C<sort>, are now exempt from "used
20once" warnings, even where C<sort> is not used. This makes it easier for
21CPAN modules to provide functions using $a and $b for similar purposes.
22[perl #120462]
23
28ee95bc 24=head1 Deprecations
6ffbec2c 25
28ee95bc 26=head2 Module removals
6ffbec2c 27
28ee95bc
SH
28The following modules will be removed from the core distribution in a
29future release, and will at that time need to be installed from CPAN.
30Distributions on CPAN which require these modules will need to list them as
31prerequisites.
1944fb52 32
28ee95bc
SH
33The core versions of these modules will now issue C<"deprecated">-category
34warnings to alert you to this fact. To silence these deprecation warnings,
35install the modules in question from CPAN.
1944fb52 36
28ee95bc
SH
37Note that these are (with rare exceptions) fine modules that you are encouraged
38to continue to use. Their disinclusion from core primarily hinges on their
39necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
40not usually on concerns over their design.
1944fb52 41
28ee95bc 42=over
1981f814 43
23b56f29 44=item L<Package::Constants>
1981f814 45
28ee95bc 46=back
229563a9 47
28ee95bc 48=head1 Performance Enhancements
f90332ac 49
28ee95bc 50=over 4
f90332ac
SH
51
52=item *
53
3a4b75f8
FC
54Constant hash key lookups (C<$hash{key}> as opposed to C<$hash{$key}>) have
55long had the internal hash value computed at compile time, to speed up
56lookup. This optimisation has only now been applied to hash slices as
57well.
f90332ac 58
3f0a0d6e
TC
59=item *
60
61Combined C<and> and C<or> operators in void context, like those
62generated for C<< unless ($a && $b) >> and C<< if ($a || b) >> now
63short circuit directly to the end of the statement. [perl #120128]
64
28ee95bc 65=back
f90332ac 66
28ee95bc 67=head1 Modules and Pragmata
f90332ac 68
28ee95bc 69=head2 Updated Modules and Pragmata
f90332ac 70
28ee95bc 71=over 4
f90332ac
SH
72
73=item *
74
b32cf70e
CBW
75L<Archive::Tar> has been upgraded from version 1.92 to 1.96.
76
77=item *
78
79L<AutoLoader> has been upgraded from version 5.73 to 5.74.
80
81=item *
82
033960a1
FC
83L<B> has been upgraded from version 1.46 to 1.47.
84
85C<< B::PMOP->precomp >> now preserves the internal UTF8 flag correctly, so
86chr 256 remains chr 256, instead of turning into "\xc4\x80". This allows
87L<B::Deparse> to deparse Unicode regular expression correctly.
88[perl #120182]
89
ea3da4ad
TC
90C<< B::HV->ARRAY >> now preserves the UTF8 flag on returned hash keys.
91[perl #120535]
92
033960a1
FC
93=item *
94
23d5aa59
FC
95L<B::Concise> has been upgraded from version 0.99 to 0.991.
96
97B<-debug> output now includes C<op_other> pointers.
98
99=item *
100
3b5f976f
FC
101L<B::Deparse> has been upgraded from version 1.23 to 1.24.
102
103C<s//\(3)/e> is now deparsed in a way that does not issue warnings when
104parsed again. [perl #119807]
105
58731871
FC
106C<glob(my $x)> is now deparsed correctly, rather than as C<< <my $x> >> or
107similar.
108
109C<CORE::glob> is now deparsed correctly with the CORE:: prefix when there
110is a subroutine named "glob".
111
3b5f976f
FC
112=item *
113
b32cf70e
CBW
114L<B::Debug> has been upgraded from version 1.18 to 1.19.
115
116=item *
117
118L<bignum> has been upgraded from version 0.36 to 0.37.
119
120=item *
121
122L<Compress::Raw::Bzip2> has been upgraded from version 2.062 to 2.063.
123
124=item *
125
126L<Compress::Raw::Zlib> has been upgraded from version 2.062 to 2.063.
127
128=item *
129
130L<constant> has been upgraded from version 1.28 to 1.29.
131
132=item *
133
134L<DB_File> has been upgraded from version 1.829 to 1.831.
135
136=item *
137
138L<ExtUtils::MakeMaker> has been upgraded from version 6.80 to 6.82.
139
140=item *
141
142L<HTTP::Tiny> has been upgraded from version 0.036 to 0.038.
143
144=item *
145
146L<IO> has been upgraded from version 1.29 to 1.30.
147
148=item *
149
12cd6c6b
TC
150L<IO::Select> has been upgraded from version 1.21 to 1.22.
151
152Removing a closed file handle from an IO::Select object now correctly
153updates its internal state and returns the correct value. [perl #75156]
154
155=item *
156
1fe654c9
CBW
157L<Locale::Maketext> has been upgraded from version 1.24 to 1.25.
158
159An issue with escaped backslashes if the literal is compiled as
160function argument has been resolved.
161
162=item *
163
b32cf70e
CBW
164L<IPC::Cmd> has been upgraded from version 0.84_01 to 0.90.
165
166=item *
167
168L<Module::Build> has been upgraded from version 0.4007 to 0.4202.
169
170NOTE: L<Module::Build> is deprecated and may be removed from a future version of Perl.
171
172=item *
173
494bd897
SH
174L<Module::CoreList> has been upgraded from version 3.00 to 3.01.
175
176The list of Perl versions covered has been updated.
f90332ac 177
22f9c36a
FC
178=item *
179
b32cf70e
CBW
180L<Package::Constants> has been upgraded from version 0.02 to 0.04.
181
182NOTE: L<Package::Constants> is deprecated and may be removed from a future version of Perl.
183
184=item *
185
f63abf92
FC
186L<PerlIO::scalar> has been upgraded from version 0.17 to 0.18.
187
188A bug fix in 0.17 caused references to be stringified as soon as a handle
189to it was opened, even if it was opened only for reading. It also croaked
190on read-only references. This has been fixed. [perl #119529]
191
192=item *
193
b32cf70e
CBW
194L<Socket> has been upgraded from version 2.012 to 2.013.
195
196=item *
197
198L<Term::Cap> has been upgraded from version 1.13 to 1.15.
199
200=item *
201
202L<Test::Harness> has been upgraded from version 3.29 to 3.30.
203
204=item *
205
206L<Test::Simple> has been upgraded from version 0.99 to 1.001002.
207
208=item *
209
22f9c36a
FC
210L<Tie::StdHandle> has been upgraded from version 4.3 to 4.4.
211
212It no longer prints C<$\> twice. [perl #120202]
213
e61cab1a
FC
214It no longer ignores the offset passed to C<syswrite>.
215
b32cf70e
CBW
216=item *
217
218L<threads> has been upgraded from version 1.89 to 1.90.
219
220=item *
221
222L<threads::shared> has been upgraded from version 1.44 to 1.45.
223
224=item *
225
226L<Unicode::Collate> has been upgraded from version 0.99 to 1.02.
227
28ee95bc 228=back
f90332ac 229
28ee95bc 230=head1 Documentation
f90332ac 231
28ee95bc 232=head2 Changes to Existing Documentation
be08498a 233
28ee95bc 234=over 4
52102bb4
SH
235
236=item *
237
1fe654c9 238L<perlhacktips> has been updated to include some more examples of C<gdb> usage.
d477c82b 239
1fe654c9 240=item *
f90332ac 241
1fe654c9 242L<perlfunc>:
f90332ac 243
1fe654c9 244C<each>, clarify hash "modify while iterating".
f90332ac 245
1fe654c9 246C<pack>, the documentation for verbatim tables has been clarified.
f90332ac
SH
247
248=item *
249
1fe654c9 250L<perlre>, the documentation for C</x> and C<(?# comment)> has been expanded and clarified.
b7c730ff 251
befb5359
SH
252=item *
253
1fe654c9 254L<perllexwarn>, a note has been added to users of C<FATAL> warnings of the risk of upgrades.
befb5359 255
28ee95bc 256=back
befb5359 257
1fe654c9 258=head1 Diagnostics
f90332ac 259
1fe654c9 260=head2 Changes to Existing Diagnostics
411e93ce 261
28ee95bc 262=over 4
411e93ce
SH
263
264=item *
265
c7a31d00
FC
266L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">:
267
268This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to
269be in scalar context at compile time. Previously it was worded "Scalar
270value %%s[%s] better written as $%s[%s]".
f90332ac 271
8adfd064
SH
272=item *
273
1fe654c9 274L<Switch condition not recognized in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Switch condition not recognized in regex; marked by <-- HERE in m/%s/">:
f90332ac 275
1fe654c9
CBW
276The description for this diagnostic has been extended to cover all cases where the warning may occur.
277Issues with the positioning of the arrow indicator have also been resolved.
7c90aec3
SH
278
279=back
280
28ee95bc 281=head1 Testing
7c90aec3 282
2d8e8368
SH
283=over 4
284
285=item *
286
768cd72c 287F<ext/File-Find/t/find.t> has been converted from manual C<print>
eca6f539
JK
288statements to Test::More functions. Each test now has a description.
289[perl #120503]
2d8e8368
SH
290
291=back
292
28ee95bc 293=head1 Platform Support
1981f814 294
28ee95bc 295=head2 New Platforms
2b6950bd 296
28ee95bc 297=over 4
1981f814 298
79a18634 299=item Synology
1981f814 300
79a18634
MB
301Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative
302cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ
303P1022 ppc - e500v2) not meant for workstations or development. These boxes
304should build now. The basic problems are the non-standard location for tools.
1981f814 305
12dcbffb 306=back
1310e590 307
28ee95bc 308=head2 Platform-Specific Notes
40d779aa 309
28ee95bc 310=over 4
40d779aa 311
3e7c2d43
SH
312=item Windows
313
314Support for building with Visual C++ 2013 has been added. There are currently
315two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which
316will hopefully be resolved soon.
317
a48cc4c4
DD
318Experimental support for building with Intel C++ Compiler has been added. Only
319the nmake makefile (win32/Makefile) can be used. A "nmake test" will not pass
320at this time due to "cpan/CGI/t/url.t".
321
f4a01e9c 322=item WinCE
40d779aa 323
f4a01e9c
SH
324Perl can now be built in one shot with no user intervention on WinCE by running
325C<nmake -f Makefile.ce all>.
326
327Support for building with EVC (Embedded Visual C++) 4 has been restored. Perl
328can also be built using Smart Devices for Visual C++ 2005 or 2008.
eaed284b 329
ba03bc34 330=back
0335212c 331
28ee95bc 332=head1 Internal Changes
0335212c 333
09f4604f 334=over 4
efcbb8b2 335
28ee95bc 336=item *
846aaad8 337
3895ffc7
FC
338Compiling with C<-Accflags=-PERL_BOOL_AS_CHAR> now allows C99 and C++
339compilers to emulate the aliasing of C<bool> to C<char> that perl does for
340C89 compilers. [perl #120314]
846aaad8 341
ba03bc34 342=back
efcbb8b2 343
ba03bc34 344=head1 Selected Bug Fixes
912a9a8f 345
28ee95bc 346=over 4
04380912
SH
347
348=item *
349
894b53fb
FC
350Perl 5.18.0 accidentally disallowed C<-bareword> under C<use strict> and
351C<use integer>. This has been fixed. [perl #120288]
508c1ff6 352
10513103
FC
353=item *
354
355C<-a> at the start of a line (or a hyphen with any single letter that is
356not a filetest operator) no longer produces an erroneous 'Use of "-a"
357without parentheses is ambiguous' warning. [perl #120288]
358
7269fba0
FC
359=item *
360
361Lvalue context is now properly propagated into bare blocks and C<if> and
362C<else> blocks in lvalue subroutines. Previously, arrays and hashes would
363sometimes incorrectly be flattened when returned in lvalue list context, or
364"Bizarre copy" errors could occur. [perl #119797]
365
9deee734
FC
366=item *
367
368Lvalue context is now propagated to the branches of C<||> and C<&&> (and
369their alphabetic equivalents, C<or> and C<and>). This means
370C<foreach (pos $x || pos $y) {...}> now allows C<pos> to be modified
371through $_.
372
9b3f1466
FC
373=item *
374
375C<*DB::DB = sub {} if 0> no longer stops Perl's debugging mode from finding
376C<DB::DB> subs declared thereafter.
377
fafe36c8
FC
378=item *
379
a766e67d
FC
380C<stat> and C<readline> remember the last handle used; the former
381for the special C<_> filehandle, the latter for C<${^LAST_FH}>.
382C<eval "*foo if 0"> where *foo was the last handle passed to C<stat>
383or C<readline> could cause that handle to be forgotten if the
fafe36c8
FC
384handle were not opened yet. This has been fixed.
385
326cf246
FC
386=item *
387
388Various cases of C<delete $::{a}>, C<delete $::{ENV}> etc. causing a crash
389have been fixed. [perl #54044]
390
336b9946
FC
391=item *
392
393Assigning another typeglob to C<*^R> no longer makes the regular expression
394engine crash.
395
e4e776a2
FC
396=item *
397
398C<%{'_<...'}> hashes now set breakpoints on the corresponding C<@{'_<...'}>
399rather than whichever array C<@DB::dbline> is aliased to. [perl #119799]
400
d4fec79a
FC
401=item *
402
403Setting C<$!> to EACCESS before calling C<require> could affect
404C<require>'s behaviour. This has been fixed.
405
b34b8721
FC
406=item *
407
408The "Can't use \1 to mean $1 in expression" warning message now only occurs
409on the right-hand (replacement) part of a substitution. Formerly it could
410happen in code embedded in the left-hand side, or in any other quote-like
411operator.
412
73f74d29
FC
413=item *
414
415The C<\N> regular expression escape, when used without the curly braces (to
416mean C<[^\n]>), was ignoring a following C<*> if followed by whitespace
417under /x. It had been this way since C<\N> to mean C<[^\n]> was introduced
418in 5.12.0.
419
49c74b45
FC
420=item *
421
422Blessing into a reference (C<bless $thisref, $thatref>) has long been
423disallowed, but magical scalars for the second like C<$/> and those tied
424were exempt. They no longer are. [perl #119809]
425
3db3aac2
FC
426=item *
427
428Blessing into a reference was accidentally allowed in 5.18 if the class
429argument were a blessed reference with stale method caches (i.e., whose
430class had had subs defined since the last method call). They are
431disallowed once more, as in 5.16.
432
1859dc90
FC
433=item *
434
435An undefined lexical sub used as an inherited method no longer crashes.
436
ed935cbf
FC
437=item *
438
439C<< $x->{key} >> where $x was declared as C<my Class $x> no longer crashes
440if a Class::FIELDS subroutine stub has been declared.
441
62ab5032
FC
442=item *
443
444C<@$obj{'key'}> and C<${$obj}{key}> used to be exempt from compile-time
445field checking ("No such class field"; see L<fields>) but no longer are.
446
ec52a187
FC
447=item *
448
79b30ab2
FC
449That compile-time field checking also applies now to the C<%$obj{'key'}>
450syntax, added recently in Perl 5.19.4.
451
452=item *
453
ec52a187
FC
454A nonexistent array element with a large index passed to a subroutine that
455ties the array and then tries to access the element no longer results in a
456crash.
457
d84b9c6a
FC
458=item *
459
460Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
461array indices crash when the current package is a tied array class.
462
c9a5c63e
FC
463=item *
464
465Declaring a C<require>, C<glob>, or C<do> subroutine stub in the
466CORE::GLOBAL:: package no longer makes compilation of calls to the
467corresponding functions crash.
468
4105c9c0
FC
469=item *
470
471Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
472but has now been fixed.
473
ec636b69
FC
474=item *
475
476When C<`...`> or C<qx/.../> calls a C<readpipe> override, double-quotish
477interpolation now happens, as is the case when there is no override.
478Previously, the presence of an override would make these quote-like
479operators act like C<q{}>, suppressing interpolation. [perl #115330]
480
481=item *
482
483C<<<`...`> here-docs (with backticks as the delimiters) now call
484C<readpipe> overrides. [perl #119827]
485
a7b82b2f
FC
486=item *
487
488The presence of a lexical sub named "CORE" no longer stops the CORE::
489prefix from working.
490
03b7e81e
FC
491=item *
492
493C<&CORE::exit()> and C<&CORE::die()> now respect L<vmsish> hints.
494
d0fcfa00
FC
495=item *
496
497Undefining a glob that triggers a DESTROY method that undefines the same
498glob is now safe. It used to produce "Attempt to free unreferenced glob
499pointer" warnings and leak memory.
500
424623a2
FC
501=item *
502
503If subroutine redefinition (C<eval 'sub foo{}'> or C<newXS> for XS code)
504triggers a DESTROY method on the sub that is being redefined, and that
505method assigns a subroutine to the same slot (C<*foo = sub {}>), C<$_[0]>
e2aa288a
FC
506is no longer left pointing to a freed scalar. Now DESTROY is delayed until
507the new subroutine has been installed.
424623a2 508
812998f1
FC
509=item *
510
511C<s///>, C<tr///> and C<y///> now work when a wide character is used as the
512delimiter. [perl #120463]
513
34e8ce87
SH
514=item *
515
516On Windows, perl no longer calls CloseHandle() on a socket handle. This makes
517debugging easier on Windows by removing certain irrelevant bad handle
f02f05df
DD
518exceptions. It also fixes a race condition that made socket functions randomly
519fail in a Perl process with multiple OS threads, and possible test failures in
34e8ce87
SH
520F<dist/IO/t/cachepropagate-tcp.t>. [perl #120091/118059]
521
4c99f16d
FC
522=item *
523
524Some cases of unterminated (?...) sequences in regular expressions (e.g.,
525C</(?</>) have been fixed to produce the proper error message instead of
526"panic: memory wrap". Other cases (e.g., C</(?(/>) have yet to be fixed.
527
1fe654c9 528=item *
508c1ff6 529
1fe654c9
CBW
530Strange vars like ties, overloads, or stringified refs (and in recent
531perls, pure NOK vars) would generally do the wrong thing in formats
532when the var is treated as a string and repeatedly chopped, as in
533^<<<~~ and similar. This has now been resolved.
7492c6c5 534
1fe654c9 535=back
254a1e67 536
1fe654c9 537=head1 Known Problems
254a1e67 538
28ee95bc 539=over 4
254a1e67
SH
540
541=item *
542
a7b82b2f
FC
543C<do CORE()> used to call a sub named "CORE" and treat its return value as
544a file name to execute. A bug fix inadvertently caused it to be
545interpreted as the deprecated "do-SUB" construct. (Yes, C<do
546I<bareword>()> is inconsistent.) This will likely be changed back.
7492c6c5 547
09f4604f 548=back
cfbe45f9 549
28ee95bc 550=head1 Acknowledgements
c84b5497 551
b32cf70e
CBW
552Perl 5.19.6 represents approximately 4 weeks of development since Perl 5.19.5
553and contains approximately 88,000 lines of changes across 630 files from 24
554authors.
555
556Perl continues to flourish into its third decade thanks to a vibrant community
557of users and developers. The following people are known to have contributed the
558improvements that became Perl 5.19.6:
559
560Anno Siegel, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David
561Mitchell, Father Chrysostomos, François Perrad, H.Merijn Brand, James E
562Keenan, Jerry D. Hedden, Karen Etheridge, Karl Williamson, Kevin Falcone, Lukas
563Mai, Marc Simpson, Matthew Horsfall, Peter Martini, Petr Písař, Reini Urban,
564Steve Hay, Tom Hukins, Tony Cook, Victor Efimov, Yves Orton.
565
566The list above is almost certainly incomplete as it is automatically generated
567from version control history. In particular, it does not include the names of
568the (very much appreciated) contributors who reported issues to the Perl bug
569tracker.
570
571Many of the changes included in this version originated in the CPAN modules
572included in Perl's core. We're grateful to the entire CPAN community for
573helping Perl to flourish.
c84b5497 574
b32cf70e
CBW
575For a more complete list of all of Perl's historical contributors, please see
576the F<AUTHORS> file in the Perl source distribution.
f5b73711 577
44691e6f
AB
578=head1 Reporting Bugs
579
e08634c5
SH
580If you find what you think is a bug, you might check the articles recently
581posted to the comp.lang.perl.misc newsgroup and the perl bug database at
582http://rt.perl.org/perlbug/ . There may also be information at
583http://www.perl.org/ , the Perl Home Page.
44691e6f 584
e08634c5
SH
585If you believe you have an unreported bug, please run the L<perlbug> program
586included with your release. Be sure to trim your bug down to a tiny but
587sufficient test case. Your bug report, along with the output of C<perl -V>,
588will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
589
590If the bug you are reporting has security implications, which make it
e08634c5
SH
591inappropriate to send to a publicly archived mailing list, then please send it
592to perl5-security-report@perl.org. This points to a closed subscription
593unarchived mailing list, which includes all the core committers, who will be
594able to help assess the impact of issues, figure out a resolution, and help
f9001595 595co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
596platforms on which Perl is supported. Please only use this address for
597security issues in the Perl core, not for modules independently distributed on
598CPAN.
44691e6f
AB
599
600=head1 SEE ALSO
601
e08634c5
SH
602The F<Changes> file for an explanation of how to view exhaustive details on
603what changed.
44691e6f
AB
604
605The F<INSTALL> file for how to build Perl.
606
607The F<README> file for general stuff.
608
609The F<Artistic> and F<Copying> files for copyright information.
610
611=cut