5 [ this is a template for a new perldelta file. Any text flagged as
6 XXX needs to be processed before release. ]
8 perldelta - what is new for perl v5.17.2
12 This document describes differences between the 5.17.1 release and
15 If you are upgrading from an earlier release such as 5.17.0, first read
16 L<perl5171delta>, which describes differences between 5.17.0 and
21 XXX Any important notices here
23 =head1 Core Enhancements
25 XXX New core language features go here. Summarise user-visible core language
26 enhancements. Particularly prominent performance optimisations could go
27 here, but most should go in the L</Performance Enhancements> section.
29 [ List each enhancement as a =head2 entry ]
31 =head2 C<kill> with negative signal names
33 C<kill> has always allowed a negative signal number, which kills the
34 process group instead of a single process. It has also allowed signal
35 names. But it did not behave consistently, because negative signal names
36 were treated as 0. Now negative signals names like C<-INT> are supported
37 and treated the same way as -2 [perl #112990].
41 XXX Any security-related notices go here. In particular, any security
42 vulnerabilities closed should be noted here rather than in the
43 L</Selected Bug Fixes> section.
45 [ List each security issue as a =head2 entry ]
47 =head1 Incompatible Changes
49 XXX For a release on a stable branch, this section aspires to be:
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.
55 [ List each incompatible change as a =head2 entry ]
59 XXX Any deprecated features, syntax, modules etc. should be listed here.
60 In particular, deprecated modules should be listed here even if they are
61 listed as an updated module in the L</Modules and Pragmata> section.
63 [ List each deprecation as a =head2 entry ]
65 =head1 Performance Enhancements
67 XXX Changes which enhance performance without changing behaviour go here. There
68 may well be none in a stable release.
70 [ List each enhancement as a =item entry ]
80 =head1 Modules and Pragmata
82 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
83 go here. If Module::CoreList is updated, generate an initial draft of the
84 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
85 entries to STDOUT. Results can be pasted in place of the '=head2' entries
86 below. A paragraph summary for important changes should then be added by hand.
87 In an ideal world, dual-life modules would have a F<Changes> file that could be
90 [ Within each section, list entries as a =item entry ]
92 =head2 New Modules and Pragmata
102 =head2 Updated Modules and Pragmata
108 L<File::stat> has been upgraded from version 1.06 to 1.07.
110 Previously C<File::stat>'s overloaded C<-x> and C<-X> operators did not give
111 the correct results for directories or executable files when running as
112 root. They had been treating executable permissions for root just like for
113 any other user, performing group membership tests I<etc> for files not owned
114 by root. They now follow the correct Unix behaviour - for a directory they
115 are always true, and for a file if any of the three execute permission bits
116 are set then they report that root can execute the file. Perl's builtin
117 C<-x> and C<-X> operators have always been correct.
121 L<Tie::StdHandle> has been upgraded from version 4.2 to 4.3.
123 C<READ> now respects the offset argument to C<read> [perl #112826].
127 L<IO> has been upgraded from version 1.25_07 to 1.25_08.
129 L<IO::Socket> tries harder to cache or otherwise fetch socket
134 L<Storable> has been upgraded from version 2.36 to 2.37.
136 Restricted hashes were not always thawed correctly [perl #73972].
138 Storable would croak when freezing a blessed REF object with a
139 C<STORABLE_freeze()> method [perl #113880].
143 =head2 Removed Modules and Pragmata
155 XXX Changes to files in F<pod/> go here. Consider grouping entries by
156 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
158 =head2 New Documentation
160 XXX Changes which create B<new> files in F<pod/> go here.
164 XXX Description of the purpose of the new file here
166 =head2 Changes to Existing Documentation
168 XXX Changes which significantly change existing files in F<pod/> go here.
169 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
178 Clarified documentation of C<our>.
184 The following additions or changes have been made to diagnostic output,
185 including warnings and fatal error messages. For the complete list of
186 diagnostic messages, see L<perldiag>.
188 XXX New or changed warnings emitted by the core's C<C> code go here. Also
189 include any changes in L<perldiag> that reconcile it to the C<C> code.
191 [ Within each section, list entries as a =item entry that links to perldiag,
196 L<Invalid version object|perldiag/"Invalid version object">
199 =head2 New Diagnostics
201 XXX Newly added diagnostic messages go here
209 L<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/">
211 This error has been added for C<(?&0)>, which is invalid. It used to
212 produce an incomprehensible error message [perl #101666].
222 C<chr()> now warns when passed a negative value [perl #83048].
226 C<srand()> now warns when passed a value that doesn't fit in a C<UV> (since the
227 value will be truncated rather than overflowing) [perl #40605].
231 Running perl with the C<-i> flag now warns if no input files are provided on
232 the command line [perl #113410].
236 =head2 Changes to Existing Diagnostics
238 XXX Changes (i.e. rewording) of diagnostic messages go here
244 The 'Can't use "my %s" in sort comparison' error has been downgraded to a
245 warning, '"my %s" used in sort comparison' (with 'state' instead of 'my'
246 for state variables). In addition, the heuristics for guessing whether
247 lexical $a or $b has been misused have been improved to generate fewer
248 false positives. Lexical $a and $b are no longer disallowed if they are
249 outside the sort block. Also, a named unary or list operator inside the
250 sort block no longer causes the $a or $b to be ignored [perl #86136].
254 =head1 Utility Changes
256 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
257 here. Most of these are built within the directories F<utils> and F<x2p>.
259 [ List utility changes as a =head3 entry for each utility and =item
260 entries for each change
261 Use L<XXX> with program names to get proper documentation linking. ]
273 =head1 Configuration and Compilation
275 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
276 go here. Any other changes to the Perl build process should be listed here.
277 However, any platform-specific changes should be listed in the
278 L</Platform Support> section, instead.
280 [ List changes as a =item entry ].
286 Building perl with some Windows compilers used to fail due to a problem
287 with miniperl's C<glob> operator (which uses the C<perlglob> program)
288 deleting the PATH environment variable [perl #113798].
294 XXX Any significant changes to the testing of a freshly built perl should be
295 listed here. Changes which create B<new> files in F<t/> go here as do any
296 large changes to the testing harness (e.g. when parallel testing was added).
297 Changes to existing files in F<t/> aren't worth summarising, although the bugs
298 that they represent may be covered elsewhere.
300 [ List each test improvement as a =item entry ]
310 =head1 Platform Support
312 XXX Any changes to platform support should be listed in the sections below.
314 [ Within the sections, list each platform as a =item entry with specific
315 changes as paragraphs below it. ]
319 XXX List any platforms that this version of perl compiles on, that previous
320 versions did not. These will either be enabled by new files in the F<hints/>
321 directories, or new subdirectories and F<README> files at the top level of the
331 =head2 Discontinued Platforms
333 XXX List any platforms that this version of perl no longer compiles on.
337 =item XXX-some-platform
343 =head2 Platform-Specific Notes
345 XXX List any changes for specific platforms. This could include configuration
346 and compilation changes or changes in portability/compatibility. However,
347 changes within modules for platforms should generally be listed in the
348 L</Modules and Pragmata> section.
354 Quotes are now removed from the command verb (but not the parameters) for commands
355 spawned via C<system>, backticks, or a piped C<open>. Previously, quotes on the verb
356 were passed through to DCL, which would fail to recognize the command. Also, if the
357 verb is actually a path to an image or command procedure on an ODS-5 volume, quoting it
358 now allows the path to contain spaces.
362 Configure now always adds -qlanglvl=extc99 to the CC flags on AIX when
363 using xlC. This will make it easier to compile a number of XS-based modules
364 that assume C99 [perl #113778].
368 =head1 Internal Changes
370 XXX Changes which affect the interface available to C<XS> code go here.
371 Other significant internal changes for future core maintainers should
374 [ List each change as a =item entry ]
380 OP allocation for CVs now uses a slab allocator. This simplifies
381 memory management for OPs allocated to a CV, so cleaning up after a
382 compilation error is simpler and safer [perl #111462][perl #112312].
386 PERL_DEBUG_READONLY_OPS has been rewritten to work with the new slab
387 allocator, allowing it to catch more violations that befor.
391 The old slab allocator for ops, which was only enabled for PERL_IMPLICIT_SYS and PERL_DEBUG_READONLY_OPS, has been retired.
395 =head1 Selected Bug Fixes
397 XXX Important bug fixes in the core language are summarised here.
398 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
399 L</Modules and Pragmata>.
401 [ List each fix as a =item entry ]
407 A regression introduced in v5.14.0 has been fixed, in which some calls
408 to the C<re> module would clobber C<$_> [perl #113750].
412 C<do FILE> now always either sets or clears C<$@>, even when the file can't be
413 read. This ensures that testing C<$@> first (as recommended by the
414 documentation) always returns the correct result.
418 The array iterator used for the C<each @array> construct is now correctly
419 reset when C<@array> is cleared (RT #75596). This happens for example when the
420 array is globally assigned to, as in C<@array = (...)>, but not when its
421 B<values> are assigned to. In terms of the XS API, it means that C<av_clear()>
422 will now reset the iterator.
424 This mirrors the behaviour of the hash iterator when the hash is cleared.
428 C<< $class->can >>, C<< $class->isa >>, and C<< $class->DOES >> now return
429 correct results, regardless of whether that package referred to by C<$class>
430 exists [perl #47113].
434 Arriving signals no longer clear C<$@> [perl #45173].
438 Allow C<my ()> declarations with an empty variable list [perl #113554].
442 During parsing, subs declared after errors no longer leave stubs
447 Closures containing no string evals no longer hang on to their containing
448 subroutines, allowing variables closed over by outer subroutines to be
449 freed when the outer sub is freed, even if the inner sub still exists
454 Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode
455 stopped working properly in 5.16.0. It was causing the new handle to
456 reference a different scalar variable. This has been fixed [perl #113764].
460 C<qr//> expressions no longer crash with custom regular expression engines
461 that do not set C<offs> at regular expression compilation time
466 C<delete local> no longer crashes with certain magical arrays and hashes
471 C<local> on elements of certain magical arrays and hashes used not to
472 arrange to have the element deleted on scope exit, even if the element did
473 not exist before C<local>.
477 C<scalar(write)> no longer returns multiple items [perl #73690].
481 String to floating point conversions no longer misparse certain strings under
482 C<use locale> [perl #109318].
486 C<@INC> filters that die no longer leak memory [perl #92252].
490 The implementations of overloaded operations are now called in the correct
491 context. This allows, among other things, being able to properly override
492 C<< <> >> [perl #47119].
496 Specifying only the C<fallback> key when calling C<use overload> now behaves
497 properly [perl #113010].
501 C<< sub foo { my $a = 0; while ($a) { ... } } >> and
502 C<< sub foo { while (0) { ... } } >> now return the same thing [perl #73618].
506 Fixed the debugger C<l> and C<M> commands, and other debugger
507 functionality which was broken in 5.17.0 [perl #113918].
511 String negation now behaves the same under C<use integer;> as it does
512 without [perl #113012].
516 C<chr> now returns the Unicode replacement character (U+FFFD) for -1,
517 regardless of the internal representation. -1 used to wrap if the argument
518 was tied or a string internally.
522 Using a C<format> after its enclosing sub was freed could crash as of
523 perl 5.12.0, if the format referenced lexical variables from the outer sub.
527 Using a C<format> after its enclosing sub was undefined could crash as of
528 perl 5.10.0, if the format referenced lexical variables from the outer sub.
532 Using a C<format> defined inside a closures, which format references
533 lexical variables from outside, never really worked unless the C<write>
534 call was directly inside the closure. In 5.10.0 it even started crashing.
535 Now the copy of that closure nearest the top of the call stack is used to
536 find those variables.
540 Formats that close over variables in special blocks no longer crash if a
541 stub exists with the same name as the special block before the special
546 The parser no longer gets confused, treating C<eval foo ()> as a syntax
547 error if preceded by C<print;> [perl #16249].
551 The return value of C<syscall> is no longer truncated on 64-bit platforms
556 Constant folding no longer causes C<print 1 ? FOO : BAR> to print to the
557 FOO handle [perl #78064].
561 C<do subname> now calls the named subroutine and uses the file name it
562 returns, instead of opening a file named "subname".
566 Subroutines looked up by rv2cv check hooks (registered by XS modules) are
567 now taken into consideration when determining whether C<foo bar> should be
568 the sub call C<foo(bar)> or the method call C<< "bar"->foo >>.
572 C<CORE::foo::bar> is no longer treated specially, allowing global overrides
573 to be called directly via C<CORE::GLOBAL::uc(...)> [perl #113016].
577 Calling an undefined sub whose typeglob has been undefined now produces the
578 customary "Undefined subroutine called" error, instead of "Not a CODE
583 =head1 Known Problems
585 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
586 tests that had to be C<TODO>ed for the release would be noted here. Unfixed
587 platform specific bugs also go here.
589 [ List each fix as a =item entry ]
601 XXX If any significant core contributor has died, we've added a short obituary
604 =head1 Acknowledgements
606 XXX Generate this with:
608 perl Porting/acknowledgements.pl v5.17.1..HEAD
610 =head1 Reporting Bugs
612 If you find what you think is a bug, you might check the articles
613 recently posted to the comp.lang.perl.misc newsgroup and the perl
614 bug database at http://rt.perl.org/perlbug/ . There may also be
615 information at http://www.perl.org/ , the Perl Home Page.
617 If you believe you have an unreported bug, please run the L<perlbug>
618 program included with your release. Be sure to trim your bug down
619 to a tiny but sufficient test case. Your bug report, along with the
620 output of C<perl -V>, will be sent off to perlbug@perl.org to be
621 analysed by the Perl porting team.
623 If the bug you are reporting has security implications, which make it
624 inappropriate to send to a publicly archived mailing list, then please send
625 it to perl5-security-report@perl.org. This points to a closed subscription
626 unarchived mailing list, which includes
627 all the core committers, who will be able
628 to help assess the impact of issues, figure out a resolution, and help
629 co-ordinate the release of patches to mitigate or fix the problem across all
630 platforms on which Perl is supported. Please only use this address for
631 security issues in the Perl core, not for modules independently
636 The F<Changes> file for an explanation of how to view exhaustive details
639 The F<INSTALL> file for how to build Perl.
641 The F<README> file for general stuff.
643 The F<Artistic> and F<Copying> files for copyright information.