This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Updated JSON-PP to CPAN version 2.27200
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
34dc2ec0
DM
5[ this is a template for a new perldelta file. Any text flagged as
6XXX needs to be processed before release. ]
c71a852f 7
34dc2ec0 8perldelta - what is new for perl v5.15.0
6e925ecb 9
34dc2ec0 10=head1 DESCRIPTION
a27ff1be 11
34dc2ec0
DM
12This document describes differences between the 5.15.0 release and
13the 5.14.0 release.
a27ff1be 14
34dc2ec0
DM
15If you are upgrading from an earlier release such as 5.YYY.YYY, first read
16L<perl5YYYdelta>, which describes differences between 5.ZZZ.ZZZ and
175.YYY.YYY.
a27ff1be 18
760696b8
FC
19Some of the changes have been included in Perl 5.14.1. These are
20indicated with a "(5.14.1)" marker.
21
34dc2ec0 22=head1 Notice
a27ff1be 23
34dc2ec0 24XXX Any important notices here
a27ff1be 25
34dc2ec0 26=head1 Core Enhancements
a27ff1be 27
34dc2ec0
DM
28XXX New core language features go here. Summarise user-visible core language
29enhancements. Particularly prominent performance optimisations could go
30here, but most should go in the L</Performance Enhancements> section.
a27ff1be 31
34dc2ec0 32[ List each enhancement as a =head2 entry ]
a27ff1be 33
34dc2ec0 34=head1 Security
a27ff1be 35
34dc2ec0
DM
36XXX Any security-related notices go here. In particular, any security
37vulnerabilities closed should be noted here rather than in the
38L</Selected Bug Fixes> section.
a27ff1be 39
34dc2ec0 40[ List each security issue as a =head2 entry ]
a27ff1be 41
34dc2ec0 42=head1 Incompatible Changes
9a5a48b7 43
34dc2ec0 44[ List each incompatible change as a =head2 entry ]
9a5a48b7 45
34dc2ec0 46=head1 Deprecations
cdc10f43 47
34dc2ec0
DM
48XXX Any deprecated features, syntax, modules etc. should be listed here.
49In particular, deprecated modules should be listed here even if they are
50listed as an updated module in the L</Modules and Pragmata> section.
cdc10f43 51
34dc2ec0 52[ List each deprecation as a =head2 entry ]
9a5a48b7 53
34dc2ec0 54=head1 Performance Enhancements
9a5a48b7 55
34dc2ec0
DM
56XXX Changes which enhance performance without changing behaviour go here. There
57may well be none in a stable release.
9a5a48b7 58
34dc2ec0 59[ List each enhancement as a =item entry ]
9a5a48b7 60
34dc2ec0 61=over 4
c8c13991 62
5076a392
FC
63=item *
64
34dc2ec0 65XXX
e8e35311
FC
66
67=back
68
34dc2ec0 69=head1 Modules and Pragmata
c8c13991 70
34dc2ec0
DM
71XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
72go here. If Module::CoreList is updated, generate an initial draft of the
73following sections using F<Porting/corelist-perldelta.pl>, which prints stub
74entries to STDOUT. Results can be pasted in place of the '=head2' entries
75below. A paragraph summary for important changes should then be added by hand.
76In an ideal world, dual-life modules would have a F<Changes> file that could be
77cribbed.
f00d3350 78
34dc2ec0 79[ Within each section, list entries as a =item entry ]
e9784f55 80
34dc2ec0 81=head2 New Modules and Pragmata
d430b8e7 82
34dc2ec0 83=over 4
d430b8e7 84
31ecc2aa
FC
85=item *
86
34dc2ec0 87XXX
31ecc2aa 88
e9784f55 89=back
c34a735e 90
34dc2ec0 91=head2 Updated Modules and Pragmata
24b164a5 92
34dc2ec0 93=over 4
2c389f6c 94
9780b8fa
FC
95=item *
96
daca484d
NC
97L<B> has been upgraded from version 1.29 to version 1.30.
98
99=item *
100
760696b8
FC
101L<B::Deparse> has been upgraded from version 1.03 to 1.05.
102
103It addresses two regressions in Perl 5.14.0:
104
105=over
106
107=item *
108
109Deparsing of the C<glob> operator and its diamond (C<< <> >>) form now
110works again [RT #90898] (5.14.1).
111
112=item *
113
114The presence of subroutines named C<::::> or C<::::::> no longer causes
115B::Deparse to hang (5.14.1).
116
117=back
118
119XXX Other Deparse fixes go here.
120
121=item *
122
975dff8c
FC
123L<Devel::Peek> has been upgraded from version 1.07 to 1.08.
124
125Its C<fill_mstats> function no longer refuses to write to copy-on-write
126scalars.
127
128=item *
129
f95396b3 130L<Math::Complex> has been upgraded from version 1.56 to version 1.57.
3194a40a
Z
131
132Correct copy constructor usage.
133Fix polarwise formatting with numeric format specifier.
134More stable C<great_circle_direction> algorithm.
135
136=item *
137
e5904012
NC
138L<PerlIO::encoding> has been upgraded from version 0.14 to 0.15
139
140=item *
141
975dff8c
FC
142L<PerlIO::scalar> has been upgraded from version 0.11 to 0.12.
143
144It fixes a problem with C<< open my $fh, ">", \$scalar >> not working if
145C<$scalar> is a copy-on-write scalar.
146
147=item *
148
760696b8
FC
149XXX If any changes are made, the version will need to be bumped again.
150What blead has is currently (as of a9d1f3db, 7th of June) identical to
1515.14.1's version.
152
153L<Pod::Perldoc> has been upgraded from version 3.15_03 to 3.15_04.
154
155It corrects the search paths on VMS [RT #90640].
156
157=item *
158
daca484d
NC
159L<Storable> has been upgraded from version 2.27 to version 2.28.
160
975dff8c
FC
161It no longer turns copy-on-write scalars into read-only scalars when
162freezing and thawing.
163
daca484d
NC
164=item *
165
f95396b3 166L<Time::HiRes> has been upgraded from version 1.9721_01 to version 1.9722.
91a2e9f6
Z
167
168Portability fix, and avoiding some compiler warnings.
169
170=item *
171
0b3bdea4
LB
172L<Module::CoreList> has been upgraded from version 2.49 to 2.50.
173
174Updated for v5.12.4.
175
176=item *
177
34dc2ec0 178XXX
9780b8fa 179
e8e35311
FC
180=back
181
34dc2ec0 182=head2 Removed Modules and Pragmata
bdb0cce8 183
34dc2ec0 184=over 4
44691e6f 185
5076a392 186=item *
44691e6f 187
34dc2ec0 188XXX
e8e35311
FC
189
190=back
191
34dc2ec0 192=head1 Documentation
44691e6f 193
34dc2ec0
DM
194XXX Changes to files in F<pod/> go here. Consider grouping entries by
195file and be sure to link to the appropriate page, e.g. L<perlfunc>.
6d96b0fe 196
34dc2ec0 197=head2 New Documentation
6d96b0fe 198
34dc2ec0 199XXX Changes which create B<new> files in F<pod/> go here.
6d96b0fe 200
34dc2ec0 201=head3 L<XXX>
e8e35311 202
34dc2ec0 203XXX Description of the purpose of the new file here
6d96b0fe 204
34dc2ec0 205=head2 Changes to Existing Documentation
b7188eb5 206
34dc2ec0
DM
207XXX Changes which significantly change existing files in F<pod/> go here.
208However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
209section.
b7188eb5 210
760696b8
FC
211=head3 L<perlfunc>
212
213=over
214
215=item *
216
217C<given>, C<when> and C<default> are now listed in L<perlfunc> (5.14.1).
218
219=back
220
221=head3 L<perllol>
222
223=over
224
225=item *
226
227L<perllol> has been expanded with examples using the new C<push $scalar>
228syntax introduced in Perl 5.14.0 (5.14.1).
229
230=back
231
232=head3 L<perlop>
b7188eb5 233
34dc2ec0 234=over 4
e8e35311 235
2c389f6c
FC
236=item *
237
760696b8
FC
238The explanation of bitwise operators has been expanded to explain how they
239work on Unicode strings (5.14.1).
240
241=item *
242
243The section on the triple-dot or yada-yada operator has been moved up, as
244it used to separate two closely related sections about the comma operator
245(5.14.1).
246
247=item *
248
249More examples for C<m//g> have been added (5.14.1).
250
251=item *
252
253The C<<< <<\FOO >>> here-doc syntax has been documented (5.14.1).
254
255=back
256
257=head3 L<perlrun>
258
259=over
260
261=item *
262
263L<perlrun> has undergone a significant clean-up. Most notably, the
264B<-0x...> form of the B<-0> flag has been clarified, and the final section
265on environment variables has been corrected and expanded (5.14.1).
2c389f6c 266
e8e35311
FC
267=back
268
34dc2ec0 269=head1 Diagnostics
b7188eb5 270
34dc2ec0
DM
271The following additions or changes have been made to diagnostic output,
272including warnings and fatal error messages. For the complete list of
273diagnostic messages, see L<perldiag>.
44691e6f 274
34dc2ec0
DM
275XXX New or changed warnings emitted by the core's C<C> code go here. Also
276include any changes in L<perldiag> that reconcile it to the C<C> code.
6c9cd4a1 277
34dc2ec0 278[ Within each section, list entries as a =item entry ]
6c9cd4a1 279
34dc2ec0 280=head2 New Diagnostics
44691e6f 281
34dc2ec0 282XXX Newly added diagnostic messages go here
44691e6f 283
34dc2ec0 284=over 4
44691e6f 285
5076a392 286=item *
44691e6f 287
975dff8c
FC
288Assigning to a temporary scalar returned from an XS lvalue subroutine now
289produces a warning: "Useless assignment to a temporary". This should help
290PDL users [RT #31946].
2c389f6c
FC
291
292=back
293
34dc2ec0 294=head2 Changes to Existing Diagnostics
b7188eb5 295
34dc2ec0 296XXX Changes (i.e. rewording) of diagnostic messages go here
b7188eb5 297
34dc2ec0 298=over 4
b7188eb5 299
5076a392 300=item *
b7188eb5 301
34dc2ec0 302XXX
b7188eb5 303
e8e35311 304=back
5076a392 305
34dc2ec0 306=head1 Utility Changes
5076a392 307
34dc2ec0
DM
308XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
309here. Most of these are built within the directories F<utils> and F<x2p>.
5076a392 310
34dc2ec0
DM
311[ List utility changes as a =head3 entry for each utility and =item
312entries for each change
313Use L<XXX> with program names to get proper documentation linking. ]
5076a392 314
34dc2ec0 315=head3 L<XXX>
5076a392 316
34dc2ec0 317=over 4
5076a392
FC
318
319=item *
320
34dc2ec0 321XXX
5076a392 322
2c389f6c 323=back
e8e35311 324
34dc2ec0 325=head1 Configuration and Compilation
5076a392 326
34dc2ec0
DM
327XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
328go here. Any other changes to the Perl build process should be listed here.
329However, any platform-specific changes should be listed in the
330L</Platform Support> section, instead.
2c389f6c 331
34dc2ec0 332[ List changes as a =item entry ].
2c389f6c 333
34dc2ec0 334=over 4
5076a392 335
e8e35311 336=item *
5076a392 337
760696b8
FC
338F<regexp.h> has been modified for compatibility with GCC's B<-Werror>
339option, as used by some projects that include perl's header files (5.14.1).
5076a392 340
34dc2ec0 341=back
5076a392 342
34dc2ec0 343=head1 Testing
5076a392 344
34dc2ec0
DM
345XXX Any significant changes to the testing of a freshly built perl should be
346listed here. Changes which create B<new> files in F<t/> go here as do any
347large changes to the testing harness (e.g. when parallel testing was added).
348Changes to existing files in F<t/> aren't worth summarising, although the bugs
349that they represent may be covered elsewhere.
5076a392 350
34dc2ec0 351[ List each test improvement as a =item entry ]
5076a392 352
34dc2ec0 353=over 4
5076a392
FC
354
355=item *
356
34dc2ec0 357XXX
e8e35311 358
34dc2ec0 359=back
5076a392 360
34dc2ec0 361=head1 Platform Support
5076a392 362
34dc2ec0 363XXX Any changes to platform support should be listed in the sections below.
5076a392 364
34dc2ec0
DM
365[ Within the sections, list each platform as a =item entry with specific
366changes as paragraphs below it. ]
5076a392 367
34dc2ec0 368=head2 New Platforms
5076a392 369
34dc2ec0
DM
370XXX List any platforms that this version of perl compiles on, that previous
371versions did not. These will either be enabled by new files in the F<hints/>
372directories, or new subdirectories and F<README> files at the top level of the
373source tree.
cdc10f43 374
34dc2ec0 375=over 4
cdc10f43 376
34dc2ec0 377=item XXX-some-platform
d430b8e7 378
34dc2ec0 379XXX
d430b8e7 380
2c389f6c 381=back
5076a392 382
34dc2ec0 383=head2 Discontinued Platforms
5076a392 384
34dc2ec0 385XXX List any platforms that this version of perl no longer compiles on.
5076a392 386
34dc2ec0 387=over 4
e8e35311 388
34dc2ec0 389=item XXX-some-platform
e8e35311 390
34dc2ec0 391XXX
1e463951 392
c71a852f 393=back
b7188eb5 394
34dc2ec0 395=head2 Platform-Specific Notes
42a91c97 396
34dc2ec0
DM
397XXX List any changes for specific platforms. This could include configuration
398and compilation changes or changes in portability/compatibility. However,
399changes within modules for platforms should generally be listed in the
400L</Modules and Pragmata> section.
42a91c97 401
34dc2ec0 402=over 4
42a91c97 403
34dc2ec0 404=item XXX-some-platform
42a91c97 405
34dc2ec0 406XXX
42a91c97 407
34dc2ec0 408=back
42a91c97 409
34dc2ec0 410=head1 Internal Changes
42a91c97 411
34dc2ec0
DM
412XXX Changes which affect the interface available to C<XS> code go here.
413Other significant internal changes for future core maintainers should
414be noted as well.
42a91c97 415
34dc2ec0 416=over 4
42a91c97 417
2c389f6c
FC
418=item *
419
74e0ddf7
NC
420The compiled representation of formats is now stored via the mg_ptr of
421their PERL_MAGIC_fm. Previously it was stored in the string buffer,
422beyond SvLEN(), the regular end of the string. SvCOMPILED() and
423SvCOMPILED_{on,off}() now exist solely for compatibility for XS code.
424The first is always 0, the other two now no-ops.
cdc10f43 425
34dc2ec0 426=back
cdc10f43 427
34dc2ec0 428=head1 Selected Bug Fixes
cdc10f43 429
34dc2ec0
DM
430XXX Important bug fixes in the core language are summarised here.
431Bug fixes in files in F<ext/> and F<lib/> are best summarised in
432L</Modules and Pragmata>.
cdc10f43 433
34dc2ec0 434[ List each fix as a =item entry ]
d430b8e7 435
34dc2ec0 436=over 4
d430b8e7
FC
437
438=item *
439
f7a45dff
KW
440The new (in 5.14.0) regular expression modifier C</a> when repeated like
441C</aa> forbids the characters outside the ASCII range that match
442characters inside that range from matching under C</i>. This did not
443work under some circumstances, all involving alternation, such as:
444
445 "\N{KELVIN SIGN}" =~ /k|foo/iaa;
446
447succeeded inaprropriately. This is now fixed.
448
449=item *
450
4515.14.0 introduced some memory leaks in regular expression character
760696b8 452classes such as C<[\w\s]>, which have now been fixed (5.14.1).
f7a45dff
KW
453
454=item *
455
456An edge case in regular expression matching could potentially loop.
457This happened only under C</i> in bracketed character classes that have
458characters with multi-character folds, and the target string to match
459against includes the first portion of the fold, followed by another
460character that has a multi-character fold that begins with the remaining
461portion of the fold, plus some more.
462
463 "s\N{U+DF}" =~ /[\x{DF}foo]/i
464
760696b8 465is one such case. C<\xDF> folds to C<"ss"> (5.14.1).
f7a45dff
KW
466
467=item *
468
469A few characters in regular expression pattern matches did not
470match correctly in some circumstances, all involving C</i>. The
471affected characters are:
472COMBINING GREEK YPOGEGRAMMENI,
473GREEK CAPITAL LETTER IOTA,
474GREEK CAPITAL LETTER UPSILON,
475GREEK PROSGEGRAMMENI,
476GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA,
477GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
478GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA,
479GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
480LATIN SMALL LETTER LONG S,
481LATIN SMALL LIGATURE LONG S T,
482and
483LATIN SMALL LIGATURE ST.
d430b8e7 484
2fbb14a0
DG
485=item *
486
487Formats: number of edge cases have been fixed with formats and formline;
488in particular, where the format itself is potentially variable (such as
489with ties and overloading), and where the format and data differ in their
490encoding. In both these cases, it used to possible for the output to be
491corrupted.
492
760696b8
FC
493=item *
494
495A bug has been fixed that would cause a "Use of freed value in iteration"
496error if the next two hash elements that would be iterated over are
497deleted [RT #85026] (5.14.1).
498
499=item *
500
501Passing the same constant subroutine to both C<index> and C<formline> no
502longer causes one or the other to fail [RT #89218] (5.14.1).
503
975dff8c
FC
504=item *
505
506XXX Someone tell me whether this first clause is correct (see commit
507765f542d):
508
509Copy-on-write scalars were introduced in 5.10.0. These occur when
510C<__PACKAGE__> or a hash key is a assigned to a scalar. Several parts
511of Perl were not updated to account for them, but have now been fixed:
512
513=over
514
515=item *
516
517C<utf8::decode> had a nasty bug that would modify copy-on-write scalars'
518string buffers in place (i.e., skipping the copy). This could result in
519hashes having two elements with the same key [RT #91834].
520
521=item *
522
523Lvalue subroutines were not allowing COW scalars to be returned. This was
524fixed for lvalue scalar context in Perl 5.12.3 and 5.14.0, but list context
525was not fixed until this release.
526
527=item *
528
529Elements of restricted hashes (see the L<fields> pragma) containing
530copy-on-write values couldn't be deleted, nor could such hashes be cleared
531(C<%hash = ()>).
532
533=item *
534
535Localising a tied variable used to make it read-only if it contained a
536copy-on-write string.
537
538=item *
539
540L<Storable>, L<Devel::Peek> and L<PerlIO::scalar> had similar problems.
541See L</Updated Modules and Pragmata>, above.
542
543=back
544
545=item *
546
547There have been various fixes to lvalue subroutines:
548
549XXX Should these first three go under New Features?
550
551=over
552
553=item *
554
555Explicit return now returns the actual argument passed to return, instead
556of copying it [RT #72724].
557
558=item *
559
560Lvalue subroutines used to enforce lvalue syntax (i.e., whatever can go on
561the left-hand side of C<=>) for the last statement and the arguments to
562return. Since lvalue subroutines are not always called in lvalue context,
563this restriction has been lifted.
564
565=item *
566
567Lvalue subroutines are less restrictive as to what values can be returned.
568It used to croak on values returned by C<shift> and C<delete> and from
569other subroutines, but no longer does so.
570
571=item *
572
573Empty lvalue subroutines (C<sub :lvalue {}>) used to return C<@_> in list
574context. In fact, all subroutines used to, but regular subs were fixed in
575Perl 5.8.2. Now lvalue subroutines have been likewise fixed.
576
577=item *
578
579Lvalue subroutines used to copy their return values in rvalue context. Not
580only was this a waste of CPU cycles, but it also caused bugs. A C<($)>
581prototype would cause an lvalue sub to copy its return value [RT #62498],
582and C<while(lvalue_sub() =~ m/.../g) { ... }> would loop endlessly
583[RT #78680].
584
585=item *
586
587Autovivification now works on values returned from lvalue subroutines
588[RT #7946].
589
590=item *
591
592XXX This entry is probably too sarcastic in its use of "inanities". But
593I'm too tired to think of a better wording.
594
595When called in pass-by-reference context (e.g., subroutine arguments or a
596list passed to C<for>), an lvalue subroutine returning arrays or hashes
597used to bind the arrays (or hashes) to scalar variables--something that is
598not supposed to happen. This could result in "Bizzare copy of ARRAY"
599errors or C<print> ignoring its arguments. It also made inanities like
600C<@{\$_}> "work". This was fixed in 5.14.0 if an array were the first
601thing returned from the subroutine (but not for C<$scalar, @array> or
602hashes being returned). Now a more general fix has been applied
603[RT #23790].
604
605=back
606
f5d1ed10
FC
607=item *
608
609List assignment to lexical variables declared with attributes in the same
610statement (C<my ($x,@y) : blimp = (72,94)>) stopped working in Perl 5.8.0.
611It has now been fixed.
612
42a91c97
FC
613=back
614
c71a852f 615=head1 Known Problems
44691e6f 616
34dc2ec0
DM
617XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
618tests that had to be C<TODO>ed for the release would be noted here, unless
619they were specific to a particular platform (see below).
cdc10f43 620
34dc2ec0
DM
621This is a list of some significant unfixed bugs, which are regressions
622from either 5.XXX.XXX or 5.XXX.XXX.
cdc10f43 623
34dc2ec0 624[ List each fix as a =item entry ]
ca767864 625
34dc2ec0 626=over 4
cf5da40b
CB
627
628=item *
629
34dc2ec0 630XXX
cf5da40b 631
c71a852f 632=back
014fb485 633
c71a852f 634=head1 Obituary
014fb485 635
34dc2ec0
DM
636XXX If any significant core contributor has died, we've added a short obituary
637here.
44691e6f 638
44691e6f
AB
639=head1 Acknowledgements
640
34dc2ec0 641XXX The list of people to thank goes here.
29cf780c 642
44691e6f
AB
643=head1 Reporting Bugs
644
645If you find what you think is a bug, you might check the articles
34dc2ec0 646recently posted to the comp.lang.perl.misc newsgroup and the perl
44691e6f
AB
647bug database at http://rt.perl.org/perlbug/ . There may also be
648information at http://www.perl.org/ , the Perl Home Page.
649
650If you believe you have an unreported bug, please run the L<perlbug>
651program included with your release. Be sure to trim your bug down
652to a tiny but sufficient test case. Your bug report, along with the
653output of C<perl -V>, will be sent off to perlbug@perl.org to be
654analysed by the Perl porting team.
655
656If the bug you are reporting has security implications, which make it
657inappropriate to send to a publicly archived mailing list, then please send
34dc2ec0 658it to perl5-security-report@perl.org. This points to a closed subscription
44691e6f
AB
659unarchived mailing list, which includes all the core committers, who be able
660to help assess the impact of issues, figure out a resolution, and help
661co-ordinate the release of patches to mitigate or fix the problem across all
34dc2ec0
DM
662platforms on which Perl is supported. Please only use this address for
663security issues in the Perl core, not for modules independently
44691e6f
AB
664distributed on CPAN.
665
666=head1 SEE ALSO
667
668The F<Changes> file for an explanation of how to view exhaustive details
669on what changed.
670
671The F<INSTALL> file for how to build Perl.
672
673The F<README> file for general stuff.
674
675The F<Artistic> and F<Copying> files for copyright information.
676
677=cut