This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Corrections to 0511665b4b
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
583aa5c2
RS
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.1
e128ab2c 9
4eabcf70 10=head1 DESCRIPTION
6db9054f 11
583aa5c2 12This document describes differences between the 5.19.0 release and the 5.19.1
e08634c5 13release.
6db9054f 14
e9912eaa 15=head1 Notice
5ed58cbd 16
583aa5c2
RS
17XXX Any important notices here
18
19=head1 Core Enhancements
20
21XXX New core language features go here. Summarize user-visible core language
22enhancements. Particularly prominent performance optimisations could go
23here, but most should go in the L</Performance Enhancements> section.
24
25[ List each enhancement as a =head2 entry ]
26
27=head1 Security
28
29XXX Any security-related notices go here. In particular, any security
30vulnerabilities closed should be noted here rather than in the
31L</Selected Bug Fixes> section.
32
33[ List each security issue as a =head2 entry ]
34
35=head1 Incompatible Changes
36
37XXX For a release on a stable branch, this section aspires to be:
38
39 There are no changes intentionally incompatible with 5.XXX.XXX
40 If any exist, they are bugs, and we request that you submit a
41 report. See L</Reporting Bugs> below.
42
43[ List each incompatible change as a =head2 entry ]
44
45=head1 Deprecations
46
47XXX Any deprecated features, syntax, modules etc. should be listed here.
48
49=head2 Module removals
50
51XXX Remove this section if inapplicable.
52
53The following modules will be removed from the core distribution in a future
54release, and will at that time need to be installed from CPAN. Distributions
55on CPAN which require these modules will need to list them as prerequisites.
56
57The core versions of these modules will now issue C<"deprecated">-category
58warnings to alert you to this fact. To silence these deprecation warnings,
59install the modules in question from CPAN.
60
61Note that these are (with rare exceptions) fine modules that you are encouraged
62to continue to use. Their disinclusion from core primarily hinges on their
63necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
64not usually on concerns over their design.
65
66XXX Note that deprecated modules should be listed here even if they are listed
67as an updated module in the L</Modules and Pragmata> section.
68
69=over
70
71=item *
72
d69d1f92 73XXXX
583aa5c2
RS
74
75=back
76
77[ List each other deprecation as a =head2 entry ]
78
79=head1 Performance Enhancements
80
81XXX Changes which enhance performance without changing behaviour go here.
82There may well be none in a stable release.
83
84[ List each enhancement as a =item entry ]
85
86=over 4
87
88=item *
89
13b0f67d
DM
90Perl has a new copy-on-write mechanism that avoids the need to copy the
91internal string buffer when assigning from one scalar to another. This
92makes copying large strings appear much faster. Modifying one of the two
93(or more) strings after an assignment will force a copy internally. This
94makes it unnecessary to pass strings by reference for efficiency.
95
96This feature was already available in 5.18.0, but wasn't enabled by
97default. It is the default now, and so you no longer need build perl with
98the F<Configure> argument:
99
100 -Accflags=PERL_NEW_COPY_ON_WRITE
101
102It can be disabled (for now) in a perl build with:
103
104 -Accflags=PERL_NO_COW
583aa5c2
RS
105
106=back
5ed58cbd 107
e9912eaa 108=head1 Modules and Pragmata
5ed58cbd 109
583aa5c2
RS
110XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
111go here. If Module::CoreList is updated, generate an initial draft of the
112following sections using F<Porting/corelist-perldelta.pl>, which prints stub
113entries to STDOUT. Results can be pasted in place of the '=head2' entries
114below. A paragraph summary for important changes should then be added by hand.
115In an ideal world, dual-life modules would have a F<Changes> file that could be
116cribbed.
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
126XXX
127
128=back
129
e9912eaa 130=head2 Updated Modules and Pragmata
5ed58cbd 131
e9912eaa 132=over 4
5ed58cbd 133
e9912eaa 134=item *
5ed58cbd 135
0597af6b
FC
136B::Deparse has been upgraded from version 1.20 to 1.21.
137
76ac7129 138C<foreach my $lexical> is now deparsed correctly with the B<-p> option.
0597af6b
FC
139[RT #117081]
140
4602962a
FC
141The B<-l> option no longer puts form feeds in the middle of a line when
142outputting C<map> and C<grep> blocks. [RT #117311]
143
708e0828
FC
144Elements of C<%#>, such as C<$# {foo}> and C<${#}{foo}> are now deparsed
145correctly. [RT #117531]
146
0597af6b
FC
147=item *
148
d69d1f92
FC
149L<DB> has been updated from 1.05 to 1.06 and L<perl5db.pl> from 1.39_10
150to 1.40. The call depth allowed by default in the debugger is now 1000
151rather than 100.
152
153=item *
154
287d2d21
FC
155File::Spec has been upgraded from version 3.40 to 3.41.
156
157C<tmpdir> now respects changes to environment variables from which the
158temporary directory is derived. [RT #88940]
159
160=item *
161
dbd04185
NC
162Test::Harness has been upgraded from version 3.26 to 3.28
163
164Memory usage is dramatically reduced. t/harness now uses about 10% of the
165memory used by 3.26 and earlier.
166
167C<PERL5LIB> is always propagated to a test's C<@INC>, even under C<-T>.
583aa5c2 168
1fdd5e53
KW
169=item *
170
171Unicode::UCD has been upgraded from version 0.51 to 0.52.
172
173A function, L<Unicode::UCD/search_invlist()> is now available to do
174search an inversion list or map for a code point.
175
583aa5c2
RS
176=back
177
178=head2 Removed Modules and Pragmata
179
180=over 4
5ed58cbd 181
e9912eaa 182=item *
5ed58cbd 183
583aa5c2
RS
184XXX
185
186=back
187
188=head1 Documentation
189
190XXX Changes to files in F<pod/> go here. Consider grouping entries by
191file and be sure to link to the appropriate page, e.g. L<perlfunc>.
192
193=head2 New Documentation
194
195XXX Changes which create B<new> files in F<pod/> go here.
196
197=head3 L<XXX>
198
199XXX Description of the purpose of the new file here
200
201=head2 Changes to Existing Documentation
202
203XXX Changes which significantly change existing files in F<pod/> go here.
204However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
205section.
206
4990a62a 207=head3 L<perltrap>
583aa5c2
RS
208
209=over 4
1993add8 210
e9912eaa 211=item *
ec985017 212
4990a62a 213There is now a L<JavaScript|perltrap/JavaScript Traps> section.
583aa5c2
RS
214
215=back
216
217=head1 Diagnostics
218
219The following additions or changes have been made to diagnostic output,
220including warnings and fatal error messages. For the complete list of
221diagnostic messages, see L<perldiag>.
222
223XXX New or changed warnings emitted by the core's C<C> code go here. Also
224include any changes in L<perldiag> that reconcile it to the C<C> code.
225
226=head2 New Diagnostics
227
228XXX Newly added diagnostic messages go under here, separated into New Errors
229and New Warnings
230
231=head3 New Errors
232
233=over 4
71e6aba6
RS
234
235=item *
236
583aa5c2
RS
237XXX L<message|perldiag/"message">
238
239=back
240
241=head3 New Warnings
242
243=over 4
71e6aba6 244
d5f315e8
KW
245=item *
246
6f397ec1
FC
247L<A sequence of multiple spaces in a charnames alias definition is deprecated|perldiag/"A sequence of multiple spaces in a charnames alias definition is deprecated">
248
249L<Trailing white-space in a charnames alias definition is deprecated|perldiag/"Trailing white-space in a charnames alias definition is deprecated">
250
251These two deprecation warnings involving C<\N{...}> were incorrectly
252implemented. They did not warn by default (now they do) and could not be
253made fatal via C<use warnings FATAL => 'deprecated'> (now they can).
d5f315e8 254
337fb649 255=back
2426c394 256
583aa5c2 257=head2 Changes to Existing Diagnostics
e9912eaa 258
583aa5c2 259XXX Changes (i.e. rewording) of diagnostic messages go here
357b01df 260
583aa5c2 261=over 4
357b01df 262
583aa5c2 263=item *
357b01df 264
583aa5c2 265XXX Describe change here
357b01df 266
583aa5c2 267=back
357b01df 268
583aa5c2 269=head1 Utility Changes
357b01df 270
583aa5c2
RS
271XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
272Most of these are built within the directories F<utils> and F<x2p>.
357b01df 273
583aa5c2
RS
274[ List utility changes as a =head3 entry for each utility and =item
275entries for each change
276Use L<XXX> with program names to get proper documentation linking. ]
357b01df 277
4724da03
NC
278=head3 F<bisect.pl> enhancements
279
280The git bisection tool F<Porting/bisect.pl> has had many enhancements.
357b01df 281
583aa5c2 282=over 4
357b01df 283
583aa5c2 284=item *
357b01df 285
4724da03
NC
286Can optionally run the test case with a timeout.
287
288=item *
289
290Can now run in-place in a clean git checkout.
291
292=item *
293
294Can run the test case under C<valgrind>.
295
296=item *
297
298Can apply user supplied patches and fixes to the source checkout before
299building.
300
301=item *
302
303Now has fixups to enable building several more historical ranges of bleadperl,
304which can be useful for pinpointing the origins of bugs or behaviour changes.
357b01df 305
583aa5c2
RS
306=back
307
4724da03
NC
308It is provided as part of the source distribution but not installed because
309it is not self-contained as it relies on being run from within a git
310checkout. Note also that it makes no attempt to fix tests, correct runtime
311bugs or make something useful to install - its purpose is to make minimal
312changes to get any historical revision of interest to build and run as close
313as possible to "as-was", and thereby make C<git bisect> easy to use.
314
583aa5c2
RS
315=head1 Configuration and Compilation
316
317XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
318go here. Any other changes to the Perl build process should be listed here.
319However, any platform-specific changes should be listed in the
320L</Platform Support> section, instead.
321
322[ List changes as a =item entry ].
323
324=over 4
325
326=item *
327
328XXX
357b01df 329
e9912eaa 330=back
357b01df 331
583aa5c2
RS
332=head1 Testing
333
334XXX Any significant changes to the testing of a freshly built perl should be
335listed here. Changes which create B<new> files in F<t/> go here as do any
336large changes to the testing harness (e.g. when parallel testing was added).
337Changes to existing files in F<t/> aren't worth summarizing, although the bugs
338that they represent may be covered elsewhere.
339
340[ List each test improvement as a =item entry ]
341
342=over 4
343
344=item *
345
346XXX
347
348=back
349
350=head1 Platform Support
351
352XXX Any changes to platform support should be listed in the sections below.
353
354[ Within the sections, list each platform as a =item entry with specific
355changes as paragraphs below it. ]
356
357=head2 New Platforms
358
359XXX List any platforms that this version of perl compiles on, that previous
360versions did not. These will either be enabled by new files in the F<hints/>
361directories, or new subdirectories and F<README> files at the top level of the
362source tree.
363
364=over 4
365
366=item XXX-some-platform
367
368XXX
369
370=back
371
372=head2 Discontinued Platforms
373
374XXX List any platforms that this version of perl no longer compiles on.
375
376=over 4
377
378=item XXX-some-platform
357b01df 379
583aa5c2 380XXX
5ed58cbd 381
583aa5c2
RS
382=back
383
384=head2 Platform-Specific Notes
385
386XXX List any changes for specific platforms. This could include configuration
387and compilation changes or changes in portability/compatibility. However,
388changes within modules for platforms should generally be listed in the
389L</Modules and Pragmata> section.
390
391=over 4
392
7df6ffa3 393=item Mixed-endian platforms
583aa5c2 394
7df6ffa3
NC
395The code supporting C<pack> and C<unpack> operations on mixed endian
396platforms has been removed. We believe that Perl has long been unable to
397build on mixed endian architectures (such as PDP-11s), so we don't think
398that this change will affect any platforms which are able to build v5.18.0.
583aa5c2 399
a34da6c4
SH
400=item Windows
401
402The BUILD_STATIC and ALL_STATIC makefile options for linking some or (nearly)
403all extensions statically (into perl519.dll, and into a separate
404perl-static.exe too) were broken for MinGW builds. This has now been fixed.
405
406The ALL_STATIC option has also been improved to include the Win32 extension,
407and also the Encode extension for VC++ builds. (However, Encode and
408Compress/Raw/Bzip2 are currently still excluded from MinGW builds. This will
409hopefully be rectified soon.)
410
583aa5c2
RS
411=back
412
413=head1 Internal Changes
414
415XXX Changes which affect the interface available to C<XS> code go here. Other
416significant internal changes for future core maintainers should be noted as
417well.
418
583aa5c2
RS
419=over 4
420
421=item *
422
13b0f67d
DM
423Perl's new copy-on-write mechanism (which is now enabled by default),
424allows any C<SvPOK> scalar to be automatically upgraded to a copy-on-write
425scalar when copied. A reference count on the string buffer is stored in
426the string buffer itself.
427
428For example:
429
430 $ perl -MDevel::Peek -e'$a="abc"; $b = $a; Dump $a; Dump $b'
431 SV = PV(0x260cd80) at 0x2620ad8
432 REFCNT = 1
433 FLAGS = (POK,IsCOW,pPOK)
434 PV = 0x2619bc0 "abc"\0
435 CUR = 3
436 LEN = 16
437 COW_REFCNT = 1
438 SV = PV(0x260ce30) at 0x2620b20
439 REFCNT = 1
440 FLAGS = (POK,IsCOW,pPOK)
441 PV = 0x2619bc0 "abc"\0
442 CUR = 3
443 LEN = 16
444 COW_REFCNT = 1
445
446Note that both scalars share the same PV buffer and have a COW_REFCNT
447greater than zero.
448
449This means that XS code which wishes to modify the C<SvPVX()> buffer of an
450SV should call C<SvPV_force()> or similar first, to ensure a valid (and
451unshared) buffer, and to call C<SvSETMAGIC()> afterwards. This in fact has
452always been the case (for example hash keys were already copy-on-write);
453this change just spreads the COW behaviour to a wider variety of SVs.
454
455One important difference is that before 5.18.0, shared hash-key scalars
456used to have the C<SvREADONLY> flag set; this is no longer the case.
457
458This new behaviour can still be disabled by running F<Configure> with
459B<-Accflags=-DPERL_NO_COW>. This option will probably be removed in Perl
4605.22.
461
462=item *
463
464C<PL_sawampersand> is now a constant. The switch this variable provided
465(to enable/disable the pre-match copy depending on whether C<$&> had been
466seen) has been removed and replaced with copy-on-write, eliminating a few
467bugs.
468
469The previous behaviour can still be enabled by running F<Configure> with
470B<-Accflags=-DPERL_SAWAMPERSAND>.
471
472=item *
473
7df6ffa3
NC
474The functions C<my_swap>, C<my_htonl> and C<my_ntohl> have been removed.
475It is unclear why these functions were ever marked as I<A>, part of the
476API. XS code can't call them directly, as it can't rely on them being
477compiled. Unsurprisingly, no code on CPAN references them.
583aa5c2 478
bb240f8d
DM
479=item *
480
481The signature of the C<Perl_re_intuit_start()> regex function has changed;
482the function pointer C<intuit> in the regex engine plugin structure
483has also changed accordingly. A new parameter, C<strbeg> has been added;
484this has the same meaning as the same-named parameter in
485C<Perl_regexec_flags>. Previously intuit would try to guess the start of
486the string from the passed SV (if any), and would sometimes get it wrong
487(e.g. with an overloaded SV).
488
1de7c8e6
KW
489=item *
490
491XS code may use various macros to change the case of a character or code
50d028f8
KW
492point (for example C<toLOWER_utf8()>). Only a couple of these were
493documented until now;
1de7c8e6
KW
494and now they should be used in preference to calling the underlying
495functions. See L<perlapi/Character case changing>.
496
583aa5c2
RS
497=back
498
499=head1 Selected Bug Fixes
500
501XXX Important bug fixes in the core language are summarized here. Bug fixes in
502files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
5ed58cbd 503
583aa5c2 504[ List each fix as a =item entry ]
32b79602 505
583aa5c2
RS
506=over 4
507
508=item *
509
c2a50ddb
NC
510The OP allocation code now returns correctly aligned memory in all cases
511for C<struct pmop>. Previously it could return memory only aligned to a
5124-byte boundary, which is not correct for an ithreads build with 64 bit IVs
513on some 32 bit platforms. Notably, this caused the build to fail completely
514on sparc GNU/Linux. [RT #118055]
583aa5c2 515
b019bbd2
NC
516=item *
517
518The debugger's C<man> command been fixed. It was broken in the v5.18.0
519release. The C<man> command is aliased to the names C<doc> and C<perldoc> -
520all now work again.
521
9faf471a
NC
522=item *
523
a1fd55a8
RS
524C<@_> is now correctly visible in the debugger, fixing a regression
525introduced in v5.18.0's debugger. [RT #118169]
526
527=item *
528
9faf471a
NC
529Evaluating large hashes in scalar context is now much faster, as the number
530of used chains in the hash is now cached for larger hashes. Smaller hashes
531continue not to store it and calculate it when needed, as this saves one IV.
532That would be 1 IV overhead for every object built from a hash. [RT #114576]
533
46f1e811
TC
534=item *
535
bccd8210 536Fixed a small number of regexp constructions that could either fail to
46f1e811
TC
537match or crash perl when the string being matched against was
538allocated above the 2GB line on 32-bit systems. [RT #118175]
539
dc6876f2
FC
540=item *
541
542Perl v5.16 inadvertently introduced a bug whereby calls to XSUBs that were
543not visible at compile time were treated as lvalues and could be assigned
544to, even when the subroutine was not an lvalue sub. This has been fixed.
545[RT #117947]
546
94f72172
FC
547=item *
548
549In Perl v5.18.0 dualvars that had an empty string for the string part but a
550non-zero number for the number part starting being treated as true. In
551previous versions they were treated as false, the string representation
552taking precedeence. The old behaviour has been restored. [RT #118159]
553
c3839c10
FC
554=item *
555
556Since Perl v5.12, inlining of constants that override built-in keywords of
557the same name had countermanded C<use subs>, causing subsequent mentions of
558the constant to use the built-in keyword instead. This has been fixed.
559
81748522
FC
560=item *
561
562Lexical constants (C<my sub a() { 42 }>) no longer crash when inlined.
563
564=item *
565
566Parameter prototypes attached to lexical subroutines are now respected when
567compiling sub calls without parentheses. Previously, the prototypes were
568honoured only for calls I<with> parentheses. [RT #116735]
569
3221bc40
FC
570=item *
571
572Syntax errors in lexical subroutines in combination with calls to the same
573subroutines no longer cause crashes at compile time.
574
2a288271
FC
575=item *
576
577The warning produced by C<-l $handle> now applies to IO refs and globs, not
578just to glob refs. That warning is also now UTF8-clean. [RT #117595]
579
5f050f83
FC
580=item *
581
582Various memory leaks involving the parsing of the C<(?[...])> regular
583expression construct have been fixed.
584
585=item *
586
587C<(?[...])> now allows interpolation of precompiled patterns consisting of
386de649 588C<(?[...])> with bracketed character classes inside (C<$pat =
5f050f83
FC
589S<qr/(?[ [a] ])/;> S</(?[ $pat ])/>>). Formerly, the brackets would
590confuse the regular expression parser.
591
a2ef523e
FC
592=item *
593
acfe52c8
FC
594The "Quantifier unexpected on zero-length expression" warning message could
595appear twice starting in Perl v5.10 for a regular expression also
596containing alternations (e.g., "a|b") triggering the trie optimisation.
597
598=item *
599
a2ef523e
FC
600C<delete local $ENV{nonexistent_env_var}> no longer leaks memory.
601
1efc2d08
FC
602=item *
603
604C<sort> and C<require> followed by a keyword prefixed with C<CORE::> now
605treat it as a keyword, and not as a subroutine or module name. [RT #24482]
606
42dd67ca
FC
607=item *
608
609Through certain conundrums, it is possible to cause the current package to
610be freed. Certain operators (C<bless>, C<reset>, C<open>, C<eval>) could
611not cope and would crash. They have been made more resilient. [RT #117941]
612
e0d46238
FC
613=item *
614
615Aliasing filehandles through glob-to-glob assignment would not update
616internal method caches properly if a package of the same name as the
617filehandle existed, resulting in filehandle method calls going to the
618package instead. This has been fixed.
619
583aa5c2
RS
620=back
621
622=head1 Known Problems
623
624XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
625tests that had to be C<TODO>ed for the release would be noted here. Unfixed
626platform specific bugs also go here.
627
628[ List each fix as a =item entry ]
629
630=over 4
631
632=item *
633
634XXX
635
636=back
637
638=head1 Obituary
639
640XXX If any significant core contributor has died, we've added a short obituary
641here.
642
643=head1 Acknowledgements
a75569c0 644
583aa5c2 645XXX Generate this with:
e9912eaa 646
583aa5c2 647 perl Porting/acknowledgements.pl v5.19.1..HEAD
f5b73711 648
44691e6f
AB
649=head1 Reporting Bugs
650
e08634c5
SH
651If you find what you think is a bug, you might check the articles recently
652posted to the comp.lang.perl.misc newsgroup and the perl bug database at
653http://rt.perl.org/perlbug/ . There may also be information at
654http://www.perl.org/ , the Perl Home Page.
44691e6f 655
e08634c5
SH
656If you believe you have an unreported bug, please run the L<perlbug> program
657included with your release. Be sure to trim your bug down to a tiny but
658sufficient test case. Your bug report, along with the output of C<perl -V>,
659will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
660
661If the bug you are reporting has security implications, which make it
e08634c5
SH
662inappropriate to send to a publicly archived mailing list, then please send it
663to perl5-security-report@perl.org. This points to a closed subscription
664unarchived mailing list, which includes all the core committers, who will be
665able to help assess the impact of issues, figure out a resolution, and help
f9001595 666co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
667platforms on which Perl is supported. Please only use this address for
668security issues in the Perl core, not for modules independently distributed on
669CPAN.
44691e6f
AB
670
671=head1 SEE ALSO
672
e08634c5
SH
673The F<Changes> file for an explanation of how to view exhaustive details on
674what changed.
44691e6f
AB
675
676The F<INSTALL> file for how to build Perl.
677
678The F<README> file for general stuff.
679
680The F<Artistic> and F<Copying> files for copyright information.
681
682=cut