This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for f791a21a2018
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
38663f11
DG
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.19.2
e128ab2c 9
4eabcf70 10=head1 DESCRIPTION
6db9054f 11
38663f11 12This document describes differences between the 5.19.1 release and the 5.19.2
e08634c5 13release.
6db9054f 14
38663f11
DG
15If you are upgrading from an earlier release such as 5.19.0, first read
16L<perl5191delta>, which describes differences between 5.19.0 and 5.19.1.
42bff0d9 17
38663f11 18=head1 Notice
42bff0d9 19
38663f11 20XXX Any important notices here
d69d1f92 21
38663f11 22=head1 Core Enhancements
287d2d21 23
38663f11
DG
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.
287d2d21 27
ba90f48b
FC
28=head2 More consistent prototype parsing
29
30Multiple semicolons in subroutine prototypes have long been tolerated and
31treated as a single semicolon. There was one case where this did not
32happen. A subroutine whose prototype begins with "*" or ";*" can affect
33whether a bareword is considered a method name or sub call. This now
34applies also to ";;;*".
35
36Whitespace has long been allowed inside subroutine prototypes, so
37C<sub( $ $ )> is equivalent to C<sub($$)>. But it was stripped when the
38subroutine was parse. Hence, whitespace was I<not> allowed in prototypes
39set by C<Scalar::Util::set_prototype>. Now it is permitted, and the parser
40no longer strips whitespace. This means C<prototype &mysub> returns the
41original prototype, whitespace and all.
287d2d21 42
38663f11 43=head1 Security
42bff0d9 44
38663f11
DG
45XXX Any security-related notices go here. In particular, any security
46vulnerabilities closed should be noted here rather than in the
47L</Selected Bug Fixes> section.
42bff0d9 48
38663f11 49[ List each security issue as a =head2 entry ]
42bff0d9 50
38663f11 51=head1 Incompatible Changes
42bff0d9 52
38663f11 53XXX For a release on a stable branch, this section aspires to be:
42bff0d9 54
38663f11
DG
55 There are no changes intentionally incompatible with 5.XXX.XXX
56 If any exist, they are bugs, and we request that you submit a
57 report. See L</Reporting Bugs> below.
42bff0d9 58
38663f11 59[ List each incompatible change as a =head2 entry ]
42bff0d9 60
38663f11 61=head1 Deprecations
42bff0d9 62
38663f11 63XXX Any deprecated features, syntax, modules etc. should be listed here.
42bff0d9 64
38663f11 65=head2 Module removals
42bff0d9 66
38663f11 67XXX Remove this section if inapplicable.
42bff0d9 68
8c33633d
FC
69The following modules will be removed from the core distribution in a
70future release, and will at that time need to be installed from CPAN.
71Distributions on CPAN which require these modules will need to list them as
72prerequisites.
42bff0d9 73
38663f11 74The core versions of these modules will now issue C<"deprecated">-category
8c33633d 75warnings to alert you to this fact. To silence these deprecation warnings,
38663f11 76install the modules in question from CPAN.
42bff0d9 77
38663f11 78Note that these are (with rare exceptions) fine modules that you are encouraged
8c33633d 79to continue to use. Their disinclusion from core primarily hinges on their
38663f11
DG
80necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
81not usually on concerns over their design.
42bff0d9 82
38663f11 83=over
42bff0d9 84
38663f11
DG
85XXX Note that deprecated modules should be listed here even if they are listed
86as an updated module in the L</Modules and Pragmata> section.
42bff0d9 87
38663f11 88=back
42bff0d9 89
38663f11 90[ List each other deprecation as a =head2 entry ]
42bff0d9 91
38663f11 92=head1 Performance Enhancements
42bff0d9 93
38663f11
DG
94XXX Changes which enhance performance without changing behaviour go here.
95There may well be none in a stable release.
42bff0d9 96
38663f11 97[ List each enhancement as a =item entry ]
42bff0d9 98
38663f11 99=over 4
42bff0d9
DG
100
101=item *
102
38663f11 103XXX
42bff0d9 104
38663f11 105=back
42bff0d9 106
38663f11 107=head1 Modules and Pragmata
42bff0d9 108
38663f11
DG
109XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
110go here. If Module::CoreList is updated, generate an initial draft of the
111following sections using F<Porting/corelist-perldelta.pl>, which prints stub
112entries to STDOUT. Results can be pasted in place of the '=head2' entries
113below. A paragraph summary for important changes should then be added by hand.
114In an ideal world, dual-life modules would have a F<Changes> file that could be
115cribbed.
42bff0d9 116
38663f11 117[ Within each section, list entries as a =item entry ]
42bff0d9 118
38663f11 119=head2 New Modules and Pragmata
42bff0d9 120
38663f11 121=over 4
42bff0d9
DG
122
123=item *
124
38663f11 125XXX
42bff0d9 126
38663f11 127=back
42bff0d9 128
38663f11 129=head2 Updated Modules and Pragmata
42bff0d9 130
38663f11 131=over 4
42bff0d9
DG
132
133=item *
134
893b07a1
NC
135L<ExtUtils::Embed> has been upgraded from version 1.30 to 1.31
136
137The generated C<C> code now incorporates bug fixes present in
138F<miniperlmain.c>, and has whitespace changes. It now uses
139C<#include "..."> for header files instead of C<< #include <...> >>.
140This should not make any difference, unless programs embedding C<libperl>
141happen to have local and incompatible files named F<EXTERN.h>, F<XSUB.h> or
142F<perl.h>, as these will now be picked up instead of the installed Perl
143headers.
144
145=item *
146
147L<ExtUtils::Miniperl> has been upgraded and given a version of 1.
148Previously it did not have a version number.
149
150C<writemain()> now takes an optional first argument. A reference to a scalar
151is treated as a filename to be opened and written to. Any other reference is
152used as the filehandle to write to. Otherwise the existing default remains,
153to write to C<STDOUT>.
154
155C<writemain()> has been refactored to use functions from L<ExtUtils::Embed>,
156reducing code size and duplication. The internal function C<canon()> has been
157deleted.
158
159=item *
160
70ba8092
TC
161L<POSIX> has been upgraded from version 1.33 to 1.34.
162
163C<POSIX::AUTOLOAD> will no longer infinitely recurse if the shared
164object fails to load.
42bff0d9 165
6e4979f3
TC
166=item *
167
168L<Storable> has been upgraded from version 2.43 to 2.44.
169
170Calling C<STORABLE_attach> hooks no longer leaks memory. [perl #118829]
171
38663f11 172=back
42bff0d9 173
38663f11 174=head2 Removed Modules and Pragmata
42bff0d9 175
38663f11 176=over 4
42bff0d9
DG
177
178=item *
179
38663f11 180XXX
42bff0d9 181
38663f11 182=back
42bff0d9 183
38663f11 184=head1 Documentation
42bff0d9 185
38663f11
DG
186XXX Changes to files in F<pod/> go here. Consider grouping entries by
187file and be sure to link to the appropriate page, e.g. L<perlfunc>.
42bff0d9 188
38663f11 189=head2 New Documentation
42bff0d9 190
38663f11 191XXX Changes which create B<new> files in F<pod/> go here.
42bff0d9 192
38663f11 193=head3 L<XXX>
42bff0d9 194
38663f11 195XXX Description of the purpose of the new file here
42bff0d9 196
38663f11 197=head2 Changes to Existing Documentation
42bff0d9 198
38663f11
DG
199XXX Changes which significantly change existing files in F<pod/> go here.
200However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
201section.
dbd04185 202
41f6d116 203=head3 L<perlexperiment>
dbd04185 204
38663f11 205=over 4
583aa5c2 206
1fdd5e53
KW
207=item *
208
41f6d116
RS
209Code in regular expressions, regular expression backtracking verbs,
210and lvalue subroutines are no longer listed as experimental. (This
211also affects L<perlre> and L<perlsub>.)
42bff0d9 212
38663f11 213=back
42bff0d9 214
989e4501
FC
215=head3 L<perlfunc>
216
217=over 4
218
219=item *
220
221Since Perl v5.10, it has been possible for subroutines in @INC to return
222a reference to a scalar holding initial source code to prepend to the file.
223This is now documented.
224
225=back
226
38663f11 227=head1 Diagnostics
42bff0d9 228
38663f11
DG
229The following additions or changes have been made to diagnostic output,
230including warnings and fatal error messages. For the complete list of
231diagnostic messages, see L<perldiag>.
42bff0d9 232
38663f11
DG
233XXX New or changed warnings emitted by the core's C<C> code go here. Also
234include any changes in L<perldiag> that reconcile it to the C<C> code.
42bff0d9 235
38663f11 236=head2 New Diagnostics
42bff0d9 237
38663f11
DG
238XXX Newly added diagnostic messages go under here, separated into New Errors
239and New Warnings
42bff0d9 240
38663f11 241=head3 New Errors
42bff0d9 242
38663f11 243=over 4
42bff0d9
DG
244
245=item *
246
38663f11 247XXX L<message|perldiag/"message">
1fdd5e53 248
583aa5c2
RS
249=back
250
38663f11 251=head3 New Warnings
583aa5c2 252
38663f11 253=over 4
583aa5c2 254
b8a02ff1 255=item *
583aa5c2 256
38663f11 257XXX L<message|perldiag/"message">
583aa5c2 258
b8a02ff1 259=back
583aa5c2 260
38663f11 261=head2 Changes to Existing Diagnostics
96d496e4 262
38663f11 263XXX Changes (i.e. rewording) of diagnostic messages go here
b8a02ff1 264
38663f11 265=over 4
b8a02ff1
DG
266
267=item *
268
bfb4a93c
FC
269Under rare circumstances, one could get a "Can't coerce readonly REF to
270string" instead of the customary "Modification of a read-only value". This
271alternate error message has been removed.
96d496e4 272
73951195
FC
273=item *
274
275"Ambiguous use of * resolved as operator *": This and similar warnings
276about "%" and "&" used to occur in some circumstances where there was no
277operator of the type cited, so the warning was completely wrong. This has
278been fixed [perl #117535, #76910].
279
1310e590
FC
280=item *
281
282Warnings about malformed subroutine prototypes are now more consistent in
283how the prototypes are rendered. Some of these warnings would truncate
284prototypes containing nulls. In other cases one warning would suppress
57ae4db8
FC
285another. The warning about illegal characters in prototypes no longer says
286"after '_'" if the bad character came before the underscore.
1310e590 287
96d496e4
RS
288=back
289
38663f11 290=head1 Utility Changes
d7bfa554 291
38663f11
DG
292XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
293Most of these are built within the directories F<utils> and F<x2p>.
d7bfa554 294
38663f11
DG
295[ List utility changes as a =head3 entry for each utility and =item
296entries for each change
297Use L<XXX> with program names to get proper documentation linking. ]
d7bfa554 298
38663f11 299=head3 L<XXX>
583aa5c2
RS
300
301=over 4
1993add8 302
e9912eaa 303=item *
ec985017 304
38663f11 305XXX
583aa5c2
RS
306
307=back
308
38663f11 309=head1 Configuration and Compilation
583aa5c2 310
38663f11
DG
311XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
312go here. Any other changes to the Perl build process should be listed here.
313However, any platform-specific changes should be listed in the
314L</Platform Support> section, instead.
583aa5c2 315
38663f11 316[ List changes as a =item entry ].
583aa5c2
RS
317
318=over 4
71e6aba6 319
d5f315e8
KW
320=item *
321
e38fc308
NC
322F<installperl> and F<installman>'s option handling has been refactored to use
323L<Getopt::Long>. Both are used by the F<Makefile> C<install> targets, and
324are not installed, so these changes are only likely to affect custom
325installation scripts.
326
327=over 4
328
329=item *
330
331single letter options now also have long names
332
333=item *
334
335invalid options are now rejected
336
337=item *
338
339command line arguments that are not options are now rejected
340
341=item *
342
343Each now has a C<--help> option to display the usage message.
344
345=back
346
347The behaviour for all valid documented invocations is unchanged.
d5f315e8 348
337fb649 349=back
2426c394 350
38663f11 351=head1 Testing
357b01df 352
38663f11
DG
353XXX Any significant changes to the testing of a freshly built perl should be
354listed here. Changes which create B<new> files in F<t/> go here as do any
355large changes to the testing harness (e.g. when parallel testing was added).
356Changes to existing files in F<t/> aren't worth summarizing, although the bugs
357that they represent may be covered elsewhere.
4724da03 358
38663f11 359[ List each test improvement as a =item entry ]
357b01df 360
583aa5c2 361=over 4
357b01df 362
583aa5c2 363=item *
357b01df 364
38663f11 365XXX
4724da03 366
38663f11 367=back
4724da03 368
38663f11 369=head1 Platform Support
4724da03 370
38663f11 371XXX Any changes to platform support should be listed in the sections below.
4724da03 372
38663f11
DG
373[ Within the sections, list each platform as a =item entry with specific
374changes as paragraphs below it. ]
4724da03 375
38663f11 376=head2 New Platforms
4724da03 377
38663f11
DG
378XXX List any platforms that this version of perl compiles on, that previous
379versions did not. These will either be enabled by new files in the F<hints/>
380directories, or new subdirectories and F<README> files at the top level of the
381source tree.
4724da03 382
38663f11 383=over 4
357b01df 384
38663f11 385=item XXX-some-platform
583aa5c2 386
38663f11 387XXX
4724da03 388
38663f11 389=back
583aa5c2 390
583aa5c2
RS
391=head2 Discontinued Platforms
392
38663f11
DG
393XXX List any platforms that this version of perl no longer compiles on.
394
583aa5c2
RS
395=over 4
396
38663f11 397=item XXX-some-platform
d7bfa554 398
38663f11 399XXX
d7bfa554 400
583aa5c2
RS
401=back
402
403=head2 Platform-Specific Notes
404
38663f11
DG
405XXX List any changes for specific platforms. This could include configuration
406and compilation changes or changes in portability/compatibility. However,
407changes within modules for platforms should generally be listed in the
408L</Modules and Pragmata> section.
583aa5c2 409
38663f11 410=over 4
a34da6c4 411
3a0b4597 412=item MidnightBSD
a34da6c4 413
3a0b4597 414C<objformat> was removed from version 0.4-RELEASE of MidnightBSD and had been
8c33633d
FC
415deprecated on earlier versions. This caused the build environment to be
416erroneously configured for C<a.out> rather than C<elf>. This has been now
3a0b4597 417been corrected.
a34da6c4 418
583aa5c2
RS
419=back
420
421=head1 Internal Changes
422
38663f11
DG
423XXX Changes which affect the interface available to C<XS> code go here. Other
424significant internal changes for future core maintainers should be noted as
425well.
583aa5c2 426
38663f11 427[ List each change as a =item entry ]
583aa5c2 428
38663f11 429=over 4
1de7c8e6 430
d7bfa554
DG
431=item *
432
eca6ff41
NC
433The Makefile shortcut targets for many rarely (or never) used testing and
434profiling targets have been removed, or merged into the only other Makefile
8c33633d 435target that uses them. Specifically, these targets are gone, along with
eca6ff41
NC
436documentation that referenced them or explained how to use them:
437
9d4d67dd
NC
438 check.third check.utf16 check.utf8 coretest minitest.prep
439 minitest.utf16 perl.config.dashg perl.config.dashpg
440 perl.config.gcov perl.gcov perl.gprof perl.gprof.config
441 perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix
442 perl.third perl.third.config perl.valgrind.config purecovperl
443 pureperl quantperl test.deparse test.taintwarn test.third
444 test.torture test.utf16 test.utf8 test_notty.deparse
445 test_notty.third test_notty.valgrind test_prep.third
446 test_prep.valgrind torturetest ucheck ucheck.third ucheck.utf16
447 ucheck.valgrind utest utest.third utest.utf16 utest.valgrind
eca6ff41
NC
448
449It's still possible to run the relevant commands by "hand" - no underlying
450functionality has been removed.
d7bfa554 451
9c800862
KW
452=item *
453
454It is now possible to keep Perl from initializing locale handling.
455For the most part, Perl doesn't pay attention to locale. (See
456L<perllocale>.) Nonetheless, until now, on startup, it has always
457initialized locale handling to the system default, just in case the
458program being executed ends up using locales. (This is one of the first
459things a locale-aware program should do, long before Perl knows if it
460will actually be needed or not.) This works well except when Perl is
461embedded in another application which wants a locale that isn't the
462system default. Now, if the environment variable
463C<PERL_SKIP_LOCALE_INIT> is set at the time Perl is started, this
464initialization step is skipped. Prior to this, on Windows platforms,
465the only workaround for this deficiency was to use a hacked-up copy of
466internal Perl code. Applications that need to use older Perls can
467discover if the embedded Perl they are using needs the workaround by
468testing that the C preprocessor symbol C<HAS_SKIP_LOCALE_INIT> is not
469defined. (RT #38193)
470
aaf54772
FC
471=item *
472
473C<BmRARE> and C<BmPREVIOUS> have been removed. They were not used anywhere
474and are not part of the API. For XS modules, they are now #defined as 0.
475
b7bbd8b6
FC
476=item *
477
478C<sv_force_normal>, which usually croaks on read-only values, used to allow
479read-only values to be modified at compile time. This has been changed to
480croak on read-only values regardless. This change uncovered several core
481bugs.
482
583aa5c2
RS
483=back
484
485=head1 Selected Bug Fixes
486
38663f11
DG
487XXX Important bug fixes in the core language are summarized here. Bug fixes in
488files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
acfe52c8 489
38663f11 490[ List each fix as a =item entry ]
a2ef523e 491
38663f11 492=over 4
42dd67ca 493
e0d46238
FC
494=item *
495
52c411a5 496There have been several fixes related to Perl's handling of locales. perl
9c800862
KW
497#38193 was described above in L</Internal Changes>.
498Also fixed is #112208 in which the error string in C<$!> displayed as
499garbage in many UTF-8 locales;
500#118197, where the radix (decimal point) character had to be an ASCII
501character (which doesn't work for some non-Western languages);
52c411a5 502and #115808, in which C<POSIX::setlocale()> on failure returned an
9c800862
KW
503C<undef> which didn't warn about not being defined even if those
504warnings were enabled.
d7bfa554 505
81d3ed5a
FC
506=item *
507
508The dtrace sub-entry probe now works with lexical subs, instead of
509crashing [perl #118305].
510
0b023496
FC
511=item *
512
513Compiling a C<split> operator whose third argument is a named constant
514evaulating to 0 no longer causes the constant's value to change.
515
e11f653d
FC
516=item *
517
518A named constant used as the second argument to C<index> no longer gets
5e0164b2
FC
519coerced to a string if it is a reference, regular expression, dualvar, etc.
520
521=item *
522
523A named constant evaluating to the undefined value used as the second
524argument to C<index> no longer produces "uninitialized" warnings at compile
525time. It will still produce them at run time.
e11f653d 526
8be8cdec
FC
527=item *
528
529When a scalar was returned from a subroutine in @INC, the referenced scalar
530was magically converted into an IO thingy, possibly resulting in "Bizarre
531copy" errors if that scalar continued to be used elsewhere. Now Perl uses
532an internal copy of the scalar instead.
533
07a522a5
FC
534=item *
535
536Undefining an inlinable lexical subroutine (C<my sub foo() { 42 } undef
537&foo>) would result in a crash if warnings were turned on.
538
71b4007c
FC
539=item *
540
541Certain uses of the C<sort> operator are optimised to modify an array in
542place, such as C<@a = sort @a>. During the sorting, the array is made
543read-only. If a sort block should happen to die, then the array remained
544read-only even outside the C<sort>. This has been fixed.
545
f6b1d2f5
FC
546=item *
547
548C<$a> and C<$b> inside a sort block are aliased to the actual arguments to
549C<sort>, so they can be modified through those two variables. This did not
550always work, e.g., for lvalue subs and C<$#ary>, and probably many other
551operators. It works now.
552
7e4f209b
FC
553=item *
554
555The arguments to C<sort> are now all in list context. If the C<sort>
556itself were called in void or scalar context, then I<some>, but not all, of
557the arguments used to be in void or scalar context.
558
558673e6
FC
559=item *
560
561Subroutine prototypes with Unicode characters above U+00FF were getting
562mangled during closure cloning. This would happen with subroutines closing
563over lexical variables declared outside, and with lexical subs.
564
47a7c93d
FC
565=item *
566
567In regular expressions containing multiple code blocks, the values of
568C<$1>, C<$2>, etc., set by nested regular expression calls would leak from
569one block to the next. Now these variables always refer to the outer
570regular expression at the start of an embedded block [perl #117917].
571
b5a80c26
FC
572=item *
573
574C<UNIVERSAL::can> now treats its first argument the same way that method
575calls do: Typeglobs and glob references with non-empty IO slots are treated
576as handles, and strings are treated as filehandles, rather than packages,
577if a handle with that name exists [perl #113932].
578
7f1d4316
FC
579=item *
580
581Method calls on typeglobs (e.g., C<< *ARGV->getline >>) used to stringify
582the typeglob and then look it up again. Combined with changes in Perl
5835.18.0, this allowed C<< *foo->bar >> to call methods on the "foo" package
584(like C<< foo->bar >>). In some cases it could cause the method to be
585called on the wrong handle. Now a typeglob argument is treated as a
586handle (just like C<< (\*foo)->bar >>), or, if its IO slot is empty, an
587error is raised.
588
38663f11 589=back
d7bfa554 590
38663f11 591=head1 Known Problems
6810f0ad 592
38663f11
DG
593XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
594tests that had to be C<TODO>ed for the release would be noted here. Unfixed
595platform specific bugs also go here.
6810f0ad 596
38663f11 597[ List each fix as a =item entry ]
0e417e4d 598
38663f11 599=over 4
14fd9356
FC
600
601=item *
602
38663f11 603XXX
0e417e4d 604
38663f11 605=back
583aa5c2 606
38663f11 607=head1 Obituary
583aa5c2 608
38663f11
DG
609XXX If any significant core contributor has died, we've added a short obituary
610here.
583aa5c2 611
583aa5c2 612=head1 Acknowledgements
a75569c0 613
38663f11
DG
614XXX Generate this with:
615
616 perl Porting/acknowledgements.pl v5.19.1..HEAD
f5b73711 617
44691e6f
AB
618=head1 Reporting Bugs
619
e08634c5
SH
620If you find what you think is a bug, you might check the articles recently
621posted to the comp.lang.perl.misc newsgroup and the perl bug database at
622http://rt.perl.org/perlbug/ . There may also be information at
623http://www.perl.org/ , the Perl Home Page.
44691e6f 624
e08634c5
SH
625If you believe you have an unreported bug, please run the L<perlbug> program
626included with your release. Be sure to trim your bug down to a tiny but
627sufficient test case. Your bug report, along with the output of C<perl -V>,
628will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
629
630If the bug you are reporting has security implications, which make it
e08634c5
SH
631inappropriate to send to a publicly archived mailing list, then please send it
632to perl5-security-report@perl.org. This points to a closed subscription
633unarchived mailing list, which includes all the core committers, who will be
634able to help assess the impact of issues, figure out a resolution, and help
f9001595 635co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
636platforms on which Perl is supported. Please only use this address for
637security issues in the Perl core, not for modules independently distributed on
638CPAN.
44691e6f
AB
639
640=head1 SEE ALSO
641
e08634c5
SH
642The F<Changes> file for an explanation of how to view exhaustive details on
643what changed.
44691e6f
AB
644
645The F<INSTALL> file for how to build Perl.
646
647The F<README> file for general stuff.
648
649The F<Artistic> and F<Copying> files for copyright information.
650
651=cut