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