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