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