This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
INSTALL: warning text has changed
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
4dc623f0
CBW
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.21.7
c68523cb 9
238894db 10=head1 DESCRIPTION
c68523cb 11
4dc623f0 12This document describes differences between the 5.21.6 release and the 5.21.7
238894db 13release.
c68523cb 14
4dc623f0
CBW
15If you are upgrading from an earlier release such as 5.21.5, first read
16L<perl5216delta>, which describes differences between 5.21.5 and 5.21.6.
8435afd1 17
4dc623f0 18=head1 Notice
4cad5dc8 19
4dc623f0 20XXX Any important notices here
518159a1 21
4dc623f0 22=head1 Core Enhancements
518159a1 23
4dc623f0
CBW
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.
518159a1 27
4dc623f0 28[ List each enhancement as a =head2 entry ]
518159a1 29
67f2cc75
AC
30=head2 C<fileno> now works on directory handles
31
32When the relevant support is available in the operating system, the
33C<fileno> builtin now works on directory handles, yielding the
34underlying file descriptor in the same way as for filehandles. On
35operating systems without such support, C<fileno> on a directory handle
36continues to return the undefined value, as before, but also sets C<$!> to
37indicate that the operation is not supported.
38
39Currently, this uses either a C<dd_fd> member in the OS C<DIR>
40structure, or a dirfd(3) function as specified by POSIX.1-2008.
41
4dc623f0 42=head1 Security
fe609065 43
4dc623f0
CBW
44XXX Any security-related notices go here. In particular, any security
45vulnerabilities closed should be noted here rather than in the
46L</Selected Bug Fixes> section.
fe609065 47
4dc623f0 48[ List each security issue as a =head2 entry ]
295f7815 49
4dc623f0 50=head1 Incompatible Changes
295f7815 51
4dc623f0 52XXX For a release on a stable branch, this section aspires to be:
bb8c7e27 53
4dc623f0
CBW
54 There are no changes intentionally incompatible with 5.XXX.XXX
55 If any exist, they are bugs, and we request that you submit a
56 report. See L</Reporting Bugs> below.
9f122eef 57
4dc623f0 58[ List each incompatible change as a =head2 entry ]
5cfa0642 59
aafa61ee 60=head2 C<&> and C<\&> prototypes accepts only subs
3f22ed99
FC
61
62The C<&> prototype character now accepts only anonymous subs (C<sub {...}>)
63and things beginning with C<\&>. Formerly it erroneously also allowed
64C<undef> and references to array, hashes, and lists. [perl #4539]
65[perl #123062]
66
aafa61ee
FC
67The C<\&> prototype was allowing subroutine calls, whereas now it only
68allows subroutines. C<&foo> is permitted. C<&foo()> and C<foo()> are not.
69[perl #77860]
70
ef8784b7
FC
71=head2 C<use encoding> is now lexical
72
73The L<encoding> pragma's effect is now limited to lexical scope. This
74pragma is deprecated, but in the meantime, it could adversely affect
75unrelated modules that are included in the same program.
76
0a7766ab
FC
77=head2 List slices returning empty lists
78
79List slices return an empty list now only if the original list was empty
80(or if there are no indices). Formerly, a list slice would return an empty
81list if all indices fell outside the original list. [perl #114498]
82
4dc623f0 83=head1 Deprecations
5b306eef 84
4dc623f0 85XXX Any deprecated features, syntax, modules etc. should be listed here.
5b306eef 86
4dc623f0 87=head2 Module removals
ef7051ba 88
4dc623f0 89XXX Remove this section if inapplicable.
ef7051ba 90
4dc623f0
CBW
91The following modules will be removed from the core distribution in a
92future release, and will at that time need to be installed from CPAN.
93Distributions on CPAN which require these modules will need to list them as
94prerequisites.
b450ee68 95
4dc623f0
CBW
96The core versions of these modules will now issue C<"deprecated">-category
97warnings to alert you to this fact. To silence these deprecation warnings,
98install the modules in question from CPAN.
b450ee68 99
4dc623f0
CBW
100Note that these are (with rare exceptions) fine modules that you are encouraged
101to continue to use. Their disinclusion from core primarily hinges on their
102necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
103not usually on concerns over their design.
1e461e16 104
4dc623f0 105=over
1e461e16 106
4dc623f0 107=item XXX
aa95859b 108
4dc623f0
CBW
109XXX Note that deprecated modules should be listed here even if they are listed
110as an updated module in the L</Modules and Pragmata> section.
aa95859b 111
86372193 112=back
357205d5 113
4dc623f0 114[ List each other deprecation as a =head2 entry ]
6ed80d55 115
c0659f73
KW
116=head2 Setting C<${^ENCODING}> to anything but C<undef>
117
118This variable allows Perl scripts to be written in a non-ASCII,
119non-UTF-8 encoding. However, it affects all modules globally, leading
120to wrong answers and segmentation faults. New scripts should be written
121in UTF-8; old scripts should be converted to UTF-8, which is easily done
122with the L<encoding> pragma.
123
4dc623f0 124=head1 Performance Enhancements
6ed80d55 125
4dc623f0
CBW
126XXX Changes which enhance performance without changing behaviour go here.
127There may well be none in a stable release.
6ed80d55 128
4dc623f0 129[ List each enhancement as a =item entry ]
6ed80d55 130
4dc623f0 131=over 4
6ed80d55
CBW
132
133=item *
134
2adef77e
DD
135Win32 Perl uses 8 KB less of per-process memory than before for every perl
136process of this version. This data is now memory mapped from disk and shared
137between perl processes from the same perl binary.
6ed80d55 138
b9208905
FC
139=item *
140
141If method and class names are known at compile time, hashes are precomputed
142to speed up run-time method lookup. Also, compound method names like
143C<SUPER::new> are parsed at compile time, to save having to parse them at
144run time.
145
4dc623f0 146=back
f4e81f96 147
4dc623f0 148=head1 Modules and Pragmata
bb6a367a 149
4dc623f0
CBW
150XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
151go here. If Module::CoreList is updated, generate an initial draft of the
152following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
153for important changes should then be added by hand. In an ideal world,
154dual-life modules would have a F<Changes> file that could be cribbed.
f348c3d8 155
4dc623f0 156[ Within each section, list entries as a =item entry ]
f348c3d8 157
4dc623f0 158=head2 New Modules and Pragmata
6ed80d55 159
4dc623f0 160=over 4
f348c3d8
A
161
162=item *
163
4dc623f0 164XXX
7635ad4d 165
4dc623f0 166=back
7635ad4d 167
4dc623f0 168=head2 Updated Modules and Pragmata
7635ad4d 169
4dc623f0 170=over 4
f348c3d8 171
6ed80d55 172=item *
f348c3d8 173
cd3802ac
FC
174L<B> has been upgraded from version 1.53 to 1.54.
175
176Nulled COPs are now of class C<B::COP>, rather than C<B::OP>.
177
d6c13051
FC
178B::REGEXP objects now provide a C<qr_anoncv> method for accessing the
179implicit CV associated with C<qr//> things containing code blocks.
180
02a0bddf
FC
181B::PMOP now provides a C<pmregexp> method returning a B::REGEXP object.
182
128f4e12
FC
183Two new classes, B::PADNAME and B::PADNAMELIST, have been introduced.
184
cd3802ac
FC
185=item *
186
7cf50cd1
FC
187L<B::Deparse> has been upgraded from version 1.30 to 1.31.
188
189BEGIN blocks at the end of the enclosing scope are now deparsed in the
190right place. [perl #77452]
191
5371f1f7
FC
192BEGIN blocks were sometimes deparsed as __ANON__, but are now always called
193BEGIN.
194
73fc9720
FC
195Lexical subroutines are now fully deparsed. [perl #116553]
196
9d67d695
FC
197Deparsing of C<$lexical =~ //> was accidentally broken in 1.30 (perl
1985.21.6), omitting the C<$lexical =~>, but has now been fixed.
199
92e6b96d
FC
200C<Anything =~ y///r> with C</r> no longer omits the left-hand operand.
201
aa9bed36
FC
202The op trees that make up regexp code blocks are now deparsed for real.
203Formerly, the original string that made up the regular expression was used.
204That caused problems with C<qr/(?{<<heredoc})/> and multiline code blocks,
205which were deparsed incorrectly. [perl #123217] [perl #115256]
206
9d6cb1a5
FC
207C<$;> at the end of a statement no longer loses its semicolon.
208[perl #123357]
209
d5ced743
FC
210Some cases of subroutine declarations stored in the stash in shorthand form
211were being omitted.
212
3b7745ab
FC
213Non-ASCII characters are now consistently escaped in strings, instead of
214some of the time. (There are still outstanding problems with regular
215expressions and identifiers that have not been fixed.)
216
a2fb0b75
FC
217When prototype sub calls are deparsed with C<&> (e.g., under the B<-P>
218option), C<scalar> is now added where appropriate, to force the scalar
219context implied by the prototype.
220
3aba4f3d
FC
221C<require(foo())>, C<do(foo())>, C<goto(foo())> and similar constructs with
222loop controls are now deparsed correctly. The outer parentheses are not
223optional.
224
a899f84c
FC
225Whitespace is no longer escaped in regular expressions, because it was
226getting erroneously escaped within C<(?x:...)> sections.
227
98ad19a5
FC
228C<sub foo { foo() }> is now deparsed with those mandatory parentheses.
229
649cbf53
FC
230C</@array/> is now deparsed as a regular expression, and not just
231C<@array>.
232
dc5249b4
FC
233C</@{-}/>, C</@{+}/> and C<$#{1}> are now deparsed with the braces, which
234are mandatory in these cases.
235
68cb1d5a
FC
236In deparsing feature bundles, B::Deparse was emitting C<no feature;> first
237instead of C<no feature ':all';>. This has been fixed.
238
48817e79
FC
239C<chdir FH> is now deparsed without quotation marks.
240
b5c00acd
TC
241C<\my @a> is now deparsed without parentheses. (Parenthese would flatten
242the array.)
243
7cf50cd1
FC
244=item *
245
7de6b801
TC
246L<ExtUtils::ParseXS> has been upgraded from version 3.26 to 3.27.
247
248Only declare C<file> unused if we actually define it.
249
250Improve generated C<RETVAL> code generation to avoid repeated
251references to C<ST(0)>. [perl #123278]
f4eedc6b 252
b5c00acd
TC
253Broaden and document the C</OBJ$/> to C</REF$/> typemap optimization
254for the C<DESTROY> method. [perl #123418]
af292847 255
190f5bb6
TC
256=item *
257
258The PathTools module collection has been upgraded from 3.52 to 3.53.
259
260Don't turn leading C<//> into C</> on Cygwin. [perl #122635]
261
ba31029d
TR
262=item *
263
264L<Locale::Maketext> has been upgraded from version 1.25 to 1.26.
265
4c7a0d98
DD
266=item *
267
268L<XSLoader> has been upgraded from version 0.19 to 0.20
269
270Don't test twice for bootstrap file.
271
4dc623f0 272=back
f4eedc6b 273
4dc623f0 274=head2 Removed Modules and Pragmata
f4eedc6b 275
4dc623f0 276=over 4
f348c3d8 277
6ed80d55
CBW
278=item *
279
4dc623f0 280XXX
f348c3d8 281
4dc623f0 282=back
f348c3d8 283
4dc623f0 284=head1 Documentation
f348c3d8 285
4dc623f0
CBW
286XXX Changes to files in F<pod/> go here. Consider grouping entries by
287file and be sure to link to the appropriate page, e.g. L<perlfunc>.
f348c3d8 288
4dc623f0 289=head2 New Documentation
f348c3d8 290
4dc623f0 291XXX Changes which create B<new> files in F<pod/> go here.
f348c3d8 292
4dc623f0 293=head3 L<XXX>
6ed80d55 294
4dc623f0 295XXX Description of the purpose of the new file here
f348c3d8 296
6ed80d55 297=head2 Changes to Existing Documentation
f348c3d8 298
4dc623f0
CBW
299XXX Changes which significantly change existing files in F<pod/> go here.
300However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
301section.
302
303=head3 L<XXX>
84d03adf 304
86372193 305=over 4
ff433f2d 306
4cd408ba
TC
307=item *
308
4dc623f0 309XXX Description of the change here
f348c3d8 310
86372193 311=back
f348c3d8 312
6ed80d55
CBW
313=head1 Diagnostics
314
315The following additions or changes have been made to diagnostic output,
316including warnings and fatal error messages. For the complete list of
317diagnostic messages, see L<perldiag>.
318
4dc623f0
CBW
319XXX New or changed warnings emitted by the core's C<C> code go here. Also
320include any changes in L<perldiag> that reconcile it to the C<C> code.
6ed80d55 321
4dc623f0 322=head2 New Diagnostics
f348c3d8 323
4dc623f0
CBW
324XXX Newly added diagnostic messages go under here, separated into New Errors
325and New Warnings
ab0b796c 326
4dc623f0 327=head3 New Errors
8c6180a9
KW
328
329=over 4
330
331=item *
332
4dc623f0 333XXX L<message|perldiag/"message">
ab0b796c 334
86372193 335=back
0561e60b 336
4dc623f0 337=head3 New Warnings
dd200dff 338
4dc623f0 339=over 4
dd200dff 340
73e793fc
FC
341=item *
342
4dc623f0 343XXX L<message|perldiag/"message">
73e793fc 344
8c6180a9
KW
345=back
346
86372193 347=head2 Changes to Existing Diagnostics
0561e60b 348
4dc623f0 349XXX Changes (i.e. rewording) of diagnostic messages go here
4a328228 350
4dc623f0 351=over 4
4cd408ba 352
1861205d
FC
353=item *
354
fe20bd24
FC
355"Variable %s will not stay shared" has been changed to say "Subroutine"
356when it is actually a lexical sub that will not stay shared.
1861205d 357
86372193 358=back
40a81b59 359
4dc623f0 360=head1 Utility Changes
2a395b86 361
4dc623f0
CBW
362XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
363Most of these are built within the directory F<utils>.
2a395b86 364
4dc623f0
CBW
365[ List utility changes as a =head2 entry for each utility and =item
366entries for each change
367Use L<XXX> with program names to get proper documentation linking. ]
12d22d1f 368
4dc623f0 369=head2 L<XXX>
2a395b86 370
8c8d6154 371=over 4
2a395b86
PM
372
373=item *
374
4dc623f0 375XXX
bb8c7e27 376
86372193 377=back
bb8c7e27 378
4dc623f0 379=head1 Configuration and Compilation
bb8c7e27 380
4dc623f0
CBW
381XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
382go here. Any other changes to the Perl build process should be listed here.
383However, any platform-specific changes should be listed in the
384L</Platform Support> section, instead.
aa292ef2 385
4dc623f0 386[ List changes as a =item entry ].
83b69bfd
DD
387
388=over 4
389
390=item *
391
4dc623f0 392XXX
13adb056 393
83b69bfd
DD
394=back
395
4dc623f0 396=head1 Testing
391823f2 397
4dc623f0
CBW
398XXX Any significant changes to the testing of a freshly built perl should be
399listed here. Changes which create B<new> files in F<t/> go here as do any
400large changes to the testing harness (e.g. when parallel testing was added).
401Changes to existing files in F<t/> aren't worth summarizing, although the bugs
402that they represent may be covered elsewhere.
6ff8f256 403
4dc623f0 404[ List each test improvement as a =item entry ]
80cc3290 405
86372193 406=over 4
db98db4e 407
8818afe8
TC
408=item *
409
4dc623f0 410XXX
9d22ccf6 411
4dc623f0 412=back
480961b6 413
4dc623f0 414=head1 Platform Support
480961b6 415
4dc623f0 416XXX Any changes to platform support should be listed in the sections below.
94c9bf90 417
4dc623f0
CBW
418[ Within the sections, list each platform as a =item entry with specific
419changes as paragraphs below it. ]
94c9bf90 420
4dc623f0 421=head2 New Platforms
8af808bf 422
4dc623f0
CBW
423XXX List any platforms that this version of perl compiles on, that previous
424versions did not. These will either be enabled by new files in the F<hints/>
425directories, or new subdirectories and F<README> files at the top level of the
426source tree.
8af808bf 427
4dc623f0 428=over 4
fdcaecb7 429
4dc623f0 430=item XXX-some-platform
fdcaecb7 431
4dc623f0 432XXX
2af7c6b6 433
4dc623f0 434=back
2af7c6b6 435
4dc623f0 436=head2 Discontinued Platforms
c0b32823 437
4dc623f0 438XXX List any platforms that this version of perl no longer compiles on.
c0b32823 439
4dc623f0 440=over 4
b1a4e8b3 441
4dc623f0 442=item XXX-some-platform
b1a4e8b3 443
4dc623f0 444XXX
9e26817d 445
4dc623f0 446=back
9e26817d 447
4dc623f0 448=head2 Platform-Specific Notes
70cee83f 449
312159d9 450=head3 Win32
70cee83f 451
312159d9 452=over
e5fbfbc1 453
312159d9 454=item *
e5fbfbc1 455
312159d9 456Intel C builds are now always built with C99 mode on.
353075a0 457
4dc623f0 458=back
353075a0 459
4dc623f0 460=head1 Internal Changes
9f122eef 461
4dc623f0
CBW
462XXX Changes which affect the interface available to C<XS> code go here. Other
463significant internal changes for future core maintainers should be noted as
464well.
9f122eef 465
4dc623f0 466[ List each change as a =item entry ]
9f122eef 467
4dc623f0 468=over 4
9f122eef
FC
469
470=item *
471
14f5a3e3
FC
472The PADNAME and PADNAMELIST types are now separate types, and no longer
473simply aliases for SV and AV. [perl #123223]
c7f058f0 474
cd96a1b6
FC
475=item *
476
477Pad names are now always UTF8. The C<PadnameUTF8> macro always returns
478true. Previously, this was effectively the case already, but any support
479for two different internal representations of pad names has now been
480removed.
481
bd2aa467
FC
482=item *
483
484The C<OP_SIBLING> and C<OP_HAS_SIBLING> macros added in an earlier 5.21.x
485release have been renamed C<OpSIBLING> and C<OpHAS_SIBLING>, following the
486existing convention.
487
4dc623f0 488=back
c7f058f0 489
4dc623f0 490=head1 Selected Bug Fixes
0ef4323a 491
4dc623f0
CBW
492XXX Important bug fixes in the core language are summarized here. Bug fixes in
493files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
0ef4323a 494
4dc623f0 495[ List each fix as a =item entry ]
c263379c 496
4dc623f0 497=over 4
c263379c 498
ff90be78
TC
499=item *
500
452466a5
FC
501On Win32, restoring in a child pseudo-process a variable that was
502C<local()>ed in a parent pseudo-process before the C<fork> happened caused
503memory corruption and a crash in the child pseudo-process (and therefore OS
64eb3958 504process). [perl #40565]
ff90be78 505
3e669301
KW
506=item *
507
279aef25
TC
508Calling C<write> on a format with a C<^**> field could produce a panic
509in sv_chop() if there were insufficient arguments or if the variable
510used to fill the field was empty. [perl #123245]
511
00ba25b8
FC
512=item *
513
514Non-ASCII lexical sub names (use in error messages) on longer have extra
515junk on the end.
516
567291b6
FC
517=item *
518
519The C<\@> subroutine prototype no longer flattens parenthesized arrays
520(taking a reference to each element), but takes a reference to the array
521itself. [perl #47363]
522
fcfb7b86
FC
523=item *
524
525A block containing nothing except a C-style C<for> loop could corrupt the
526stack, causing lists outside the block to lose elements or have elements
527overwritten. This could happen with C<map { for(...){...} } ...> and with
528lists containing C<do { for(...){...} }>. [perl #123286]
529
8bb83ec2
FC
530=item *
531
532C<scalar()> now propagates lvalue context, so that
533C<for(scalar($#foo)) { ... }> can modify C<$#foo> through C<$_>.
534
1318b6d7
FC
535=item *
536
537C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY".
538[#123344]
539
6f67fbfe
FC
540=item *
541
542C<eval '$variable'> in nested named subroutines would sometimes look up a
543global variable even with a lexical variable in scope.
544
070733df
FC
545In perl 5.20.0, C<sort CORE::fake> where 'fake' is anything other than a
546keyword started chopping of the last 6 characters and treating the result
547as a sort sub name. The previous behaviour of treating "CORE::fake" as a
548sort sub name has been restored. [perl #123410]
549
219f8441
FC
550=item *
551
552Outside of C<use utf8>, a single-character Latin-1 lexical variable is
553disallowed. The error message for it, "Can't use global $foo...", was
554giving garbage instead of the variable name.
555
86372193 556=back
bb8c7e27 557
86372193 558=head1 Known Problems
bb8c7e27 559
4dc623f0
CBW
560XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
561tests that had to be C<TODO>ed for the release would be noted here. Unfixed
562platform specific bugs also go here.
28a42920 563
4dc623f0 564[ List each fix as a =item entry ]
28a42920 565
6ed80d55
CBW
566=over 4
567
568=item *
569
4dc623f0 570XXX
6ed80d55
CBW
571
572=back
573
86372193 574=head1 Errata From Previous Releases
28a42920 575
86372193 576=over 4
28a42920
A
577
578=item *
579
4dc623f0
CBW
580XXX Add anything here that we forgot to add, or were mistaken about, in
581the perldelta of a previous release.
f5630681 582
8c8d6154 583=back
3a085d00 584
4dc623f0 585=head1 Obituary
01d42a22 586
4dc623f0
CBW
587XXX If any significant core contributor has died, we've added a short obituary
588here.
6ed80d55 589
4dc623f0 590=head1 Acknowledgements
01d42a22 591
4dc623f0 592XXX Generate this with:
01d42a22 593
4dc623f0 594 perl Porting/acknowledgements.pl v5.21.6..HEAD
f5b73711 595
44691e6f
AB
596=head1 Reporting Bugs
597
e08634c5
SH
598If you find what you think is a bug, you might check the articles recently
599posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 600https://rt.perl.org/ . There may also be information at
7ef8b31d 601http://www.perl.org/ , the Perl Home Page.
44691e6f 602
e08634c5
SH
603If you believe you have an unreported bug, please run the L<perlbug> program
604included with your release. Be sure to trim your bug down to a tiny but
605sufficient test case. Your bug report, along with the output of C<perl -V>,
606will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
607
608If the bug you are reporting has security implications, which make it
e08634c5
SH
609inappropriate to send to a publicly archived mailing list, then please send it
610to perl5-security-report@perl.org. This points to a closed subscription
611unarchived mailing list, which includes all the core committers, who will be
612able to help assess the impact of issues, figure out a resolution, and help
f9001595 613co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
614platforms on which Perl is supported. Please only use this address for
615security issues in the Perl core, not for modules independently distributed on
616CPAN.
44691e6f
AB
617
618=head1 SEE ALSO
619
e08634c5
SH
620The F<Changes> file for an explanation of how to view exhaustive details on
621what changed.
44691e6f
AB
622
623The F<INSTALL> file for how to build Perl.
624
625The F<README> file for general stuff.
626
627The F<Artistic> and F<Copying> files for copyright information.
628
629=cut