This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: DB has not been removed
[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
RS
399
400=back
401
402=head1 Internal Changes
403
404XXX Changes which affect the interface available to C<XS> code go here. Other
405significant internal changes for future core maintainers should be noted as
406well.
407
583aa5c2
RS
408=over 4
409
410=item *
411
13b0f67d
DM
412Perl's new copy-on-write mechanism (which is now enabled by default),
413allows any C<SvPOK> scalar to be automatically upgraded to a copy-on-write
414scalar when copied. A reference count on the string buffer is stored in
415the string buffer itself.
416
417For example:
418
419 $ perl -MDevel::Peek -e'$a="abc"; $b = $a; Dump $a; Dump $b'
420 SV = PV(0x260cd80) at 0x2620ad8
421 REFCNT = 1
422 FLAGS = (POK,IsCOW,pPOK)
423 PV = 0x2619bc0 "abc"\0
424 CUR = 3
425 LEN = 16
426 COW_REFCNT = 1
427 SV = PV(0x260ce30) at 0x2620b20
428 REFCNT = 1
429 FLAGS = (POK,IsCOW,pPOK)
430 PV = 0x2619bc0 "abc"\0
431 CUR = 3
432 LEN = 16
433 COW_REFCNT = 1
434
435Note that both scalars share the same PV buffer and have a COW_REFCNT
436greater than zero.
437
438This means that XS code which wishes to modify the C<SvPVX()> buffer of an
439SV should call C<SvPV_force()> or similar first, to ensure a valid (and
440unshared) buffer, and to call C<SvSETMAGIC()> afterwards. This in fact has
441always been the case (for example hash keys were already copy-on-write);
442this change just spreads the COW behaviour to a wider variety of SVs.
443
444One important difference is that before 5.18.0, shared hash-key scalars
445used to have the C<SvREADONLY> flag set; this is no longer the case.
446
447This new behaviour can still be disabled by running F<Configure> with
448B<-Accflags=-DPERL_NO_COW>. This option will probably be removed in Perl
4495.22.
450
451=item *
452
453C<PL_sawampersand> is now a constant. The switch this variable provided
454(to enable/disable the pre-match copy depending on whether C<$&> had been
455seen) has been removed and replaced with copy-on-write, eliminating a few
456bugs.
457
458The previous behaviour can still be enabled by running F<Configure> with
459B<-Accflags=-DPERL_SAWAMPERSAND>.
460
461=item *
462
7df6ffa3
NC
463The functions C<my_swap>, C<my_htonl> and C<my_ntohl> have been removed.
464It is unclear why these functions were ever marked as I<A>, part of the
465API. XS code can't call them directly, as it can't rely on them being
466compiled. Unsurprisingly, no code on CPAN references them.
583aa5c2 467
bb240f8d
DM
468=item *
469
470The signature of the C<Perl_re_intuit_start()> regex function has changed;
471the function pointer C<intuit> in the regex engine plugin structure
472has also changed accordingly. A new parameter, C<strbeg> has been added;
473this has the same meaning as the same-named parameter in
474C<Perl_regexec_flags>. Previously intuit would try to guess the start of
475the string from the passed SV (if any), and would sometimes get it wrong
476(e.g. with an overloaded SV).
477
583aa5c2
RS
478=back
479
480=head1 Selected Bug Fixes
481
482XXX Important bug fixes in the core language are summarized here. Bug fixes in
483files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
5ed58cbd 484
583aa5c2 485[ List each fix as a =item entry ]
32b79602 486
583aa5c2
RS
487=over 4
488
489=item *
490
c2a50ddb
NC
491The OP allocation code now returns correctly aligned memory in all cases
492for C<struct pmop>. Previously it could return memory only aligned to a
4934-byte boundary, which is not correct for an ithreads build with 64 bit IVs
494on some 32 bit platforms. Notably, this caused the build to fail completely
495on sparc GNU/Linux. [RT #118055]
583aa5c2 496
b019bbd2
NC
497=item *
498
499The debugger's C<man> command been fixed. It was broken in the v5.18.0
500release. The C<man> command is aliased to the names C<doc> and C<perldoc> -
501all now work again.
502
9faf471a
NC
503=item *
504
505Evaluating large hashes in scalar context is now much faster, as the number
506of used chains in the hash is now cached for larger hashes. Smaller hashes
507continue not to store it and calculate it when needed, as this saves one IV.
508That would be 1 IV overhead for every object built from a hash. [RT #114576]
509
46f1e811
TC
510=item *
511
bccd8210 512Fixed a small number of regexp constructions that could either fail to
46f1e811
TC
513match or crash perl when the string being matched against was
514allocated above the 2GB line on 32-bit systems. [RT #118175]
515
dc6876f2
FC
516=item *
517
518Perl v5.16 inadvertently introduced a bug whereby calls to XSUBs that were
519not visible at compile time were treated as lvalues and could be assigned
520to, even when the subroutine was not an lvalue sub. This has been fixed.
521[RT #117947]
522
94f72172
FC
523=item *
524
525In Perl v5.18.0 dualvars that had an empty string for the string part but a
526non-zero number for the number part starting being treated as true. In
527previous versions they were treated as false, the string representation
528taking precedeence. The old behaviour has been restored. [RT #118159]
529
c3839c10
FC
530=item *
531
532Since Perl v5.12, inlining of constants that override built-in keywords of
533the same name had countermanded C<use subs>, causing subsequent mentions of
534the constant to use the built-in keyword instead. This has been fixed.
535
81748522
FC
536=item *
537
538Lexical constants (C<my sub a() { 42 }>) no longer crash when inlined.
539
540=item *
541
542Parameter prototypes attached to lexical subroutines are now respected when
543compiling sub calls without parentheses. Previously, the prototypes were
544honoured only for calls I<with> parentheses. [RT #116735]
545
3221bc40
FC
546=item *
547
548Syntax errors in lexical subroutines in combination with calls to the same
549subroutines no longer cause crashes at compile time.
550
2a288271
FC
551=item *
552
553The warning produced by C<-l $handle> now applies to IO refs and globs, not
554just to glob refs. That warning is also now UTF8-clean. [RT #117595]
555
5f050f83
FC
556=item *
557
558Various memory leaks involving the parsing of the C<(?[...])> regular
559expression construct have been fixed.
560
561=item *
562
563C<(?[...])> now allows interpolation of precompiled patterns consisting of
564(?[...])> with bracket character classes inside (C<$pat =
565S<qr/(?[ [a] ])/;> S</(?[ $pat ])/>>). Formerly, the brackets would
566confuse the regular expression parser.
567
a2ef523e
FC
568=item *
569
acfe52c8
FC
570The "Quantifier unexpected on zero-length expression" warning message could
571appear twice starting in Perl v5.10 for a regular expression also
572containing alternations (e.g., "a|b") triggering the trie optimisation.
573
574=item *
575
a2ef523e
FC
576C<delete local $ENV{nonexistent_env_var}> no longer leaks memory.
577
1efc2d08
FC
578=item *
579
580C<sort> and C<require> followed by a keyword prefixed with C<CORE::> now
581treat it as a keyword, and not as a subroutine or module name. [RT #24482]
582
42dd67ca
FC
583=item *
584
585Through certain conundrums, it is possible to cause the current package to
586be freed. Certain operators (C<bless>, C<reset>, C<open>, C<eval>) could
587not cope and would crash. They have been made more resilient. [RT #117941]
588
e0d46238
FC
589=item *
590
591Aliasing filehandles through glob-to-glob assignment would not update
592internal method caches properly if a package of the same name as the
593filehandle existed, resulting in filehandle method calls going to the
594package instead. This has been fixed.
595
583aa5c2
RS
596=back
597
598=head1 Known Problems
599
600XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
601tests that had to be C<TODO>ed for the release would be noted here. Unfixed
602platform specific bugs also go here.
603
604[ List each fix as a =item entry ]
605
606=over 4
607
608=item *
609
610XXX
611
612=back
613
614=head1 Obituary
615
616XXX If any significant core contributor has died, we've added a short obituary
617here.
618
619=head1 Acknowledgements
a75569c0 620
583aa5c2 621XXX Generate this with:
e9912eaa 622
583aa5c2 623 perl Porting/acknowledgements.pl v5.19.1..HEAD
f5b73711 624
44691e6f
AB
625=head1 Reporting Bugs
626
e08634c5
SH
627If you find what you think is a bug, you might check the articles recently
628posted to the comp.lang.perl.misc newsgroup and the perl bug database at
629http://rt.perl.org/perlbug/ . There may also be information at
630http://www.perl.org/ , the Perl Home Page.
44691e6f 631
e08634c5
SH
632If you believe you have an unreported bug, please run the L<perlbug> program
633included with your release. Be sure to trim your bug down to a tiny but
634sufficient test case. Your bug report, along with the output of C<perl -V>,
635will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
636
637If the bug you are reporting has security implications, which make it
e08634c5
SH
638inappropriate to send to a publicly archived mailing list, then please send it
639to perl5-security-report@perl.org. This points to a closed subscription
640unarchived mailing list, which includes all the core committers, who will be
641able to help assess the impact of issues, figure out a resolution, and help
f9001595 642co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
643platforms on which Perl is supported. Please only use this address for
644security issues in the Perl core, not for modules independently distributed on
645CPAN.
44691e6f
AB
646
647=head1 SEE ALSO
648
e08634c5
SH
649The F<Changes> file for an explanation of how to view exhaustive details on
650what changed.
44691e6f
AB
651
652The F<INSTALL> file for how to build Perl.
653
654The F<README> file for general stuff.
655
656The F<Artistic> and F<Copying> files for copyright information.
657
658=cut