This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for cae71c5daa29
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
6 to be processed before release. ]
7
8 perldelta - what is new for perl v5.21.5
9
10 =head1 DESCRIPTION
11
12 This document describes differences between the 5.21.4 release and the 5.21.5
13 release.
14
15 If you are upgrading from an earlier release such as 5.21.3, first read
16 L<perl5214delta>, which describes differences between 5.21.3 and 5.21.4.
17
18 =head1 Notice
19
20 XXX Any important notices here
21
22 =head1 Core Enhancements
23
24 XXX New core language features go here.  Summarize user-visible core language
25 enhancements.  Particularly prominent performance optimisations could go
26 here, but most should go in the L</Performance Enhancements> section.
27
28 [ List each enhancement as a =head2 entry ]
29
30 =head2 New double-diamond operator
31
32 C<<< <<>>> >>> is like C<< <> >> but uses three-argument C<open> to open
33 each file in @ARGV.  So each element of @ARGV is an actual file name, and
34 "|foo" won't be treated as a pipe open.
35
36 =head2 Perl now supports POSIX 2008 locale currency additions.
37
38 On platforms that are able to handle POSIX.1-2008, the
39 hash returned by
40 L<C<POSIX::localeconv()>|perllocale/The localeconv function>
41 includes the international currency fields added by that version of the
42 POSIX standard.  These are
43 C<int_n_cs_precedes>,
44 C<int_n_sep_by_space>,
45 C<int_n_sign_posn>,
46 C<int_p_cs_precedes>,
47 C<int_p_sep_by_space>,
48 and
49 C<int_p_sign_posn>.
50
51 =head1 Security
52
53 =head2 Perl is now compiled with -fstack-protector-strong if available
54
55 Perl has been compiled with the anti-stack-smashing option
56 C<-fstack-protector> since 5.10.1.  Now Perl uses the newer variant
57 called C<-fstack-protector-strong>, if available.  (This was added
58 already in 5.21.4.)
59
60 [ List each security issue as a =head2 entry ]
61
62 =head1 Incompatible Changes
63
64 XXX For a release on a stable branch, this section aspires to be:
65
66     There are no changes intentionally incompatible with 5.XXX.XXX
67     If any exist, they are bugs, and we request that you submit a
68     report.  See L</Reporting Bugs> below.
69
70 [ List each incompatible change as a =head2 entry ]
71
72 =head1 Deprecations
73
74 XXX Any deprecated features, syntax, modules etc. should be listed here.
75
76 =head2 Module removals
77
78 XXX Remove this section if inapplicable.
79
80 The following modules will be removed from the core distribution in a
81 future release, and will at that time need to be installed from CPAN.
82 Distributions on CPAN which require these modules will need to list them as
83 prerequisites.
84
85 The core versions of these modules will now issue C<"deprecated">-category
86 warnings to alert you to this fact.  To silence these deprecation warnings,
87 install the modules in question from CPAN.
88
89 Note that these are (with rare exceptions) fine modules that you are encouraged
90 to continue to use.  Their disinclusion from core primarily hinges on their
91 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
92 not usually on concerns over their design.
93
94 =over
95
96 =item XXX
97
98 XXX Note that deprecated modules should be listed here even if they are listed
99 as an updated module in the L</Modules and Pragmata> section.
100
101 =back
102
103 =head2 Use of multiple /x regexp modifiers
104
105 It is now deprecated to say something like any of the following:
106
107     qr/foo/xx;
108     /(?xax:foo)/;
109     use re qw(/amxx);
110
111 That is, now C<x> should only occur once in any string of contiguous
112 regular expression pattern modifiers.  We do not believe there are any
113 occurrences of this in all of CPAN.  This is in preparation for a future
114 Perl release having C</xx> mean to allow white-space for readability in
115 bracketed character classes (those enclosed in square brackets:
116 C<[...]>).
117
118 =head1 Performance Enhancements
119
120 XXX Changes which enhance performance without changing behaviour go here.
121 There may well be none in a stable release.
122
123 [ List each enhancement as a =item entry ]
124
125 =over 4
126
127 =item *
128
129 C<length> is up to 20% faster for non-magical/non-tied scalars containing a
130 string if it is a non-utf8 string or if C<use bytes;> is in scope.
131
132 =item *
133
134 Non-magical/non-tied scalars that contain only a floating point value and are
135 on most Perl builds with 64 bit integers now use 8-32 less bytes of memory
136 depending on OS.
137
138 =item *
139
140 In C<@array = split>, the assigment can be optimised away with C<split>
141 writing directly to the array.  This optimisation was happening only for
142 package arrays other than @_ and only if the argument to split was an
143 explicit constant or scalar other than $_.  Now this optimisation happens
144 almost all the time.
145
146 =item *
147
148 C<join> is now subject to constant folding.  Moreover, C<join> with a
149 scalar or constant for the separator and a single-item list to join is
150 simplified to a stringification.  The separator doesn't even get evaluated.
151
152 =item *
153
154 C<qq(@array)> is implemented using two ops: a stringify op and a join op.
155 If the qq contains nothing but a single array, the stringification is
156 optimised away.
157
158 =back
159
160 =head1 Modules and Pragmata
161
162 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
163 go here.  If Module::CoreList is updated, generate an initial draft of the
164 following sections using F<Porting/corelist-perldelta.pl>.  A paragraph summary
165 for important changes should then be added by hand.  In an ideal world,
166 dual-life modules would have a F<Changes> file that could be cribbed.
167
168 [ Within each section, list entries as a =item entry ]
169
170 =head2 New Modules and Pragmata
171
172 =over 4
173
174 =item *
175
176 XXX
177
178 =back
179
180 =head2 Updated Modules and Pragmata
181
182 =over 4
183
184 =item *
185
186 L<attributes> has been upgraded from version 0.23 to 0.24.
187
188 Avoid reading beyond the end of a buffer. [perl #122629]
189
190 =item *
191
192 L<B::Deparse> has been upgraded from version 1.28 to 1.29.
193
194 Parenthesised arrays in lists passed to C<\> are now correctly deparsed
195 with parentheses (e.g., C<\(@a, (@b), @c)> now retains the parentheses
196 around @b), this preserving the flattening behaviour of referenced
197 parenthesised arrays.  Formerly, it only worked for one array: C<\(@a)>.
198
199 C<local our> is now deparsed correctly, with the C<our> included.
200
201 C<for($foo; !$bar; $baz) {...}> was deparsed without the C<!> (or C<not>).
202 This has been fixed.
203
204 Core keywords that conflict with lexical subroutines are now deparsed with
205 the C<CORE::> prefix.
206
207 C<foreach state $x (...) {...}> now deparses correctly with C<state> and
208 not C<my>.
209
210 C<our @array = split(...)> now deparses correctly with C<our> in those
211 cases where the assignment is optimised away.
212
213 =item *
214
215 L<DynaLoader> has been upgraded from version 1.26 to 1.27.
216
217 Remove dl_nonlazy global if unused in Dynaloader. [perl #122926]
218
219 =item *
220
221 L<Fcntl> has been upgraded from version 1.12 to 1.13.
222
223 Add support for the Linux pipe buffer size fcntl() commands.
224
225 =item *
226
227 L<File::Find> has been upgraded from version 1.28 to 1.29.
228
229 Slightly faster module loading time.
230
231 =item *
232
233 L<Module::CoreList> has been upgraded from version 5.20140920 to 5.20141020.
234
235 Updated to cover the latest releases of Perl.
236
237 =item *
238
239 The PathTools module collection has been upgraded from version 3.50 to 3.51.
240
241 Slightly faster module loading time.
242
243 =item *
244
245 L<POSIX> has been upgraded from version 1.44 to 1.45.
246
247 POSIX::tmpnam() now produces a deprecation warning.  [perl #122005]
248
249 =item *
250
251 L<XSLoader> has been upgraded from version 0.17 to 0.18.
252
253 Allow XSLoader to load modules from a different namespace.
254 [perl #122455]
255
256 =back
257
258 =head2 Removed Modules and Pragmata
259
260 =over 4
261
262 =item *
263
264 XXX
265
266 =back
267
268 =head1 Documentation
269
270 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
271 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
272
273 =head2 New Documentation
274
275 XXX Changes which create B<new> files in F<pod/> go here.
276
277 =head3 L<XXX>
278
279 XXX Description of the purpose of the new file here
280
281 =head2 Changes to Existing Documentation
282
283 XXX Changes which significantly change existing files in F<pod/> go here.
284 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
285 section.
286
287 =head3 L<XXX>
288
289 =over 4
290
291 =item *
292
293 Clarifications have been added to L<perlrecharclass/Character Ranges>
294 to the effect that Perl guarantees that C<[A-Z]>, C<[a-z]>, C<[0-9]> and
295 any subranges thereof in regular expression bracketed character classes
296 are guaranteed to match exactly what a naive English speaker would
297 expect them to match, even on platforms (such as EBCDIC) where special
298 handling is required to accomplish this.
299
300 =back
301
302 =head1 Diagnostics
303
304 The following additions or changes have been made to diagnostic output,
305 including warnings and fatal error messages.  For the complete list of
306 diagnostic messages, see L<perldiag>.
307
308 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
309 include any changes in L<perldiag> that reconcile it to the C<C> code.
310
311 =head2 New Diagnostics
312
313 XXX Newly added diagnostic messages go under here, separated into New Errors
314 and New Warnings
315
316 =head3 New Errors
317
318 =over 4
319
320 =item *
321
322 XXX L<message|perldiag/"message">
323
324 =back
325
326 =head3 New Warnings
327
328 =over 4
329
330 =item *
331
332 XXX L<message|perldiag/"message">
333
334 =back
335
336 =head2 Changes to Existing Diagnostics
337
338 XXX Changes (i.e. rewording) of diagnostic messages go here
339
340 =over 4
341
342 =item *
343
344 '"my" variable &foo::bar can't be in a package' has been reworded to say
345 'subroutine' instead of 'variable'.
346
347 =back
348
349 =head1 Utility Changes
350
351 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
352 Most of these are built within the directory F<utils>.
353
354 [ List utility changes as a =head2 entry for each utility and =item
355 entries for each change
356 Use L<XXX> with program names to get proper documentation linking. ]
357
358 =head2 L<XXX>
359
360 =over 4
361
362 =item *
363
364 XXX
365
366 =back
367
368 =head1 Configuration and Compilation
369
370 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
371 go here.  Any other changes to the Perl build process should be listed here.
372 However, any platform-specific changes should be listed in the
373 L</Platform Support> section, instead.
374
375 [ List changes as a =item entry ].
376
377 =over 4
378
379 =item *
380
381 XXX
382
383 =back
384
385 =head1 Testing
386
387 XXX Any significant changes to the testing of a freshly built perl should be
388 listed here.  Changes which create B<new> files in F<t/> go here as do any
389 large changes to the testing harness (e.g. when parallel testing was added).
390 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
391 that they represent may be covered elsewhere.
392
393 [ List each test improvement as a =item entry ]
394
395 =over 4
396
397 =item *
398
399 XXX
400
401 =back
402
403 =head1 Platform Support
404
405 XXX Any changes to platform support should be listed in the sections below.
406
407 [ Within the sections, list each platform as a =item entry with specific
408 changes as paragraphs below it. ]
409
410 =head2 New Platforms
411
412 XXX List any platforms that this version of perl compiles on, that previous
413 versions did not.  These will either be enabled by new files in the F<hints/>
414 directories, or new subdirectories and F<README> files at the top level of the
415 source tree.
416
417 =over 4
418
419 =item XXX-some-platform
420
421 XXX
422
423 =back
424
425 =head2 Discontinued Platforms
426
427 XXX List any platforms that this version of perl no longer compiles on.
428
429 =over 4
430
431 =item XXX-some-platform
432
433 XXX
434
435 =back
436
437 =head2 Platform-Specific Notes
438
439 XXX List any changes for specific platforms.  This could include configuration
440 and compilation changes or changes in portability/compatibility.  However,
441 changes within modules for platforms should generally be listed in the
442 L</Modules and Pragmata> section.
443
444 =over 4
445
446 =item EBCDIC
447
448 Special handling is required on EBCDIC platforms to get C<qr/[i-j]/> to
449 match only C<"i"> and C<"j">, since there are 7 characters between the
450 code points for C<"i"> and C<"j">.  This special handling had only been
451 invoked when both ends of the range are literals.  Now it is also
452 invoked if any of the C<\N{...}> forms for specifying a character by
453 name or Unicode code point is used instead of a literal.  See
454 L<perlrecharclass/Character Ranges>.
455
456 =back
457
458 =head1 Internal Changes
459
460 XXX Changes which affect the interface available to C<XS> code go here.  Other
461 significant internal changes for future core maintainers should be noted as
462 well.
463
464 [ List each change as a =item entry ]
465
466 =over 4
467
468 =item *
469
470 SVs of type SVt_NV are now bodyless when a build configure and platform allow
471 it, specifically C<sizeof(NV) <= sizeof(IV)>. The bodyless trick is the same one
472 as for IVs since 5.9.2, but for NVs, unlike IVs, is not guarenteed on all
473 platforms and build configurations.
474
475 =item *
476
477 The C<$DB::single>, C<$DB::signal> and C<$DB::trace> now have set and
478 get magic that stores their values as IVs and those IVs are used when
479 testing their values in C<pp_dbstate>.  This prevents perl from
480 recursing infinity if an overloaded object is assigned to any of those
481 variables. [perl #122445]
482
483 =item *
484
485 C<Perl_tmps_grow> which is marked as public API but undocumented has been
486 removed from public API. If you use C<EXTEND_MORTAL> macro in your XS code to
487 preextend the mortal stack, you are unaffected by this change.
488
489 =item *
490
491 C<cv_name>, which was introduced in 5.21.4, has been changed incompatibly.
492 It now has a flags field that allows the caller to specify whether the name
493 should be fully qualified.  See L<perlapi/cv_name>.
494
495 =item *
496
497 Internally Perl no longer uses the C<SVs_PADMY> flag.  C<SvPADMY()> now
498 returns a true value for anything not marked PADTMP.  C<SVs_PADMY> is now
499 defined as 0.
500
501 =back
502
503 =head1 Selected Bug Fixes
504
505 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
506 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
507
508 [ List each fix as a =item entry ]
509
510 =over 4
511
512 =item *
513
514 Locking and unlocking values via L<Hash::Util> or C<Internals::SvREADONLY>
515 no longer has any affect on values that are read-only to begin.  Unlocking
516 such values could result in crashes, hangs or other erratic behaviour.
517
518 =item *
519
520 The internal C<looks_like_number> function (which L<Scalar::Util> provides
521 access to) began erroneously to return true for "-e1" in 5.21.4, affecting
522 also C<-'-e1'>.  This has been fixed.
523
524 =item *
525
526 The flip-flop operator (C<..> in scalar context) would return the same
527 scalar each time, unles the containing subroutine was called recursively.
528 Now it always returns a new scalar.  [perl #122829]
529
530 =item *
531
532 Some unterminated C<(?(...)...)> constructs in regular expressions would
533 either crash or give erroneous error messages.  C</(?(1)/> is one such
534 example.
535
536 =item *
537
538 C<pack "w", $tied> no longer calls FETCH twice.
539
540 =item *
541
542 List assignments like C<($x, $z) = (1, $y)> now work correctly if $x and $y
543 have been aliased by C<foreach>.
544
545 =item *
546
547 Some patterns including code blocks with syntax errors, such as
548 C</ (?{(^{})/>, would hang or fail assertions on debugging builds.  Now
549 they produce errors.
550
551 =item *
552
553 An assertion failure when parsing C<sort> with debugging enabled has been
554 fixed.  [perl #122771]
555
556 =item *
557
558 C<*a = *b; @a = split //, $b[1]> could do a bad read and produce junk
559 results.
560
561 =item *
562
563 In C<() = @array = split>, the C<() => at the beginning no longer confuses
564 the optimiser, making it assume a limit of 1.
565
566 =back
567
568 =head1 Known Problems
569
570 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
571 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
572 platform specific bugs also go here.
573
574 [ List each fix as a =item entry ]
575
576 =over 4
577
578 =item *
579
580 XXX
581
582 =back
583
584 =head1 Errata From Previous Releases
585
586 =over 4
587
588 =item *
589
590 XXX Add anything here that we forgot to add, or were mistaken about, in
591 the perldelta of a previous release.
592
593 =back
594
595 =head1 Obituary
596
597 XXX If any significant core contributor has died, we've added a short obituary
598 here.
599
600 =head1 Acknowledgements
601
602 XXX Generate this with:
603
604   perl Porting/acknowledgements.pl v5.21.4..HEAD
605
606 =head1 Reporting Bugs
607
608 If you find what you think is a bug, you might check the articles recently
609 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
610 https://rt.perl.org/ .  There may also be information at
611 http://www.perl.org/ , the Perl Home Page.
612
613 If you believe you have an unreported bug, please run the L<perlbug> program
614 included with your release.  Be sure to trim your bug down to a tiny but
615 sufficient test case.  Your bug report, along with the output of C<perl -V>,
616 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
617
618 If the bug you are reporting has security implications, which make it
619 inappropriate to send to a publicly archived mailing list, then please send it
620 to perl5-security-report@perl.org.  This points to a closed subscription
621 unarchived mailing list, which includes all the core committers, who will be
622 able to help assess the impact of issues, figure out a resolution, and help
623 co-ordinate the release of patches to mitigate or fix the problem across all
624 platforms on which Perl is supported.  Please only use this address for
625 security issues in the Perl core, not for modules independently distributed on
626 CPAN.
627
628 =head1 SEE ALSO
629
630 The F<Changes> file for an explanation of how to view exhaustive details on
631 what changed.
632
633 The F<INSTALL> file for how to build Perl.
634
635 The F<README> file for general stuff.
636
637 The F<Artistic> and F<Copying> files for copyright information.
638
639 =cut