This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade Socket to 2.002
[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
e96e0834 218=back
95c6c5c5 219
e96e0834 220=head3 New Warnings
95c6c5c5 221
e96e0834 222=over 4
95c6c5c5 223
95c6c5c5
JL
224=item *
225
72267260
JL
226C<chr()> now warns when passed a negative value [perl #83048].
227
228=item *
229
230C<srand()> now warns when passed a value that doesn't fit in a C<UV> (since the
231value will be truncated rather than overflowing) [perl #40605].
7d101ed1 232
e013ada0
JL
233=item *
234
235Running perl with the C<-i> flag now warns if no input files are provided on
236the command line [perl #113410].
237
e96e0834 238=back
d9661073 239
e96e0834 240=head2 Changes to Existing Diagnostics
95c6c5c5 241
e96e0834 242XXX Changes (i.e. rewording) of diagnostic messages go here
95c6c5c5 243
e96e0834 244=over 4
95c6c5c5
JL
245
246=item *
247
90519d0f
FC
248The 'Can't use "my %s" in sort comparison' error has been downgraded to a
249warning, '"my %s" used in sort comparison' (with 'state' instead of 'my'
250for state variables). In addition, the heuristics for guessing whether
251lexical $a or $b has been misused have been improved to generate fewer
252false positives. Lexical $a and $b are no longer disallowed if they are
253outside the sort block. Also, a named unary or list operator inside the
254sort block no longer causes the $a or $b to be ignored [perl #86136].
3630f57e 255
e96e0834 256=back
3630f57e 257
e96e0834 258=head1 Utility Changes
95c6c5c5 259
e96e0834
JL
260XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
261here. Most of these are built within the directories F<utils> and F<x2p>.
95c6c5c5 262
e96e0834
JL
263[ List utility changes as a =head3 entry for each utility and =item
264entries for each change
265Use L<XXX> with program names to get proper documentation linking. ]
95c6c5c5 266
e96e0834 267=head3 L<XXX>
95c6c5c5 268
e96e0834 269=over 4
95c6c5c5
JL
270
271=item *
272
e96e0834 273XXX
95c6c5c5 274
e96e0834 275=back
95c6c5c5 276
e96e0834 277=head1 Configuration and Compilation
95c6c5c5 278
e96e0834
JL
279XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
280go here. Any other changes to the Perl build process should be listed here.
281However, any platform-specific changes should be listed in the
282L</Platform Support> section, instead.
95c6c5c5 283
e96e0834 284[ List changes as a =item entry ].
95c6c5c5 285
e96e0834 286=over 4
95c6c5c5
JL
287
288=item *
289
c5057b0f
FC
290Building perl with some Windows compilers used to fail due to a problem
291with miniperl's C<glob> operator (which uses the C<perlglob> program)
292deleting the PATH environment variable [perl #113798].
95c6c5c5 293
e96e0834 294=back
95c6c5c5 295
e96e0834 296=head1 Testing
95c6c5c5 297
e96e0834
JL
298XXX Any significant changes to the testing of a freshly built perl should be
299listed here. Changes which create B<new> files in F<t/> go here as do any
300large changes to the testing harness (e.g. when parallel testing was added).
301Changes to existing files in F<t/> aren't worth summarising, although the bugs
302that they represent may be covered elsewhere.
95c6c5c5 303
e96e0834 304[ List each test improvement as a =item entry ]
95c6c5c5 305
e96e0834 306=over 4
95c6c5c5
JL
307
308=item *
309
e96e0834 310XXX
95c6c5c5 311
61174fb5 312=back
f558db2f 313
e96e0834 314=head1 Platform Support
05c8f9ed 315
e96e0834 316XXX Any changes to platform support should be listed in the sections below.
05c8f9ed 317
e96e0834
JL
318[ Within the sections, list each platform as a =item entry with specific
319changes as paragraphs below it. ]
9dea6244 320
e96e0834 321=head2 New Platforms
9dea6244 322
e96e0834
JL
323XXX List any platforms that this version of perl compiles on, that previous
324versions did not. These will either be enabled by new files in the F<hints/>
325directories, or new subdirectories and F<README> files at the top level of the
326source tree.
7d101ed1
JL
327
328=over 4
329
42d72fc5 330=item XXX
7d101ed1 331
7d101ed1
JL
332
333=back
334
e96e0834 335=head2 Discontinued Platforms
ef7131e9 336
e96e0834 337XXX List any platforms that this version of perl no longer compiles on.
4a301309
FC
338
339=over 4
340
e96e0834 341=item XXX-some-platform
8dffc0ab 342
e96e0834 343XXX
dbc84d79 344
4a301309
FC
345=back
346
61174fb5 347=head2 Platform-Specific Notes
ceb0881c 348
e96e0834
JL
349XXX List any changes for specific platforms. This could include configuration
350and compilation changes or changes in portability/compatibility. However,
351changes within modules for platforms should generally be listed in the
352L</Modules and Pragmata> section.
89cbc6b8 353
e96e0834 354=over 4
0998713f 355
5edb02d0 356=item VMS
112b6866 357
5edb02d0
CB
358Quotes are now removed from the command verb (but not the parameters) for commands
359spawned via C<system>, backticks, or a piped C<open>. Previously, quotes on the verb
360were passed through to DCL, which would fail to recognize the command. Also, if the
361verb is actually a path to an image or command procedure on an ODS-5 volume, quoting it
362now allows the path to contain spaces.
112b6866 363
42d72fc5
TC
364=item AIX
365
366Configure now always adds -qlanglvl=extc99 to the CC flags on AIX when
367using xlC. This will make it easier to compile a number of XS-based modules
368that assume C99 [perl #113778].
369
61174fb5 370=back
8e125188 371
61174fb5 372=head1 Internal Changes
8e125188 373
e96e0834
JL
374XXX Changes which affect the interface available to C<XS> code go here.
375Other significant internal changes for future core maintainers should
376be noted as well.
c4643160 377
e96e0834 378[ List each change as a =item entry ]
f8ef51fd 379
e96e0834 380=over 4
e128ab2c 381
e2f0c3bb
FC
382=item *
383
7ab2ea42
TC
384OP allocation for CVs now uses a slab allocator. This simplifies
385memory management for OPs allocated to a CV, so cleaning up after a
386compilation error is simpler and safer [perl #111462][perl #112312].
e2f0c3bb 387
90519d0f
FC
388=item *
389
390PERL_DEBUG_READONLY_OPS has been rewritten to work with the new slab
391allocator, allowing it to catch more violations that befor.
392
393=item *
394
395The old slab allocator for ops, which was only enabled for PERL_IMPLICIT_SYS and PERL_DEBUG_READONLY_OPS, has been retired.
396
61174fb5 397=back
422287bf 398
61174fb5 399=head1 Selected Bug Fixes
2de6ba8d 400
e96e0834
JL
401XXX Important bug fixes in the core language are summarised here.
402Bug fixes in files in F<ext/> and F<lib/> are best summarised in
403L</Modules and Pragmata>.
52c4b146 404
e96e0834 405[ List each fix as a =item entry ]
e128ab2c
DM
406
407=over 4
408
409=item *
410
48895a0d 411A regression introduced in v5.14.0 has been fixed, in which some calls
7ab2ea42 412to the C<re> module would clobber C<$_> [perl #113750].
e128ab2c 413
8b1adbab
JL
414=item *
415
416C<do FILE> now always either sets or clears C<$@>, even when the file can't be
417read. This ensures that testing C<$@> first (as recommended by the
418documentation) always returns the correct result.
419
83f29afa
VP
420=item *
421
422The array iterator used for the C<each @array> construct is now correctly
423reset when C<@array> is cleared (RT #75596). This happens for example when the
424array is globally assigned to, as in C<@array = (...)>, but not when its
425B<values> are assigned to. In terms of the XS API, it means that C<av_clear()>
426will now reset the iterator.
427
428This mirrors the behaviour of the hash iterator when the hash is cleared.
429
0938f143
JL
430=item *
431
432C<< $class->can >>, C<< $class->isa >>, and C<< $class->DOES >> now return
433correct results, regardless of whether that package referred to by C<$class>
434exists [perl #47113].
435
72267260
JL
436=item *
437
438Arriving signals no longer clear C<$@> [perl #45173].
439
7a251f7a
JL
440=item *
441
442Allow C<my ()> declarations with an empty variable list [perl #113554].
443
21247d85
FC
444=item *
445
446During parsing, subs declared after errors no longer leave stubs
447[perl #113712].
448
2e4f8b82
FC
449=item *
450
c95d4104
FC
451Closures containing no string evals no longer hang on to their containing
452subroutines, allowing variables closed over by outer subroutines to be
453freed when the outer sub is freed, even if the inner sub still exists
454[perl #89544].
455
788505db
FC
456=item *
457
458Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode
459stopped working properly in 5.16.0. It was causing the new handle to
460reference a different scalar variable. This has been fixed [perl #113764].
461
2c2b9cf4
FC
462=item *
463
464C<qr//> expressions no longer crash with custom regular expression engines
465that do not set C<offs> at regular expression compilation time
466[perl #112962].
467
3cd56aaa
TC
468=item *
469
470C<delete local> no longer crashes with certain magical arrays and hashes
471[perl #112966].
472
473=item *
474
475C<local> on elements of certain magical arrays and hashes used not to
476arrange to have the element deleted on scope exit, even if the element did
477not exist before C<local>.
478
479=item *
480
481C<scalar(write)> no longer returns multiple items [perl #73690].
482
483=item *
484
485String to floating point conversions no longer misparse certain strings under
486C<use locale> [perl #109318].
487
488=item *
489
490C<@INC> filters that die no longer leak memory [perl #92252].
491
492=item *
493
494The implementations of overloaded operations are now called in the correct
495context. This allows, among other things, being able to properly override
496C<< <> >> [perl #47119].
497
498=item *
499
500Specifying only the C<fallback> key when calling C<use overload> now behaves
501properly [perl #113010].
502
c0c19433
JL
503=item *
504
505C<< sub foo { my $a = 0; while ($a) { ... } } >> and
506C<< sub foo { while (0) { ... } } >> now return the same thing [perl #73618].
507
7ab2ea42
TC
508=item *
509
f4df6cb9 510Fixed the debugger C<l> and C<M> commands, and other debugger
7ab2ea42
TC
511functionality which was broken in 5.17.0 [perl #113918].
512
513=item *
514
515String negation now behaves the same under C<use integer;> as it does
516without [perl #113012].
517
90519d0f
FC
518=item *
519
520C<chr> now returns the Unicode replacement character (U+FFFD) for -1,
521regardless of the internal representation. -1 used to wrap if the argument
522was tied or a string internally.
523
524=item *
525
526Using a C<format> after its enclosing sub was freed could crash as of
527perl 5.12.0, if the format referenced lexical variables from the outer sub.
528
529=item *
530
531Using a C<format> after its enclosing sub was undefined could crash as of
532perl 5.10.0, if the format referenced lexical variables from the outer sub.
533
534=item *
535
536Using a C<format> defined inside a closures, which format references
537lexical variables from outside, never really worked unless the C<write>
538call was directly inside the closure. In 5.10.0 it even started crashing.
539Now the copy of that closure nearest the top of the call stack is used to
540find those variables.
541
542=item *
543
544Formats that close over variables in special blocks no longer crash if a
545stub exists with the same name as the special block before the special
546block is compiled.
547
548=item *
549
550The parser no longer gets confused, treating C<eval foo ()> as a syntax
551error if preceded by C<print;> [perl #16249].
552
553=item *
554
555The return value of C<syscall> is no longer truncated on 64-bit platforms
556[perl #113980].
557
558=item *
559
560Constant folding no longer causes C<print 1 ? FOO : BAR> to print to the
561FOO handle [perl #78064].
562
563=item *
564
565C<do subname> now calls the named subroutine and uses the file name it
566returns, instead of opening a file named "subname".
567
568=item *
569
570Subroutines looked up by rv2cv check hooks (registered by XS modules) are
571now taken into consideration when determining whether C<foo bar> should be
572the sub call C<foo(bar)> or the method call C<< "bar"->foo >>.
573
574=item *
575
576C<CORE::foo::bar> is no longer treated specially, allowing global overrides
577to be called directly via C<CORE::GLOBAL::uc(...)> [perl #113016].
578
579=item *
580
581Calling an undefined sub whose typeglob has been undefined now produces the
582customary "Undefined subroutine called" error, instead of "Not a CODE
583reference".
584
e128ab2c
DM
585=back
586
e96e0834 587=head1 Known Problems
dbc84d79 588
e96e0834
JL
589XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
590tests that had to be C<TODO>ed for the release would be noted here. Unfixed
591platform specific bugs also go here.
53de3ff0 592
e96e0834 593[ List each fix as a =item entry ]
233bba44
JL
594
595=over 4
596
597=item *
598
e96e0834 599XXX
233bba44 600
e96e0834 601=back
233bba44 602
e96e0834 603=head1 Obituary
233bba44 604
e96e0834
JL
605XXX If any significant core contributor has died, we've added a short obituary
606here.
233bba44 607
61174fb5 608=head1 Acknowledgements
d5dc7001 609
e96e0834
JL
610XXX Generate this with:
611
612 perl Porting/acknowledgements.pl v5.17.1..HEAD
29cf780c 613
44691e6f
AB
614=head1 Reporting Bugs
615
616If you find what you think is a bug, you might check the articles
52deee2e 617recently posted to the comp.lang.perl.misc newsgroup and the perl
f9001595
RS
618bug database at http://rt.perl.org/perlbug/ . There may also be
619information at http://www.perl.org/ , the Perl Home Page.
44691e6f
AB
620
621If you believe you have an unreported bug, please run the L<perlbug>
52deee2e
DR
622program included with your release. Be sure to trim your bug down
623to a tiny but sufficient test case. Your bug report, along with the
624output of C<perl -V>, will be sent off to perlbug@perl.org to be
625analysed by the Perl porting team.
44691e6f
AB
626
627If the bug you are reporting has security implications, which make it
f9001595
RS
628inappropriate to send to a publicly archived mailing list, then please send
629it to perl5-security-report@perl.org. This points to a closed subscription
630unarchived mailing list, which includes
631all the core committers, who will be able
632to help assess the impact of issues, figure out a resolution, and help
633co-ordinate the release of patches to mitigate or fix the problem across all
634platforms on which Perl is supported. Please only use this address for
635security issues in the Perl core, not for modules independently
636distributed on CPAN.
44691e6f
AB
637
638=head1 SEE ALSO
639
52deee2e
DR
640The F<Changes> file for an explanation of how to view exhaustive details
641on what changed.
44691e6f
AB
642
643The F<INSTALL> file for how to build Perl.
644
645The F<README> file for general stuff.
646
647The F<Artistic> and F<Copying> files for copyright information.
648
649=cut