4 This has been completed up to 9ac8a16, except for:
5 8629c11317 smueller Escape double-quotes in generated #line directives
6 8dc67a69b shlomif perl -d: display lines inside subroutines.
7 3dfd1b5cd2 leont Export PerlIOBase_open
11 [ this is a template for a new perldelta file. Any text flagged as
12 XXX needs to be processed before release. ]
14 perldelta - what is new for perl v5.15.7
18 This document describes differences between the 5.15.6 release and
21 If you are upgrading from an earlier release such as 5.15.5, first read
22 L<perl5156delta>, which describes differences between 5.15.5 and
27 XXX Any important notices here
29 =head1 Core Enhancements
31 XXX New core language features go here. Summarise user-visible core language
32 enhancements. Particularly prominent performance optimisations could go
33 here, but most should go in the L</Performance Enhancements> section.
35 [ List each enhancement as a =head2 entry ]
37 =head2 C<use charnames> no longer needed for C<\N{I<name>}>
39 The C<charnames> module is now automatically loaded when needed as if
40 the C<:full> and C<:short> options had been specified. See
45 XXX Any security-related notices go here. In particular, any security
46 vulnerabilities closed should be noted here rather than in the
47 L</Selected Bug Fixes> section.
49 [ List each security issue as a =head2 entry ]
51 =head1 Incompatible Changes
53 XXX For a release on a stable branch, this section aspires to be:
55 There are no changes intentionally incompatible with 5.XXX.XXX
56 If any exist, they are bugs, and we request that you submit a
57 report. See L</Reporting Bugs> below.
59 [ List each incompatible change as a =head2 entry ]
63 XXX Any deprecated features, syntax, modules etc. should be listed here.
64 In particular, deprecated modules should be listed here even if they are
65 listed as an updated module in the L</Modules and Pragmata> section.
67 [ List each deprecation as a =head2 entry ]
69 =head2 Deprecated Modules
73 =item L<Version::Requirements>
75 Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements,
76 which is a drop-in replacement. It will be deleted from perl.git blead
81 =head1 Performance Enhancements
83 XXX Changes which enhance performance without changing behaviour go here. There
84 may well be none in a stable release.
86 [ List each enhancement as a =item entry ]
92 Version declarations with the C<use> keyword (e.g., C<use 5.012>) are now
93 faster, as they enable features without loading F<feature.pm>.
97 =head1 Modules and Pragmata
99 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
100 go here. If Module::CoreList is updated, generate an initial draft of the
101 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
102 entries to STDOUT. Results can be pasted in place of the '=head2' entries
103 below. A paragraph summary for important changes should then be added by hand.
104 In an ideal world, dual-life modules would have a F<Changes> file that could be
107 [ Within each section, list entries as a =item entry ]
109 =head2 New Modules and Pragmata
119 =head2 Updated Modules and Pragmata
125 L<B::Deparse> has been upgraded from version 1.10 to version 1.11.
127 It now deparses C<open('random string')> correctly. It used to omit the
128 quotation marks, which did not work if the string were not a valid
129 identifier [perl #91416].
131 A similar bug also affected hash and array elements such as
132 C<< 'random string'->[0] >>, which would deparse as C<$random string[0]>.
135 Those same syntaxes used to drop the package name from variables beginning
136 with a punctuation mark, as in C<< "foo::]"->{$key} >>. This, too, has
139 B::Deparse no longer hangs when deparsing a program with stash
140 circularities, such as C<BEGIN { *Acme::Acme:: = *Acme:: }> [perl #91384].
142 C</$s[1]/> used to be deparsed as C<$s[1]> if @s were a lexical variable
143 [perl #81424]. Similarly, C</$#s/> would be deparsed as C<$#s> for both
144 lexical and package variables. These has been fixed.
146 The C</applaud> regular expression flags are no longer omitted.
148 Feature hints are now deparsed with C<use feature> rather than C<%^H>
151 A regression in 1.10 that caused C<ambient_pragmas> to disabled strict mode
152 in obscure cases has been fixed.
154 Strict mode is now fully deparsed, including subs and vars [perl #24027].
156 The global variables C<$(>, C<$|> and C<$)> are now deparsed with braces
157 (i.e., C<${(}>) in regular expressions [perl #86060].
161 L<CGI> has been upgraded from version 3.58 to version 3.59.
163 We no longer read from STDIN when the Content-Length is not set, preventing
164 requests with no Content-Length from freezing in some cases. This is consistent
165 with the CGI RFC 3875, and is also consistent with CGI::Simple. However, the old
166 behavior may have been expected by some command-line uses of CGI.pm.
170 L<CPAN::Meta> has been upgraded from version 2.112621 to version 2.113640.
172 Version::Requirements has now been merged as CPAN::Meta::Requirements.
176 L<CPANPLUS> has been upgraded from version 0.9113 to version 0.9116.
180 L<POSIX> has been upgraded from version 1.28 to version 1.29.
181 C<POSIX::sleep> is now a direct call into the underlying OS C<sleep>
182 function, instead of being a Perl wrapper on C<CORE::sleep>. C<POSIX::dup2>
183 now returns the correct value on Win32 (I<i.e.> the file descriptor).
184 C<POSIX::SigSet> C<sigsuspend> and C<sigpending> and C<POSIX::pause> now
185 dispatch safe signals immediately before returning to their caller.
189 L<Data::Dumper> has been upgraded from version 2.135_01 to version
192 It can now dump vstrings [perl #101162].
194 The nameless typeglob (C<*{""}>) is now dumped properly.
198 L<diagnostics> has been upgraded from version 1.26 to version 1.27.
200 See the entry for splain in the L</Utility Changes> section, for the
201 changes. The diagnostics module and the splain utility are actually one
206 L<Module::Pluggable> has been upgraded from version 3.9 to version 4.0.
210 L<POSIX> has been upgraded from version 1.27 to version 1.28.
212 C<sigsuspend> and C<pause> now run signals handle before returning, as the
213 whole point of these two functions is to wait until a signal has
214 arrived, and then return I<after> it has been triggered. Delayed, or
215 "safe", signals were preventing that from happening, possibly resulting in
216 race conditions [perl #107216].
220 L<Term::UI> has been upgraded from version 0.26 to version 0.30.
224 L<Tie::File> has been upgraded from version 0.96 to version 0.98.
228 L<Unicode::UCD> has been upgraded from version 0.37 to version 0.38.
229 This changes the output of C<prop_invmap()> for the Name_Alias property
230 to reflect the changes that are planned for Unicode 6.1, so that there
231 won't be a format change when upgrading to 6.1. Briefly, a second
232 component of each alias is added that gives the type of alias it is.
233 Examples are at L<Unicode::UCD/prop_invmap()>.
237 L<Version::Requirements> has been upgraded from version 0.101020 to version 0.101021.
239 Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements,
240 which is a drop-in replacement.
244 =head2 Removed Modules and Pragmata
256 XXX Changes to files in F<pod/> go here. Consider grouping entries by
257 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
259 =head2 New Documentation
261 XXX Changes which create B<new> files in F<pod/> go here.
265 XXX Description of the purpose of the new file here
267 =head2 Changes to Existing Documentation
269 XXX Changes which significantly change existing files in F<pod/> go here.
270 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
279 XXX Description of the change here
285 The following additions or changes have been made to diagnostic output,
286 including warnings and fatal error messages. For the complete list of
287 diagnostic messages, see L<perldiag>.
289 XXX New or changed warnings emitted by the core's C<C> code go here. Also
290 include any changes in L<perldiag> that reconcile it to the C<C> code.
292 [ Within each section, list entries as a =item entry that links to perldiag,
297 L<Invalid version object|perldiag/"Invalid version object">
300 =head2 New Diagnostics
302 XXX Newly added diagnostic messages go here
310 L<Cannot set tied @DB::args|perldiag/"Cannot set tied @DB::args">
312 This error occurs when C<caller> tries to set C<@DB::args> but finds it
313 tied. Before this error was added, it used to crash instead.
317 L<Cannot tie unreifiable array|perldiag/"Cannot tie unreifiable array">
319 This error is part of a safety check that the C<tie> operator does before
320 tying a special array like C<@_>. You should never see this message.
330 XXX L<message|perldiag/"message">
334 =head2 Changes to Existing Diagnostics
336 XXX Changes (i.e. rewording) of diagnostic messages go here
342 XXX Describe change here
346 =head1 Utility Changes
348 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
349 here. Most of these are built within the directories F<utils> and F<x2p>.
351 [ List utility changes as a =head3 entry for each utility and =item
352 entries for each change
353 Use L<XXX> with program names to get proper documentation linking. ]
361 splain no longer emits backtraces with the first line number repeated.
364 Uncaught exception from user code:
365 Cannot fwiddle the fwuddle at -e line 1.
367 main::baz() called at -e line 1
368 main::bar() called at -e line 1
369 main::foo() called at -e line 1
373 Uncaught exception from user code:
374 Cannot fwiddle the fwuddle at -e line 1.
375 main::baz() called at -e line 1
376 main::bar() called at -e line 1
377 main::foo() called at -e line 1
381 Some error message consist of multiple lines that are listed as separate
382 entries in L<perldiag>. splain has been taught to find the separate
383 entries in these cases, instead of simply failing to find the message.
387 =head1 Configuration and Compilation
389 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
390 go here. Any other changes to the Perl build process should be listed here.
391 However, any platform-specific changes should be listed in the
392 L</Platform Support> section, instead.
394 [ List changes as a =item entry ].
400 The Pod files for the perl FAQ, L<perlxs>, L<perlxstut> and L<perldoc>
401 are once again correctly installed in the same directory as the other core
404 =for 5.16.0 This isn't a regression from 5.14.x, so don't mention this.
410 XXX Any significant changes to the testing of a freshly built perl should be
411 listed here. Changes which create B<new> files in F<t/> go here as do any
412 large changes to the testing harness (e.g. when parallel testing was added).
413 Changes to existing files in F<t/> aren't worth summarising, although the bugs
414 that they represent may be covered elsewhere.
416 [ List each test improvement as a =item entry ]
422 F<t/porting/utils.t> now tests that various utility scripts compile cleanly.
423 During development, this avoids the embarrassment of inadvertently pushing a
424 commit which breaks code which isn't otherwise tested by the regression test
425 suite. For example, F<installperl> and F<installman>, needed by
426 C<make install>, are tested here.
430 =head1 Platform Support
432 XXX Any changes to platform support should be listed in the sections below.
434 [ Within the sections, list each platform as a =item entry with specific
435 changes as paragraphs below it. ]
439 XXX List any platforms that this version of perl compiles on, that previous
440 versions did not. These will either be enabled by new files in the F<hints/>
441 directories, or new subdirectories and F<README> files at the top level of the
446 =item XXX-some-platform
452 =head2 Discontinued Platforms
454 XXX List any platforms that this version of perl no longer compiles on.
458 =item XXX-some-platform
464 =head2 Platform-Specific Notes
466 XXX List any changes for specific platforms. This could include configuration
467 and compilation changes or changes in portability/compatibility. However,
468 changes within modules for platforms should generally be listed in the
469 L</Modules and Pragmata> section.
473 =item XXX-some-platform
479 =head1 Internal Changes
481 XXX Changes which affect the interface available to C<XS> code go here.
482 Other significant internal changes for future core maintainers should
485 [ List each change as a =item entry ]
491 There are now feature bundle hints in C<PL_hints> (C<$^H>) that version
492 declarations use, to avoid having to load F<feature.pm>. One setting of
493 the hint bits indicates a "custom" feature bundle, which means that the
494 entries in C<%^H> still apply. F<feature.pm> uses that.
496 The C<HINT_FEATURE_MASK> macro is defined in F<perl.h> along with other
497 hints. Other macros for setting and testing features and bundles are in
498 the new F<feature.h>. C<FEATURE_IS_ENABLED> (which has moved to
499 F<feature.h>) is no longer used throughout the codebase, but more specific
500 macros, e.g., C<FEATURE_SAY_IS_ENABLED>, that are defined in F<feature.h>.
504 F<lib/feature.pm> is now a generated file, created by the new
505 F<regen/feature.pl> script, which also generates F<feature.h>.
509 Tied arrays are now always C<AvREAL>. If C<@_> or C<DB::args> is tied, it
510 is reified first, to make sure this is always the case.
514 =head1 Selected Bug Fixes
516 XXX Important bug fixes in the core language are summarised here.
517 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
518 L</Modules and Pragmata>.
520 [ List each fix as a =item entry ]
524 =item * "b . COND" in the debugger has been fixed
526 Breaking on the current line with C<b . COND> was broken by previous work and
531 Tying C<%^H> no longer causes perl to crash or ignore
532 the contents of C<%^H> when entering a compilation
533 scope [perl #106282].
535 =item * C<~> on vstrings
537 The bitwise complement operator (and possibly other operators, too) when
538 passed a vstring would leave vstring magic attached to the return value,
539 even though the string had changed. This meant that
540 C<< version->new(~v1.2.3) >> would create a version looking like "v1.2.3"
541 even though the string passed to C<< version->new >> was actually
542 "\376\375\374". This also caused L<B::Deparse> to deparse C<~v1.2.3>
543 incorrectly, without the C<~> [perl #29070].
545 =item * Vstrings blowing away magic
547 Assigning a vstring to a magic (e.g., tied, C<$!>) variable and then
548 assigning something else used to blow away all the magic. This meant that
549 tied variables would come undone, C<$!> would stop getting updated on
550 failed system calls, C<$|> would stop setting autoflush, and other
551 mischief would take place. This has been fixed.
553 =item * C<newHVhv> and tied hashes
555 The C<newHVhv> XS function now works on tied hashes, instead of crashing or
556 returning an empty hash.
558 =item * Hashes will null elements
560 It is possible from XS code to create hashes with elements that have no
561 values. Perl itself sometimes creates such hashes, but they are rarely
562 visible to Perl code. The hash element and slice operators used to crash
563 when handling these in lvalue context. These have been fixed. They now
564 produce a "Modification of non-creatable hash value attempted" error
567 =item * No warning for C<open(foo::bar)>
569 When one writes C<open foo || die>, which used to work in Perl 4, a
570 "Precedence problem" warning is produced. This warning used erroneously to
571 apply to fully-qualified bareword handle names as well. This has been
574 =item * C<select> and package aliasing
576 After package aliasing (C<*foo:: = *bar::>), C<select> with 0 or 1 argument
577 would sometimes return a name that could not be used to refer to the
578 filehandle, or sometimes it would return C<undef> even when a filehandle
579 was selected. Now it returns a typeglob reference in such cases.
581 =item * C<PerlIO::get_layers> and tied variables
583 C<PerlIO::get_layers> no longer ignores FETCH on tied variables as it used
584 to most of the time [perl #97956].
586 =item * C<PerlIO::get_layers> and numbers
588 C<PerlIO::get_layers> no longer ignores some arguments that it thinks are
589 numeric, while treating others as filehandle names. It is now consistent
590 for flat scalars (i.e., not references).
592 =item * Lvalue subs and strict mode
594 Lvalue sub calls that are not determined to be such at compile time
595 (C<&$name> or &{"name"}) are no longer exempt from strict refs if they
596 occur in the last statement of an lvalue subroutine [perl #102486].
598 =item * Non-lvalue sub calls in potentially lvalue context
600 Sub calls whose subs are not visible at compile time, if
601 they occurred in the last statement of an lvalue subroutine,
602 would reject non-lvalue subroutines and die with "Can't modify non-lvalue
603 subroutine call" [perl #102486].
605 Non-lvalue sub calls whose subs I<are> visible at compile time exhibited
606 the opposite bug. If the call occurred in the last statement of an lvalue
607 subroutine, there would be no error when the lvalue sub was called in
608 lvalue context. Perl would blindly assign to the temporary value returned
609 by the non-lvalue subroutine.
611 =item * AUTOLOADing lvalue subs
613 C<AUTOLOAD> routines used to take precedence over the actual sub being
614 called (i.e., when autoloading wasn't needed), for sub calls in lvalue or
615 potential lvalue context, if the subroutine was not visible at compile
618 =item * C<caller> and tied C<@DB::args>
620 C<caller> sets C<@DB::args> to the subroutine arguments when called from
621 the DB package. It used to crash when doing so if C<@DB::args> happened to
622 be tied. Now it croaks instead.
626 Under debugging builds, this code:
628 sub TIEARRAY{bless[]}
634 use to produce an "av_reify called on tied array" warning. It doesn't any
637 =item * Unrecognised switches on C<#!> line
639 If a switch, such as B<-x>, that cannot occur on the C<#!> line is used
640 there, perl dies with "Can’t emulate...".
642 It used to produce the same message for switches that perl did not
643 recognise at all, whether on the command line or the C<#!> line.
645 Now it produces the "Unrecognized switch" error message [perl #104288].
647 =item * C<system> and SIGCHLD
649 C<system> now temporarily blocks the SIGCHLD signal handler, to prevent the
650 signal handler from stealing the exit status [perl #105700].
652 =item * Deleting methods via C<delete>
654 Deletion of methods via C<delete $Class::{method}> syntax used to update
655 method caches if called in void context, but not scalar or list context.
656 Now it always updates those caches.
658 =item * Hash element deletion and destructors
660 When hash elements are deleted in void context, the internal hash entry is
661 now freed before the value is freed, to prevent destructors call by that
662 latter freeing from seeing the hash in an inconsistent state. It was
663 possible to cause double-frees if the destructor freed the hash itself
666 =item * C<(s)printf>'s %n formatting code
668 The %n formatting code, which causes the number of characters to be
669 assigned to the next argument to C<printf> or C<sprintf> now actually
670 assigns the number of characters, instead of the number of bytes.
672 It also works now with special lvalue functions like C<substr> and with
673 nonexistent hash and array elements [perl #103492].
675 =item * Typeglobs and threads
677 Typeglobs returned from threads are no longer cloned if the parent thread
678 already has a glob with the same name. This means that returned
679 subroutines will now assign to the right package variables [perl #107366].
683 =head1 Known Problems
685 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
686 tests that had to be C<TODO>ed for the release would be noted here, unless
687 they were specific to a particular platform (see below).
689 This is a list of some significant unfixed bugs, which are regressions
690 from either 5.XXX.XXX or 5.XXX.XXX.
692 [ List each fix as a =item entry ]
704 XXX If any significant core contributor has died, we've added a short obituary
707 =head1 Acknowledgements
709 XXX Generate this with:
711 perl Porting/acknowledgements.pl v5.15.6..HEAD
713 =head1 Reporting Bugs
715 If you find what you think is a bug, you might check the articles
716 recently posted to the comp.lang.perl.misc newsgroup and the perl
717 bug database at http://rt.perl.org/perlbug/ . There may also be
718 information at http://www.perl.org/ , the Perl Home Page.
720 If you believe you have an unreported bug, please run the L<perlbug>
721 program included with your release. Be sure to trim your bug down
722 to a tiny but sufficient test case. Your bug report, along with the
723 output of C<perl -V>, will be sent off to perlbug@perl.org to be
724 analysed by the Perl porting team.
726 If the bug you are reporting has security implications, which make it
727 inappropriate to send to a publicly archived mailing list, then please send
728 it to perl5-security-report@perl.org. This points to a closed subscription
729 unarchived mailing list, which includes
730 all the core committers, who will be able
731 to help assess the impact of issues, figure out a resolution, and help
732 co-ordinate the release of patches to mitigate or fix the problem across all
733 platforms on which Perl is supported. Please only use this address for
734 security issues in the Perl core, not for modules independently
739 The F<Changes> file for an explanation of how to view exhaustive details
742 The F<INSTALL> file for how to build Perl.
744 The F<README> file for general stuff.
746 The F<Artistic> and F<Copying> files for copyright information.