This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for b47a847f62
[perl5.git] / pod / perldelta.pod
1 =for todo
2 35e037e846 Commit 1735f6f started to escape all...
3 9b4bdfd44e fix chop formats with non PV vars
4
5 =encoding utf8
6
7 =head1 NAME
8
9 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
10 to be processed before release. ]
11
12 perldelta - what is new for perl v5.19.6
13
14 =head1 DESCRIPTION
15
16 This document describes differences between the 5.19.5 release and the 5.19.6
17 release.
18
19 If you are upgrading from an earlier release such as 5.19.4, first read
20 L<perl5195delta>, which describes differences between 5.19.4 and 5.19.5.
21
22 =head1 Notice
23
24 XXX Any important notices here
25
26 =head1 Core Enhancements
27
28 XXX New core language features go here.  Summarize user-visible core language
29 enhancements.  Particularly prominent performance optimisations could go
30 here, but most should go in the L</Performance Enhancements> section.
31
32 [ List each enhancement as a =head2 entry ]
33
34 =head2 $a and $b warnings exemption
35
36 The special variables $a and $b, used in C<sort>, are now exempt from "used
37 once" warnings, even where C<sort> is not used.  This makes it easier for
38 CPAN modules to provide functions using $a and $b for similar purposes.
39 [perl #120462]
40
41 =head1 Security
42
43 XXX Any security-related notices go here.  In particular, any security
44 vulnerabilities closed should be noted here rather than in the
45 L</Selected Bug Fixes> section.
46
47 [ List each security issue as a =head2 entry ]
48
49 =head1 Incompatible Changes
50
51 XXX For a release on a stable branch, this section aspires to be:
52
53     There are no changes intentionally incompatible with 5.XXX.XXX
54     If any exist, they are bugs, and we request that you submit a
55     report.  See L</Reporting Bugs> below.
56
57 [ List each incompatible change as a =head2 entry ]
58
59 =head1 Deprecations
60
61 XXX Any deprecated features, syntax, modules etc. should be listed here.
62
63 =head2 Module removals
64
65 XXX Remove this section if inapplicable.
66
67 The following modules will be removed from the core distribution in a
68 future release, and will at that time need to be installed from CPAN.
69 Distributions on CPAN which require these modules will need to list them as
70 prerequisites.
71
72 The core versions of these modules will now issue C<"deprecated">-category
73 warnings to alert you to this fact.  To silence these deprecation warnings,
74 install the modules in question from CPAN.
75
76 Note that these are (with rare exceptions) fine modules that you are encouraged
77 to continue to use.  Their disinclusion from core primarily hinges on their
78 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
79 not usually on concerns over their design.
80
81 =over
82
83 =item L<Package::Constants>
84
85 =back
86
87 [ List each other deprecation as a =head2 entry ]
88
89 =head1 Performance Enhancements
90
91 XXX Changes which enhance performance without changing behaviour go here.
92 There may well be none in a stable release.
93
94 [ List each enhancement as a =item entry ]
95
96 =over 4
97
98 =item *
99
100 Constant hash key lookups (C<$hash{key}> as opposed to C<$hash{$key}>) have
101 long had the internal hash value computed at compile time, to speed up
102 lookup.  This optimisation has only now been applied to hash slices as
103 well.
104
105 =item *
106
107 Combined C<and> and C<or> operators in void context, like those
108 generated for C<< unless ($a && $b) >> and C<< if ($a || b) >> now
109 short circuit directly to the end of the statement. [perl #120128]
110
111 =back
112
113 =head1 Modules and Pragmata
114
115 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
116 go here.  If Module::CoreList is updated, generate an initial draft of the
117 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
118 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
119 below.  A paragraph summary for important changes should then be added by hand.
120 In an ideal world, dual-life modules would have a F<Changes> file that could be
121 cribbed.
122
123 [ Within each section, list entries as a =item entry ]
124
125 =head2 New Modules and Pragmata
126
127 =over 4
128
129 =item *
130
131 XXX
132
133 =back
134
135 =head2 Updated Modules and Pragmata
136
137 =over 4
138
139 =item *
140
141 L<B> has been upgraded from version 1.46 to 1.47.
142
143 C<< B::PMOP->precomp >> now preserves the internal UTF8 flag correctly, so
144 chr 256 remains chr 256, instead of turning into "\xc4\x80".  This allows
145 L<B::Deparse> to deparse Unicode regular expression correctly.
146 [perl #120182]
147
148 C<< B::HV->ARRAY >> now preserves the UTF8 flag on returned hash keys.
149 [perl #120535]
150
151 =item *
152
153 L<B::Concise> has been upgraded from version 0.99 to 0.991.
154
155 B<-debug> output now includes C<op_other> pointers.
156
157 =item *
158
159 L<B::Deparse> has been upgraded from version 1.23 to 1.24.
160
161 C<s//\(3)/e> is now deparsed in a way that does not issue warnings when
162 parsed again.  [perl #119807]
163
164 C<glob(my $x)> is now deparsed correctly, rather than as C<< <my $x> >> or
165 similar.
166
167 C<CORE::glob> is now deparsed correctly with the CORE:: prefix when there
168 is a subroutine named "glob".
169
170 =item *
171
172 L<IO::Select> has been upgraded from version 1.21 to 1.22.
173
174 Removing a closed file handle from an IO::Select object now correctly
175 updates its internal state and returns the correct value.  [perl #75156]
176
177 =item *
178
179 L<Module::CoreList> has been upgraded from version 3.00 to 3.01.
180
181 The list of Perl versions covered has been updated.
182
183 =item *
184
185 L<PerlIO::scalar> has been upgraded from version 0.17 to 0.18.
186
187 A bug fix in 0.17 caused references to be stringified as soon as a handle
188 to it was opened, even if it was opened only for reading.  It also croaked
189 on read-only references.  This has been fixed.  [perl #119529]
190
191 =item *
192
193 L<Tie::StdHandle> has been upgraded from version 4.3 to 4.4.
194
195 It no longer prints C<$\> twice.  [perl #120202]
196
197 It no longer ignores the offset passed to C<syswrite>.
198
199 =back
200
201 =head2 Removed Modules and Pragmata
202
203 =over 4
204
205 =item *
206
207 XXX
208
209 =back
210
211 =head1 Documentation
212
213 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
214 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
215
216 =head2 New Documentation
217
218 XXX Changes which create B<new> files in F<pod/> go here.
219
220 =head3 L<XXX>
221
222 XXX Description of the purpose of the new file here
223
224 =head2 Changes to Existing Documentation
225
226 XXX Changes which significantly change existing files in F<pod/> go here.
227 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
228 section.
229
230 =head3 L<XXX>
231
232 =over 4
233
234 =item *
235
236 XXX Description of the change here
237
238 =back
239
240 =head1 Diagnostics
241
242 The following additions or changes have been made to diagnostic output,
243 including warnings and fatal error messages.  For the complete list of
244 diagnostic messages, see L<perldiag>.
245
246 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
247 include any changes in L<perldiag> that reconcile it to the C<C> code.
248
249 =head2 New Diagnostics
250
251 XXX Newly added diagnostic messages go under here, separated into New Errors
252 and New Warnings
253
254 =head3 New Errors
255
256 =over 4
257
258 =item *
259
260 XXX L<message|perldiag/"message">
261
262 =back
263
264 =head3 New Warnings
265
266 =over 4
267
268 =item *
269
270 XXX L<message|perldiag/"message">
271
272 =back
273
274 =head2 Changes to Existing Diagnostics
275
276 XXX Changes (i.e. rewording) of diagnostic messages go here
277
278 =over 4
279
280 =item *
281
282 L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">:
283
284 This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to
285 be in scalar context at compile time.  Previously it was worded "Scalar
286 value %%s[%s] better written as $%s[%s]".
287
288 =back
289
290 =head1 Utility Changes
291
292 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
293 Most of these are built within the directories F<utils> and F<x2p>.
294
295 [ List utility changes as a =head3 entry for each utility and =item
296 entries for each change
297 Use L<XXX> with program names to get proper documentation linking. ]
298
299 =head3 L<XXX>
300
301 =over 4
302
303 =item *
304
305 XXX
306
307 =back
308
309 =head1 Configuration and Compilation
310
311 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
312 go here.  Any other changes to the Perl build process should be listed here.
313 However, any platform-specific changes should be listed in the
314 L</Platform Support> section, instead.
315
316 [ List changes as a =item entry ].
317
318 =over 4
319
320 =item *
321
322 XXX
323
324 =back
325
326 =head1 Testing
327
328 XXX Any significant changes to the testing of a freshly built perl should be
329 listed here.  Changes which create B<new> files in F<t/> go here as do any
330 large changes to the testing harness (e.g. when parallel testing was added).
331 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
332 that they represent may be covered elsewhere.
333
334 [ List each test improvement as a =item entry ]
335
336 =over 4
337
338 =item *
339
340 F<ext/File-Find/t/find.t> has been converted from manual C<print>
341 statements to Test::More functions.  Each test now has a description.
342 [perl #120503]
343
344 =back
345
346 =head1 Platform Support
347
348 =head2 New Platforms
349
350 =over 4
351
352 =item Synology
353
354 Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative
355 cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ
356 P1022 ppc - e500v2) not meant for workstations or development. These boxes
357 should build now. The basic problems are the non-standard location for tools.
358
359 =back
360
361 =head2 Discontinued Platforms
362
363 XXX List any platforms that this version of perl no longer compiles on.
364
365 =over 4
366
367 =item XXX-some-platform
368
369 XXX
370
371 =back
372
373 =head2 Platform-Specific Notes
374
375 XXX List any changes for specific platforms.  This could include configuration
376 and compilation changes or changes in portability/compatibility.  However,
377 changes within modules for platforms should generally be listed in the
378 L</Modules and Pragmata> section.
379
380 =over 4
381
382 =item Windows
383
384 Support for building with Visual C++ 2013 has been added.  There are currently
385 two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which
386 will hopefully be resolved soon.
387
388 =item WinCE
389
390 Perl can now be built in one shot with no user intervention on WinCE by running
391 C<nmake -f Makefile.ce all>.
392
393 Support for building with EVC (Embedded Visual C++) 4 has been restored.  Perl
394 can also be built using Smart Devices for Visual C++ 2005 or 2008.
395
396 =back
397
398 =head1 Internal Changes
399
400 XXX Changes which affect the interface available to C<XS> code go here.  Other
401 significant internal changes for future core maintainers should be noted as
402 well.
403
404 [ List each change as a =item entry ]
405
406 =over 4
407
408 =item *
409
410 Compiling with C<-Accflags=-PERL_BOOL_AS_CHAR> now allows C99 and C++
411 compilers to emulate the aliasing of C<bool> to C<char> that perl does for
412 C89 compilers.  [perl #120314]
413
414 =back
415
416 =head1 Selected Bug Fixes
417
418 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
419 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
420
421 [ List each fix as a =item entry ]
422
423 =over 4
424
425 =item *
426
427 Perl 5.18.0 accidentally disallowed C<-bareword> under C<use strict> and
428 C<use integer>.  This has been fixed.  [perl #120288]
429
430 =item *
431
432 C<-a> at the start of a line (or a hyphen with any single letter that is
433 not a filetest operator) no longer produces an erroneous 'Use of "-a"
434 without parentheses is ambiguous' warning.  [perl #120288]
435
436 =item *
437
438 Lvalue context is now properly propagated into bare blocks and C<if> and
439 C<else> blocks in lvalue subroutines.  Previously, arrays and hashes would
440 sometimes incorrectly be flattened when returned in lvalue list context, or
441 "Bizarre copy" errors could occur.  [perl #119797]
442
443 =item *
444
445 Lvalue context is now propagated to the branches of C<||> and C<&&> (and
446 their alphabetic equivalents, C<or> and C<and>).  This means
447 C<foreach (pos $x || pos $y) {...}> now allows C<pos> to be modified
448 through $_.
449
450 =item *
451
452 C<*DB::DB = sub {} if 0> no longer stops Perl's debugging mode from finding
453 C<DB::DB> subs declared thereafter.
454
455 =item *
456
457 C<stat> and C<readline> remember the last handle used; the former
458 for the special C<_> filehandle, the latter for C<${^LAST_FH}>.
459 C<eval "*foo if 0"> where *foo was the last handle passed to C<stat>
460 or C<readline> could cause that handle to be forgotten if the
461 handle were not opened yet.  This has been fixed.
462
463 =item *
464
465 Various cases of C<delete $::{a}>, C<delete $::{ENV}> etc. causing a crash
466 have been fixed.  [perl #54044]
467
468 =item *
469
470 Assigning another typeglob to C<*^R> no longer makes the regular expression
471 engine crash.
472
473 =item *
474
475 C<%{'_<...'}> hashes now set breakpoints on the corresponding C<@{'_<...'}>
476 rather than whichever array C<@DB::dbline> is aliased to.  [perl #119799]
477
478 =item *
479
480 Setting C<$!> to EACCESS before calling C<require> could affect
481 C<require>'s behaviour.  This has been fixed.
482
483 =item *
484
485 The "Can't use \1 to mean $1 in expression" warning message now only occurs
486 on the right-hand (replacement) part of a substitution.  Formerly it could
487 happen in code embedded in the left-hand side, or in any other quote-like
488 operator.
489
490 =item *
491
492 The C<\N> regular expression escape, when used without the curly braces (to
493 mean C<[^\n]>), was ignoring a following C<*> if followed by whitespace
494 under /x.  It had been this way since C<\N> to mean C<[^\n]> was introduced
495 in 5.12.0.
496
497 =item *
498
499 Blessing into a reference (C<bless $thisref, $thatref>) has long been
500 disallowed, but magical scalars for the second like C<$/> and those tied
501 were exempt.  They no longer are.  [perl #119809]
502
503 =item *
504
505 Blessing into a reference was accidentally allowed in 5.18 if the class
506 argument were a blessed reference with stale method caches (i.e., whose
507 class had had subs defined since the last method call).  They are
508 disallowed once more, as in 5.16.
509
510 =item *
511
512 An undefined lexical sub used as an inherited method no longer crashes.
513
514 =item *
515
516 C<< $x->{key} >> where $x was declared as C<my Class $x> no longer crashes
517 if a Class::FIELDS subroutine stub has been declared.
518
519 =item *
520
521 C<@$obj{'key'}> and C<${$obj}{key}> used to be exempt from compile-time
522 field checking ("No such class field"; see L<fields>) but no longer are.
523
524 =item *
525
526 That compile-time field checking also applies now to the C<%$obj{'key'}>
527 syntax, added recently in Perl 5.19.4.
528
529 =item *
530
531 A nonexistent array element with a large index passed to a subroutine that
532 ties the array and then tries to access the element no longer results in a
533 crash.
534
535 =item *
536
537 Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
538 array indices crash when the current package is a tied array class.
539
540 =item *
541
542 Declaring a C<require>, C<glob>, or C<do> subroutine stub in the
543 CORE::GLOBAL:: package no longer makes compilation of calls to the
544 corresponding functions crash.
545
546 =item *
547
548 Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
549 but has now been fixed.
550
551 =item *
552
553 When C<`...`> or C<qx/.../> calls a C<readpipe> override, double-quotish
554 interpolation now happens, as is the case when there is no override.
555 Previously, the presence of an override would make these quote-like
556 operators act like C<q{}>, suppressing interpolation.  [perl #115330]
557
558 =item *
559
560 C<<<`...`> here-docs (with backticks as the delimiters) now call
561 C<readpipe> overrides.  [perl #119827]
562
563 =item *
564
565 The presence of a lexical sub named "CORE" no longer stops the CORE::
566 prefix from working.
567
568 =item *
569
570 C<&CORE::exit()> and C<&CORE::die()> now respect L<vmsish> hints.
571
572 =item *
573
574 Undefining a glob that triggers a DESTROY method that undefines the same
575 glob is now safe.  It used to produce "Attempt to free unreferenced glob
576 pointer" warnings and leak memory.
577
578 =item *
579
580 If subroutine redefinition (C<eval 'sub foo{}'> or C<newXS> for XS code)
581 triggers a DESTROY method on the sub that is being redefined, and that
582 method assigns a subroutine to the same slot (C<*foo = sub {}>), C<$_[0]>
583 is no longer left pointing to a freed scalar.  Now DESTROY is delayed until
584 the new subroutine has been installed.
585
586 =item *
587
588 C<s///>, C<tr///> and C<y///> now work when a wide character is used as the
589 delimiter.  [perl #120463]
590
591 =item *
592
593 On Windows, perl no longer calls CloseHandle() on a socket handle.  This makes
594 debugging easier on Windows by removing certain irrelevant bad handle
595 exceptions.  It also fixes a race condition and possible test failure in
596 F<dist/IO/t/cachepropagate-tcp.t>.  [perl #120091/118059]
597
598 =back
599
600 =head1 Known Problems
601
602 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
603 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
604 platform specific bugs also go here.
605
606 [ List each fix as a =item entry ]
607
608 =over 4
609
610 =item *
611
612 C<do CORE()> used to call a sub named "CORE" and treat its return value as
613 a file name to execute.  A bug fix inadvertently caused it to be
614 interpreted as the deprecated "do-SUB" construct.  (Yes, C<do
615 I<bareword>()> is inconsistent.)  This will likely be changed back.
616
617 =back
618
619 =head1 Obituary
620
621 XXX If any significant core contributor has died, we've added a short obituary
622 here.
623
624 =head1 Acknowledgements
625
626 XXX Generate this with:
627
628   perl Porting/acknowledgements.pl v5.19.5..HEAD
629
630 =head1 Reporting Bugs
631
632 If you find what you think is a bug, you might check the articles recently
633 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
634 http://rt.perl.org/perlbug/ .  There may also be information at
635 http://www.perl.org/ , the Perl Home Page.
636
637 If you believe you have an unreported bug, please run the L<perlbug> program
638 included with your release.  Be sure to trim your bug down to a tiny but
639 sufficient test case.  Your bug report, along with the output of C<perl -V>,
640 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
641
642 If the bug you are reporting has security implications, which make it
643 inappropriate to send to a publicly archived mailing list, then please send it
644 to perl5-security-report@perl.org.  This points to a closed subscription
645 unarchived mailing list, which includes all the core committers, who will be
646 able to help assess the impact of issues, figure out a resolution, and help
647 co-ordinate the release of patches to mitigate or fix the problem across all
648 platforms on which Perl is supported.  Please only use this address for
649 security issues in the Perl core, not for modules independently distributed on
650 CPAN.
651
652 =head1 SEE ALSO
653
654 The F<Changes> file for an explanation of how to view exhaustive details on
655 what changed.
656
657 The F<INSTALL> file for how to build Perl.
658
659 The F<README> file for general stuff.
660
661 The F<Artistic> and F<Copying> files for copyright information.
662
663 =cut