This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mark blead-only modifications of Compress::Raw::{Bzip2,Zlib} with version bump
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
e96e0834
JL
5[ this is a template for a new perldelta file. Any text flagged as
6XXX needs to be processed before release. ]
27f00e3d 7
e96e0834 8perldelta - what is new for perl v5.17.2
417a992d 9
e96e0834 10=head1 DESCRIPTION
028c8719 11
e96e0834
JL
12This document describes differences between the 5.17.1 release and
13the 5.17.2 release.
028c8719 14
e96e0834
JL
15If you are upgrading from an earlier release such as 5.17.0, first read
16L<perl5171delta>, which describes differences between 5.17.0 and
175.17.1.
028c8719 18
e96e0834 19=head1 Notice
30608892 20
e96e0834 21XXX Any important notices here
e128ab2c 22
e96e0834 23=head1 Core Enhancements
e128ab2c 24
e96e0834
JL
25XXX New core language features go here. Summarise user-visible core language
26enhancements. Particularly prominent performance optimisations could go
27here, but most should go in the L</Performance Enhancements> section.
fe3193b5 28
e96e0834 29[ List each enhancement as a =head2 entry ]
05c8f9ed 30
90519d0f
FC
31=head2 C<kill> with negative signal names
32
33C<kill> has always allowed a negative signal number, which kills the
34process group instead of a single process. It has also allowed signal
35names. But it did not behave consistently, because negative signal names
36were treated as 0. Now negative signals names like C<-INT> are supported
37and treated the same way as -2 [perl #112990].
38
e96e0834 39=head1 Security
0da72d5e 40
e96e0834
JL
41XXX Any security-related notices go here. In particular, any security
42vulnerabilities closed should be noted here rather than in the
43L</Selected Bug Fixes> section.
0da72d5e 44
e96e0834 45[ List each security issue as a =head2 entry ]
0da72d5e 46
e96e0834 47=head1 Incompatible Changes
0da72d5e 48
e96e0834 49XXX For a release on a stable branch, this section aspires to be:
0da72d5e 50
e96e0834
JL
51 There are no changes intentionally incompatible with 5.XXX.XXX
52 If any exist, they are bugs, and we request that you submit a
53 report. See L</Reporting Bugs> below.
0da72d5e 54
e96e0834 55[ List each incompatible change as a =head2 entry ]
e2f0c3bb 56
e96e0834 57=head1 Deprecations
e2f0c3bb 58
e96e0834
JL
59XXX Any deprecated features, syntax, modules etc. should be listed here.
60In particular, deprecated modules should be listed here even if they are
61listed as an updated module in the L</Modules and Pragmata> section.
7d101ed1 62
e96e0834 63[ List each deprecation as a =head2 entry ]
7d101ed1 64
e96e0834 65=head1 Performance Enhancements
7d101ed1 66
e96e0834
JL
67XXX Changes which enhance performance without changing behaviour go here. There
68may well be none in a stable release.
7d101ed1 69
e96e0834 70[ List each enhancement as a =item entry ]
95ce428c 71
f9001595 72=over 4
75ff5956 73
2630d42b 74=item *
c11980ad 75
e96e0834 76XXX
53de3ff0 77
61174fb5 78=back
ef7131e9 79
61174fb5 80=head1 Modules and Pragmata
ef7131e9 81
e96e0834
JL
82XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
83go here. If Module::CoreList is updated, generate an initial draft of the
84following sections using F<Porting/corelist-perldelta.pl>, which prints stub
85entries to STDOUT. Results can be pasted in place of the '=head2' entries
86below. A paragraph summary for important changes should then be added by hand.
87In an ideal world, dual-life modules would have a F<Changes> file that could be
88cribbed.
5cefbec9 89
e96e0834 90[ Within each section, list entries as a =item entry ]
fbdb83f3 91
e96e0834 92=head2 New Modules and Pragmata
95c6c5c5 93
e96e0834 94=over 4
9331f04e
NC
95
96=item *
97
e96e0834 98XXX
95c6c5c5 99
e96e0834 100=back
ff3f295c 101
e96e0834 102=head2 Updated Modules and Pragmata
ff3f295c 103
e96e0834 104=over 4
95c6c5c5 105
95c6c5c5
JL
106=item *
107
4c77591b
NC
108L<File::stat> has been upgraded from version 1.06 to 1.07.
109
110Previously C<File::stat>'s overloaded C<-x> and C<-X> operators did not give
111the correct results for directories or executable files when running as
112root. They had been treating executable permissions for root just like for
113any other user, performing group membership tests I<etc> for files not owned
114by root. They now follow the correct Unix behaviour - for a directory they
115are always true, and for a file if any of the three execute permission bits
116are set then they report that root can execute the file. Perl's builtin
117C<-x> and C<-X> operators have always been correct.
c506fc7e 118
36ab1671
FC
119=item *
120
121L<Tie::StdHandle> has been upgraded from version 4.2 to 4.3.
122
123C<READ> now respects the offset argument to C<read> [perl #112826].
124
df2c1bb8
TC
125=item *
126
127L<IO> has been upgraded from version 1.25_07 to 1.25_08.
128
129L<IO::Socket> tries harder to cache or otherwise fetch socket
130information.
131
7ab2ea42
TC
132=item *
133
134L<Storable> has been upgraded from version 2.36 to 2.37.
135
136Restricted hashes were not always thawed correctly [perl #73972].
137
138Storable would croak when freezing a blessed REF object with a
139C<STORABLE_freeze()> method [perl #113880].
140
3be135d8
TC
141=item *
142
143L<Socket> has been upgraded from version 2.001 to 2.002.
144
e96e0834 145=back
c506fc7e 146
e96e0834 147=head2 Removed Modules and Pragmata
c506fc7e 148
e96e0834 149=over 4
95c6c5c5 150
95c6c5c5
JL
151=item *
152
e96e0834 153XXX
95c6c5c5 154
e96e0834 155=back
95c6c5c5 156
e96e0834 157=head1 Documentation
95c6c5c5 158
e96e0834
JL
159XXX Changes to files in F<pod/> go here. Consider grouping entries by
160file and be sure to link to the appropriate page, e.g. L<perlfunc>.
95c6c5c5 161
e96e0834 162=head2 New Documentation
1c633914 163
e96e0834 164XXX Changes which create B<new> files in F<pod/> go here.
f558db2f 165
e96e0834 166=head3 L<XXX>
66aa79e2 167
e96e0834 168XXX Description of the purpose of the new file here
95c6c5c5 169
e96e0834 170=head2 Changes to Existing Documentation
95c6c5c5 171
e96e0834
JL
172XXX Changes which significantly change existing files in F<pod/> go here.
173However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
174section.
95c6c5c5 175
66b30015 176=head3 L<perlfunc>
95c6c5c5 177
e96e0834 178=over 4
95c6c5c5
JL
179
180=item *
181
66b30015 182Clarified documentation of C<our>.
95c6c5c5 183
e96e0834 184=back
95c6c5c5 185
e96e0834 186=head1 Diagnostics
95c6c5c5 187
e96e0834
JL
188The following additions or changes have been made to diagnostic output,
189including warnings and fatal error messages. For the complete list of
190diagnostic messages, see L<perldiag>.
95c6c5c5 191
e96e0834
JL
192XXX New or changed warnings emitted by the core's C<C> code go here. Also
193include any changes in L<perldiag> that reconcile it to the C<C> code.
71014848 194
e96e0834
JL
195[ Within each section, list entries as a =item entry that links to perldiag,
196 e.g.
71014848 197
e96e0834 198 =item *
95c6c5c5 199
e96e0834
JL
200 L<Invalid version object|perldiag/"Invalid version object">
201]
95c6c5c5 202
e96e0834 203=head2 New Diagnostics
95c6c5c5 204
e96e0834 205XXX Newly added diagnostic messages go here
95c6c5c5 206
e96e0834 207=head3 New Errors
95c6c5c5 208
e96e0834 209=over 4
95c6c5c5 210
95c6c5c5
JL
211=item *
212
a9be10f4 213L<Group name must start with a non-digit word character in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Group name must start with a non-digit word character in regex; marked by <-- HERE in m/%s/">
40e43b78
FC
214
215This error has been added for C<(?&0)>, which is invalid. It used to
216produce an incomprehensible error message [perl #101666].
95c6c5c5 217
b8a55fe7
FC
218=item *
219
220L<Can't use an undefined value as a subroutine reference|perldiag/"Can't use an undefined value as %s reference">
221
222Calling an undefined value as a subroutine now produces this error message.
223It used to, but was accidentally disabled, first in Perl 5.004 for
224non-magical variables, and then in Perl 5.14 for magical (e.g., tied)
225variables. It has now been restored. In the mean time, undef was treated
226as an empty string [perl #113576].
227
e96e0834 228=back
95c6c5c5 229
e96e0834 230=head3 New Warnings
95c6c5c5 231
e96e0834 232=over 4
95c6c5c5 233
95c6c5c5
JL
234=item *
235
72267260
JL
236C<chr()> now warns when passed a negative value [perl #83048].
237
238=item *
239
240C<srand()> now warns when passed a value that doesn't fit in a C<UV> (since the
241value will be truncated rather than overflowing) [perl #40605].
7d101ed1 242
e013ada0
JL
243=item *
244
245Running perl with the C<-i> flag now warns if no input files are provided on
246the command line [perl #113410].
247
e96e0834 248=back
d9661073 249
e96e0834 250=head2 Changes to Existing Diagnostics
95c6c5c5 251
e96e0834 252XXX Changes (i.e. rewording) of diagnostic messages go here
95c6c5c5 253
e96e0834 254=over 4
95c6c5c5
JL
255
256=item *
257
90519d0f
FC
258The 'Can't use "my %s" in sort comparison' error has been downgraded to a
259warning, '"my %s" used in sort comparison' (with 'state' instead of 'my'
260for state variables). In addition, the heuristics for guessing whether
261lexical $a or $b has been misused have been improved to generate fewer
262false positives. Lexical $a and $b are no longer disallowed if they are
263outside the sort block. Also, a named unary or list operator inside the
264sort block no longer causes the $a or $b to be ignored [perl #86136].
3630f57e 265
e96e0834 266=back
3630f57e 267
e96e0834 268=head1 Utility Changes
95c6c5c5 269
e96e0834
JL
270XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
271here. Most of these are built within the directories F<utils> and F<x2p>.
95c6c5c5 272
e96e0834
JL
273[ List utility changes as a =head3 entry for each utility and =item
274entries for each change
275Use L<XXX> with program names to get proper documentation linking. ]
95c6c5c5 276
e96e0834 277=head3 L<XXX>
95c6c5c5 278
e96e0834 279=over 4
95c6c5c5
JL
280
281=item *
282
e96e0834 283XXX
95c6c5c5 284
e96e0834 285=back
95c6c5c5 286
e96e0834 287=head1 Configuration and Compilation
95c6c5c5 288
e96e0834
JL
289XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
290go here. Any other changes to the Perl build process should be listed here.
291However, any platform-specific changes should be listed in the
292L</Platform Support> section, instead.
95c6c5c5 293
e96e0834 294[ List changes as a =item entry ].
95c6c5c5 295
e96e0834 296=over 4
95c6c5c5
JL
297
298=item *
299
c5057b0f
FC
300Building perl with some Windows compilers used to fail due to a problem
301with miniperl's C<glob> operator (which uses the C<perlglob> program)
302deleting the PATH environment variable [perl #113798].
95c6c5c5 303
e96e0834 304=back
95c6c5c5 305
e96e0834 306=head1 Testing
95c6c5c5 307
e96e0834
JL
308XXX Any significant changes to the testing of a freshly built perl should be
309listed here. Changes which create B<new> files in F<t/> go here as do any
310large changes to the testing harness (e.g. when parallel testing was added).
311Changes to existing files in F<t/> aren't worth summarising, although the bugs
312that they represent may be covered elsewhere.
95c6c5c5 313
e96e0834 314[ List each test improvement as a =item entry ]
95c6c5c5 315
e96e0834 316=over 4
95c6c5c5
JL
317
318=item *
319
e96e0834 320XXX
95c6c5c5 321
61174fb5 322=back
f558db2f 323
e96e0834 324=head1 Platform Support
05c8f9ed 325
e96e0834 326XXX Any changes to platform support should be listed in the sections below.
05c8f9ed 327
e96e0834
JL
328[ Within the sections, list each platform as a =item entry with specific
329changes as paragraphs below it. ]
9dea6244 330
e96e0834 331=head2 New Platforms
9dea6244 332
e96e0834
JL
333XXX List any platforms that this version of perl compiles on, that previous
334versions did not. These will either be enabled by new files in the F<hints/>
335directories, or new subdirectories and F<README> files at the top level of the
336source tree.
7d101ed1
JL
337
338=over 4
339
42d72fc5 340=item XXX
7d101ed1 341
7d101ed1
JL
342
343=back
344
e96e0834 345=head2 Discontinued Platforms
ef7131e9 346
e96e0834 347XXX List any platforms that this version of perl no longer compiles on.
4a301309
FC
348
349=over 4
350
e96e0834 351=item XXX-some-platform
8dffc0ab 352
e96e0834 353XXX
dbc84d79 354
4a301309
FC
355=back
356
61174fb5 357=head2 Platform-Specific Notes
ceb0881c 358
e96e0834
JL
359XXX List any changes for specific platforms. This could include configuration
360and compilation changes or changes in portability/compatibility. However,
361changes within modules for platforms should generally be listed in the
362L</Modules and Pragmata> section.
89cbc6b8 363
e96e0834 364=over 4
0998713f 365
5edb02d0 366=item VMS
112b6866 367
5edb02d0
CB
368Quotes are now removed from the command verb (but not the parameters) for commands
369spawned via C<system>, backticks, or a piped C<open>. Previously, quotes on the verb
370were passed through to DCL, which would fail to recognize the command. Also, if the
371verb is actually a path to an image or command procedure on an ODS-5 volume, quoting it
372now allows the path to contain spaces.
112b6866 373
42d72fc5
TC
374=item AIX
375
376Configure now always adds -qlanglvl=extc99 to the CC flags on AIX when
377using xlC. This will make it easier to compile a number of XS-based modules
378that assume C99 [perl #113778].
379
61174fb5 380=back
8e125188 381
61174fb5 382=head1 Internal Changes
8e125188 383
e96e0834
JL
384XXX Changes which affect the interface available to C<XS> code go here.
385Other significant internal changes for future core maintainers should
386be noted as well.
c4643160 387
e96e0834 388[ List each change as a =item entry ]
f8ef51fd 389
e96e0834 390=over 4
e128ab2c 391
e2f0c3bb
FC
392=item *
393
7ab2ea42
TC
394OP allocation for CVs now uses a slab allocator. This simplifies
395memory management for OPs allocated to a CV, so cleaning up after a
396compilation error is simpler and safer [perl #111462][perl #112312].
e2f0c3bb 397
90519d0f
FC
398=item *
399
400PERL_DEBUG_READONLY_OPS has been rewritten to work with the new slab
401allocator, allowing it to catch more violations that befor.
402
403=item *
404
405The old slab allocator for ops, which was only enabled for PERL_IMPLICIT_SYS and PERL_DEBUG_READONLY_OPS, has been retired.
406
61174fb5 407=back
422287bf 408
61174fb5 409=head1 Selected Bug Fixes
2de6ba8d 410
e96e0834
JL
411XXX Important bug fixes in the core language are summarised here.
412Bug fixes in files in F<ext/> and F<lib/> are best summarised in
413L</Modules and Pragmata>.
52c4b146 414
e96e0834 415[ List each fix as a =item entry ]
e128ab2c
DM
416
417=over 4
418
419=item *
420
48895a0d 421A regression introduced in v5.14.0 has been fixed, in which some calls
7ab2ea42 422to the C<re> module would clobber C<$_> [perl #113750].
e128ab2c 423
8b1adbab
JL
424=item *
425
426C<do FILE> now always either sets or clears C<$@>, even when the file can't be
427read. This ensures that testing C<$@> first (as recommended by the
428documentation) always returns the correct result.
429
83f29afa
VP
430=item *
431
432The array iterator used for the C<each @array> construct is now correctly
433reset when C<@array> is cleared (RT #75596). This happens for example when the
434array is globally assigned to, as in C<@array = (...)>, but not when its
435B<values> are assigned to. In terms of the XS API, it means that C<av_clear()>
436will now reset the iterator.
437
438This mirrors the behaviour of the hash iterator when the hash is cleared.
439
0938f143
JL
440=item *
441
442C<< $class->can >>, C<< $class->isa >>, and C<< $class->DOES >> now return
443correct results, regardless of whether that package referred to by C<$class>
444exists [perl #47113].
445
72267260
JL
446=item *
447
448Arriving signals no longer clear C<$@> [perl #45173].
449
7a251f7a
JL
450=item *
451
452Allow C<my ()> declarations with an empty variable list [perl #113554].
453
21247d85
FC
454=item *
455
456During parsing, subs declared after errors no longer leave stubs
457[perl #113712].
458
2e4f8b82
FC
459=item *
460
c95d4104
FC
461Closures containing no string evals no longer hang on to their containing
462subroutines, allowing variables closed over by outer subroutines to be
463freed when the outer sub is freed, even if the inner sub still exists
464[perl #89544].
465
788505db
FC
466=item *
467
468Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode
469stopped working properly in 5.16.0. It was causing the new handle to
470reference a different scalar variable. This has been fixed [perl #113764].
471
2c2b9cf4
FC
472=item *
473
474C<qr//> expressions no longer crash with custom regular expression engines
475that do not set C<offs> at regular expression compilation time
476[perl #112962].
477
3cd56aaa
TC
478=item *
479
480C<delete local> no longer crashes with certain magical arrays and hashes
481[perl #112966].
482
483=item *
484
485C<local> on elements of certain magical arrays and hashes used not to
486arrange to have the element deleted on scope exit, even if the element did
487not exist before C<local>.
488
489=item *
490
491C<scalar(write)> no longer returns multiple items [perl #73690].
492
493=item *
494
495String to floating point conversions no longer misparse certain strings under
496C<use locale> [perl #109318].
497
498=item *
499
500C<@INC> filters that die no longer leak memory [perl #92252].
501
502=item *
503
504The implementations of overloaded operations are now called in the correct
505context. This allows, among other things, being able to properly override
506C<< <> >> [perl #47119].
507
508=item *
509
510Specifying only the C<fallback> key when calling C<use overload> now behaves
511properly [perl #113010].
512
c0c19433
JL
513=item *
514
515C<< sub foo { my $a = 0; while ($a) { ... } } >> and
516C<< sub foo { while (0) { ... } } >> now return the same thing [perl #73618].
517
7ab2ea42
TC
518=item *
519
f4df6cb9 520Fixed the debugger C<l> and C<M> commands, and other debugger
7ab2ea42
TC
521functionality which was broken in 5.17.0 [perl #113918].
522
523=item *
524
525String negation now behaves the same under C<use integer;> as it does
526without [perl #113012].
527
90519d0f
FC
528=item *
529
530C<chr> now returns the Unicode replacement character (U+FFFD) for -1,
531regardless of the internal representation. -1 used to wrap if the argument
532was tied or a string internally.
533
534=item *
535
536Using a C<format> after its enclosing sub was freed could crash as of
537perl 5.12.0, if the format referenced lexical variables from the outer sub.
538
539=item *
540
541Using a C<format> after its enclosing sub was undefined could crash as of
542perl 5.10.0, if the format referenced lexical variables from the outer sub.
543
544=item *
545
546Using a C<format> defined inside a closures, which format references
547lexical variables from outside, never really worked unless the C<write>
548call was directly inside the closure. In 5.10.0 it even started crashing.
549Now the copy of that closure nearest the top of the call stack is used to
550find those variables.
551
552=item *
553
554Formats that close over variables in special blocks no longer crash if a
555stub exists with the same name as the special block before the special
556block is compiled.
557
558=item *
559
560The parser no longer gets confused, treating C<eval foo ()> as a syntax
561error if preceded by C<print;> [perl #16249].
562
563=item *
564
565The return value of C<syscall> is no longer truncated on 64-bit platforms
566[perl #113980].
567
568=item *
569
570Constant folding no longer causes C<print 1 ? FOO : BAR> to print to the
571FOO handle [perl #78064].
572
573=item *
574
575C<do subname> now calls the named subroutine and uses the file name it
576returns, instead of opening a file named "subname".
577
578=item *
579
580Subroutines looked up by rv2cv check hooks (registered by XS modules) are
581now taken into consideration when determining whether C<foo bar> should be
582the sub call C<foo(bar)> or the method call C<< "bar"->foo >>.
583
584=item *
585
586C<CORE::foo::bar> is no longer treated specially, allowing global overrides
587to be called directly via C<CORE::GLOBAL::uc(...)> [perl #113016].
588
589=item *
590
591Calling an undefined sub whose typeglob has been undefined now produces the
592customary "Undefined subroutine called" error, instead of "Not a CODE
593reference".
594
b8a55fe7
FC
595=item *
596
597Two bugs involving @ISA have been fixed. C<*ISA = *glob_without_array> and
598C<undef *ISA; @{*ISA}> would prevent future modifications to @ISA from
599updating the internal caches used to look up methods. The
600*glob_without_array case was a regression from Perl 5.12.
601
602=item *
603
604Regular expression optimisations sometimes caused C<$> with C</m> to
605produce failed or incorrect matches [perl #114068].
606
607=item *
608
609C<__SUB__> now works in a C<sort> block when the enclosing subroutine is
610predeclared with C<sub foo;> syntax [perl #113710].
611
e128ab2c
DM
612=back
613
e96e0834 614=head1 Known Problems
dbc84d79 615
e96e0834
JL
616XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
617tests that had to be C<TODO>ed for the release would be noted here. Unfixed
618platform specific bugs also go here.
53de3ff0 619
e96e0834 620[ List each fix as a =item entry ]
233bba44
JL
621
622=over 4
623
624=item *
625
e96e0834 626XXX
233bba44 627
e96e0834 628=back
233bba44 629
e96e0834 630=head1 Obituary
233bba44 631
e96e0834
JL
632XXX If any significant core contributor has died, we've added a short obituary
633here.
233bba44 634
61174fb5 635=head1 Acknowledgements
d5dc7001 636
e96e0834
JL
637XXX Generate this with:
638
639 perl Porting/acknowledgements.pl v5.17.1..HEAD
29cf780c 640
44691e6f
AB
641=head1 Reporting Bugs
642
643If you find what you think is a bug, you might check the articles
52deee2e 644recently posted to the comp.lang.perl.misc newsgroup and the perl
f9001595
RS
645bug database at http://rt.perl.org/perlbug/ . There may also be
646information at http://www.perl.org/ , the Perl Home Page.
44691e6f
AB
647
648If you believe you have an unreported bug, please run the L<perlbug>
52deee2e
DR
649program included with your release. Be sure to trim your bug down
650to a tiny but sufficient test case. Your bug report, along with the
651output of C<perl -V>, will be sent off to perlbug@perl.org to be
652analysed by the Perl porting team.
44691e6f
AB
653
654If the bug you are reporting has security implications, which make it
f9001595
RS
655inappropriate to send to a publicly archived mailing list, then please send
656it to perl5-security-report@perl.org. This points to a closed subscription
657unarchived mailing list, which includes
658all the core committers, who will be able
659to help assess the impact of issues, figure out a resolution, and help
660co-ordinate the release of patches to mitigate or fix the problem across all
661platforms on which Perl is supported. Please only use this address for
662security issues in the Perl core, not for modules independently
663distributed on CPAN.
44691e6f
AB
664
665=head1 SEE ALSO
666
52deee2e
DR
667The F<Changes> file for an explanation of how to view exhaustive details
668on what changed.
44691e6f
AB
669
670The F<INSTALL> file for how to build Perl.
671
672The F<README> file for general stuff.
673
674The F<Artistic> and F<Copying> files for copyright information.
675
676=cut