This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Release engineering work on 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
033960a1
FC
75L<B> has been upgraded from version 1.46 to 1.47.
76
77C<< B::PMOP->precomp >> now preserves the internal UTF8 flag correctly, so
78chr 256 remains chr 256, instead of turning into "\xc4\x80". This allows
79L<B::Deparse> to deparse Unicode regular expression correctly.
80[perl #120182]
81
ea3da4ad
TC
82C<< B::HV->ARRAY >> now preserves the UTF8 flag on returned hash keys.
83[perl #120535]
84
033960a1
FC
85=item *
86
23d5aa59
FC
87L<B::Concise> has been upgraded from version 0.99 to 0.991.
88
89B<-debug> output now includes C<op_other> pointers.
90
91=item *
92
3b5f976f
FC
93L<B::Deparse> has been upgraded from version 1.23 to 1.24.
94
95C<s//\(3)/e> is now deparsed in a way that does not issue warnings when
96parsed again. [perl #119807]
97
58731871
FC
98C<glob(my $x)> is now deparsed correctly, rather than as C<< <my $x> >> or
99similar.
100
101C<CORE::glob> is now deparsed correctly with the CORE:: prefix when there
102is a subroutine named "glob".
103
3b5f976f
FC
104=item *
105
12cd6c6b
TC
106L<IO::Select> has been upgraded from version 1.21 to 1.22.
107
108Removing a closed file handle from an IO::Select object now correctly
109updates its internal state and returns the correct value. [perl #75156]
110
111=item *
112
1fe654c9
CBW
113L<Locale::Maketext> has been upgraded from version 1.24 to 1.25.
114
115An issue with escaped backslashes if the literal is compiled as
116function argument has been resolved.
117
118=item *
119
494bd897
SH
120L<Module::CoreList> has been upgraded from version 3.00 to 3.01.
121
122The list of Perl versions covered has been updated.
f90332ac 123
22f9c36a
FC
124=item *
125
f63abf92
FC
126L<PerlIO::scalar> has been upgraded from version 0.17 to 0.18.
127
128A bug fix in 0.17 caused references to be stringified as soon as a handle
129to it was opened, even if it was opened only for reading. It also croaked
130on read-only references. This has been fixed. [perl #119529]
131
132=item *
133
22f9c36a
FC
134L<Tie::StdHandle> has been upgraded from version 4.3 to 4.4.
135
136It no longer prints C<$\> twice. [perl #120202]
137
e61cab1a
FC
138It no longer ignores the offset passed to C<syswrite>.
139
28ee95bc 140=back
f90332ac 141
28ee95bc 142=head1 Documentation
f90332ac 143
28ee95bc 144=head2 Changes to Existing Documentation
be08498a 145
28ee95bc 146=over 4
52102bb4
SH
147
148=item *
149
1fe654c9 150L<perlhacktips> has been updated to include some more examples of C<gdb> usage.
d477c82b 151
1fe654c9 152=item *
f90332ac 153
1fe654c9 154L<perlfunc>:
f90332ac 155
1fe654c9 156C<each>, clarify hash "modify while iterating".
f90332ac 157
1fe654c9 158C<pack>, the documentation for verbatim tables has been clarified.
f90332ac
SH
159
160=item *
161
1fe654c9 162L<perlre>, the documentation for C</x> and C<(?# comment)> has been expanded and clarified.
b7c730ff 163
befb5359
SH
164=item *
165
1fe654c9 166L<perllexwarn>, a note has been added to users of C<FATAL> warnings of the risk of upgrades.
befb5359 167
28ee95bc 168=back
befb5359 169
1fe654c9 170=head1 Diagnostics
f90332ac 171
1fe654c9 172=head2 Changes to Existing Diagnostics
411e93ce 173
28ee95bc 174=over 4
411e93ce
SH
175
176=item *
177
c7a31d00
FC
178L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">:
179
180This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to
181be in scalar context at compile time. Previously it was worded "Scalar
182value %%s[%s] better written as $%s[%s]".
f90332ac 183
8adfd064
SH
184=item *
185
1fe654c9 186L<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 187
1fe654c9
CBW
188The description for this diagnostic has been extended to cover all cases where the warning may occur.
189Issues with the positioning of the arrow indicator have also been resolved.
7c90aec3
SH
190
191=back
192
28ee95bc 193=head1 Testing
7c90aec3 194
2d8e8368
SH
195=over 4
196
197=item *
198
768cd72c 199F<ext/File-Find/t/find.t> has been converted from manual C<print>
eca6f539
JK
200statements to Test::More functions. Each test now has a description.
201[perl #120503]
2d8e8368
SH
202
203=back
204
28ee95bc 205=head1 Platform Support
1981f814 206
28ee95bc 207=head2 New Platforms
2b6950bd 208
28ee95bc 209=over 4
1981f814 210
79a18634 211=item Synology
1981f814 212
79a18634
MB
213Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative
214cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ
215P1022 ppc - e500v2) not meant for workstations or development. These boxes
216should build now. The basic problems are the non-standard location for tools.
1981f814 217
12dcbffb 218=back
1310e590 219
28ee95bc 220=head2 Platform-Specific Notes
40d779aa 221
28ee95bc 222=over 4
40d779aa 223
3e7c2d43
SH
224=item Windows
225
226Support for building with Visual C++ 2013 has been added. There are currently
227two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which
228will hopefully be resolved soon.
229
a48cc4c4
DD
230Experimental support for building with Intel C++ Compiler has been added. Only
231the nmake makefile (win32/Makefile) can be used. A "nmake test" will not pass
232at this time due to "cpan/CGI/t/url.t".
233
f4a01e9c 234=item WinCE
40d779aa 235
f4a01e9c
SH
236Perl can now be built in one shot with no user intervention on WinCE by running
237C<nmake -f Makefile.ce all>.
238
239Support for building with EVC (Embedded Visual C++) 4 has been restored. Perl
240can also be built using Smart Devices for Visual C++ 2005 or 2008.
eaed284b 241
ba03bc34 242=back
0335212c 243
28ee95bc 244=head1 Internal Changes
0335212c 245
09f4604f 246=over 4
efcbb8b2 247
28ee95bc 248=item *
846aaad8 249
3895ffc7
FC
250Compiling with C<-Accflags=-PERL_BOOL_AS_CHAR> now allows C99 and C++
251compilers to emulate the aliasing of C<bool> to C<char> that perl does for
252C89 compilers. [perl #120314]
846aaad8 253
ba03bc34 254=back
efcbb8b2 255
ba03bc34 256=head1 Selected Bug Fixes
912a9a8f 257
28ee95bc 258=over 4
04380912
SH
259
260=item *
261
894b53fb
FC
262Perl 5.18.0 accidentally disallowed C<-bareword> under C<use strict> and
263C<use integer>. This has been fixed. [perl #120288]
508c1ff6 264
10513103
FC
265=item *
266
267C<-a> at the start of a line (or a hyphen with any single letter that is
268not a filetest operator) no longer produces an erroneous 'Use of "-a"
269without parentheses is ambiguous' warning. [perl #120288]
270
7269fba0
FC
271=item *
272
273Lvalue context is now properly propagated into bare blocks and C<if> and
274C<else> blocks in lvalue subroutines. Previously, arrays and hashes would
275sometimes incorrectly be flattened when returned in lvalue list context, or
276"Bizarre copy" errors could occur. [perl #119797]
277
9deee734
FC
278=item *
279
280Lvalue context is now propagated to the branches of C<||> and C<&&> (and
281their alphabetic equivalents, C<or> and C<and>). This means
282C<foreach (pos $x || pos $y) {...}> now allows C<pos> to be modified
283through $_.
284
9b3f1466
FC
285=item *
286
287C<*DB::DB = sub {} if 0> no longer stops Perl's debugging mode from finding
288C<DB::DB> subs declared thereafter.
289
fafe36c8
FC
290=item *
291
a766e67d
FC
292C<stat> and C<readline> remember the last handle used; the former
293for the special C<_> filehandle, the latter for C<${^LAST_FH}>.
294C<eval "*foo if 0"> where *foo was the last handle passed to C<stat>
295or C<readline> could cause that handle to be forgotten if the
fafe36c8
FC
296handle were not opened yet. This has been fixed.
297
326cf246
FC
298=item *
299
300Various cases of C<delete $::{a}>, C<delete $::{ENV}> etc. causing a crash
301have been fixed. [perl #54044]
302
336b9946
FC
303=item *
304
305Assigning another typeglob to C<*^R> no longer makes the regular expression
306engine crash.
307
e4e776a2
FC
308=item *
309
310C<%{'_<...'}> hashes now set breakpoints on the corresponding C<@{'_<...'}>
311rather than whichever array C<@DB::dbline> is aliased to. [perl #119799]
312
d4fec79a
FC
313=item *
314
315Setting C<$!> to EACCESS before calling C<require> could affect
316C<require>'s behaviour. This has been fixed.
317
b34b8721
FC
318=item *
319
320The "Can't use \1 to mean $1 in expression" warning message now only occurs
321on the right-hand (replacement) part of a substitution. Formerly it could
322happen in code embedded in the left-hand side, or in any other quote-like
323operator.
324
73f74d29
FC
325=item *
326
327The C<\N> regular expression escape, when used without the curly braces (to
328mean C<[^\n]>), was ignoring a following C<*> if followed by whitespace
329under /x. It had been this way since C<\N> to mean C<[^\n]> was introduced
330in 5.12.0.
331
49c74b45
FC
332=item *
333
334Blessing into a reference (C<bless $thisref, $thatref>) has long been
335disallowed, but magical scalars for the second like C<$/> and those tied
336were exempt. They no longer are. [perl #119809]
337
3db3aac2
FC
338=item *
339
340Blessing into a reference was accidentally allowed in 5.18 if the class
341argument were a blessed reference with stale method caches (i.e., whose
342class had had subs defined since the last method call). They are
343disallowed once more, as in 5.16.
344
1859dc90
FC
345=item *
346
347An undefined lexical sub used as an inherited method no longer crashes.
348
ed935cbf
FC
349=item *
350
351C<< $x->{key} >> where $x was declared as C<my Class $x> no longer crashes
352if a Class::FIELDS subroutine stub has been declared.
353
62ab5032
FC
354=item *
355
356C<@$obj{'key'}> and C<${$obj}{key}> used to be exempt from compile-time
357field checking ("No such class field"; see L<fields>) but no longer are.
358
ec52a187
FC
359=item *
360
79b30ab2
FC
361That compile-time field checking also applies now to the C<%$obj{'key'}>
362syntax, added recently in Perl 5.19.4.
363
364=item *
365
ec52a187
FC
366A nonexistent array element with a large index passed to a subroutine that
367ties the array and then tries to access the element no longer results in a
368crash.
369
d84b9c6a
FC
370=item *
371
372Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
373array indices crash when the current package is a tied array class.
374
c9a5c63e
FC
375=item *
376
377Declaring a C<require>, C<glob>, or C<do> subroutine stub in the
378CORE::GLOBAL:: package no longer makes compilation of calls to the
379corresponding functions crash.
380
4105c9c0
FC
381=item *
382
383Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
384but has now been fixed.
385
ec636b69
FC
386=item *
387
388When C<`...`> or C<qx/.../> calls a C<readpipe> override, double-quotish
389interpolation now happens, as is the case when there is no override.
390Previously, the presence of an override would make these quote-like
391operators act like C<q{}>, suppressing interpolation. [perl #115330]
392
393=item *
394
395C<<<`...`> here-docs (with backticks as the delimiters) now call
396C<readpipe> overrides. [perl #119827]
397
a7b82b2f
FC
398=item *
399
400The presence of a lexical sub named "CORE" no longer stops the CORE::
401prefix from working.
402
03b7e81e
FC
403=item *
404
405C<&CORE::exit()> and C<&CORE::die()> now respect L<vmsish> hints.
406
d0fcfa00
FC
407=item *
408
409Undefining a glob that triggers a DESTROY method that undefines the same
410glob is now safe. It used to produce "Attempt to free unreferenced glob
411pointer" warnings and leak memory.
412
424623a2
FC
413=item *
414
415If subroutine redefinition (C<eval 'sub foo{}'> or C<newXS> for XS code)
416triggers a DESTROY method on the sub that is being redefined, and that
417method assigns a subroutine to the same slot (C<*foo = sub {}>), C<$_[0]>
e2aa288a
FC
418is no longer left pointing to a freed scalar. Now DESTROY is delayed until
419the new subroutine has been installed.
424623a2 420
812998f1
FC
421=item *
422
423C<s///>, C<tr///> and C<y///> now work when a wide character is used as the
424delimiter. [perl #120463]
425
34e8ce87
SH
426=item *
427
428On Windows, perl no longer calls CloseHandle() on a socket handle. This makes
429debugging easier on Windows by removing certain irrelevant bad handle
f02f05df
DD
430exceptions. It also fixes a race condition that made socket functions randomly
431fail in a Perl process with multiple OS threads, and possible test failures in
34e8ce87
SH
432F<dist/IO/t/cachepropagate-tcp.t>. [perl #120091/118059]
433
4c99f16d
FC
434=item *
435
436Some cases of unterminated (?...) sequences in regular expressions (e.g.,
437C</(?</>) have been fixed to produce the proper error message instead of
438"panic: memory wrap". Other cases (e.g., C</(?(/>) have yet to be fixed.
439
1fe654c9 440=item *
508c1ff6 441
1fe654c9
CBW
442Strange vars like ties, overloads, or stringified refs (and in recent
443perls, pure NOK vars) would generally do the wrong thing in formats
444when the var is treated as a string and repeatedly chopped, as in
445^<<<~~ and similar. This has now been resolved.
7492c6c5 446
1fe654c9 447=back
254a1e67 448
1fe654c9 449=head1 Known Problems
254a1e67 450
28ee95bc 451=over 4
254a1e67
SH
452
453=item *
454
a7b82b2f
FC
455C<do CORE()> used to call a sub named "CORE" and treat its return value as
456a file name to execute. A bug fix inadvertently caused it to be
457interpreted as the deprecated "do-SUB" construct. (Yes, C<do
458I<bareword>()> is inconsistent.) This will likely be changed back.
7492c6c5 459
09f4604f 460=back
cfbe45f9 461
28ee95bc 462=head1 Acknowledgements
c84b5497 463
28ee95bc 464XXX Generate this with:
c84b5497 465
28ee95bc 466 perl Porting/acknowledgements.pl v5.19.5..HEAD
f5b73711 467
44691e6f
AB
468=head1 Reporting Bugs
469
e08634c5
SH
470If you find what you think is a bug, you might check the articles recently
471posted to the comp.lang.perl.misc newsgroup and the perl bug database at
472http://rt.perl.org/perlbug/ . There may also be information at
473http://www.perl.org/ , the Perl Home Page.
44691e6f 474
e08634c5
SH
475If you believe you have an unreported bug, please run the L<perlbug> program
476included with your release. Be sure to trim your bug down to a tiny but
477sufficient test case. Your bug report, along with the output of C<perl -V>,
478will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
479
480If the bug you are reporting has security implications, which make it
e08634c5
SH
481inappropriate to send to a publicly archived mailing list, then please send it
482to perl5-security-report@perl.org. This points to a closed subscription
483unarchived mailing list, which includes all the core committers, who will be
484able to help assess the impact of issues, figure out a resolution, and help
f9001595 485co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
486platforms on which Perl is supported. Please only use this address for
487security issues in the Perl core, not for modules independently distributed on
488CPAN.
44691e6f
AB
489
490=head1 SEE ALSO
491
e08634c5
SH
492The F<Changes> file for an explanation of how to view exhaustive details on
493what changed.
44691e6f
AB
494
495The F<INSTALL> file for how to build Perl.
496
497The F<README> file for general stuff.
498
499The F<Artistic> and F<Copying> files for copyright information.
500
501=cut