4 This has been completed up to 84c2f6fdcb.
9 [ this is a template for a new perldelta file. Any text flagged as
10 XXX needs to be processed before release. ]
12 perldelta - what is new for perl v5.15.3
16 This document describes differences between the 5.15.2 release and
19 If you are upgrading from an earlier release such as 5.15.1, first read
20 L<perl5152delta>, which describes differences between 5.15.1 and
25 XXX Any important notices here
27 =head1 Core Enhancements
29 XXX New core language features go here. Summarise user-visible core language
30 enhancements. Particularly prominent performance optimisations could go
31 here, but most should go in the L</Performance Enhancements> section.
33 [ List each enhancement as a =head2 entry ]
35 =head2 More CORE subs are callable through references
37 Perl 5.15.2 introduced subroutines in the CORE namespace. Most of them
38 could only be called as barewords; i.e., they could be aliased at compile
39 time and then inlined under new names.
41 Almost all of these functions can now be called through references and via
42 C<&foo()> syntax, bypassing the prototype. See L<CORE> for a list of the
45 =head2 New debugger commands
47 The debugger now has C<disable> and C<enable> commands for disabling
48 existing breakpoints and reënabling them. See L<perldebug>.
52 XXX Any security-related notices go here. In particular, any security
53 vulnerabilities closed should be noted here rather than in the
54 L</Selected Bug Fixes> section.
56 [ List each security issue as a =head2 entry ]
58 =head2 C<File::Glob::bsd_glob()> memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).
60 Calling C<File::Glob::bsd_glob> with the unsupported flag GLOB_ALTDIRFUNC would
61 cause an access violation / segfault. A Perl program that accepts a flags value from
62 an external source could expose itself to denial of service or arbitrary code
63 execution attacks. There are no known exploits in the wild. The problem has been
64 corrected by explicitly disabling all unsupported flags and setting unused function
65 pointers to null. Bug reported by Clément Lecigne.
67 =head1 Incompatible Changes
69 =head2 $[ has been removed
71 The array/string index offsetting mechanism, controlled by the C<$[> magic
72 variable, has been removed. C<$[> now always reads as zero. Writing a
73 zero to it is still permitted, but writing a non-zero value causes an
74 exception. Those hopelessly addicted to FORTRAN-style 1-based indexing
75 may wish to use the module L<Array::Base>, which provides an independent
76 implementation of the index offsetting concept, or L<Classic::Perl>,
77 which allows L<Array::Base> to be controlled through assignment to C<$[>.
79 =head2 User-defined case changing operations.
81 This feature was deprecated in Perl 5.14, and has now been removed.
82 The CPAN module L<Unicode::Casing> provides better functionality without
83 the drawbacks that this feature had, as are detailed in the 5.14
85 L<http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29>
87 =head2 XSUBs are now 'static'
89 XSUB C functions are now 'static', that is, they are not visible from
90 outside the compilation unit. Users can use the new C<XS_EXTERNAL(name)>
91 and C<XS_INTERNAL(name)> macros to pick the desired linking behaviour.
92 The ordinary C<XS(name)> declaration for XSUBs will continue to declare
93 non-'static' XSUBs for compatibility, but the XS compiler,
94 C<ExtUtils::ParseXS> (C<xsubpp>) will emit 'static' XSUBs by default.
95 C<ExtUtils::ParseXS>'s behaviour can be reconfigured from XS using the
96 C<EXPORT_XSUB_SYMBOLS> keyword, see L<perlxs> for details.
98 =head2 Borland compiler
100 All support for the Borland compiler has been dropped. The code had not
101 worked for a long time anyway.
103 =head2 Weakening read-only references
105 Weakening read-only references is no longer permitted. It should never
106 hove worked anyway, and in some cases could result in crashes.
110 XXX Any deprecated features, syntax, modules etc. should be listed here.
111 In particular, deprecated modules should be listed here even if they are
112 listed as an updated module in the L</Modules and Pragmata> section.
114 [ List each deprecation as a =head2 entry ]
116 =head1 Performance Enhancements
118 XXX Changes which enhance performance without changing behaviour go here. There
119 may well be none in a stable release.
121 [ List each enhancement as a =item entry ]
131 =head1 Modules and Pragmata
133 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
134 go here. If Module::CoreList is updated, generate an initial draft of the
135 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
136 entries to STDOUT. Results can be pasted in place of the '=head2' entries
137 below. A paragraph summary for important changes should then be added by hand.
138 In an ideal world, dual-life modules would have a F<Changes> file that could be
141 [ Within each section, list entries as a =item entry ]
143 =head2 New Modules and Pragmata
153 =head2 Updated Modules and Pragmata
159 L<AnyDBM_File> has been upgraded from version 1.00 to version 1.01.
161 This is only a minor documentation update.
165 L<Archive::Extract> has been upgraded from version 0.52 to version 0.56.
167 Resolved an issue where C<unzip> executable was present in C<PATH> on MSWin32
171 L<Archive::Tar> has been upgraded from version 1.76 to version 1.78.
175 L<CPAN::Meta> has been upgraded from version 2.112150 to version 2.112580.
179 L<CPAN::Meta::YAML> has been upgraded from version 0.003 to version 0.004.
183 L<CPANPLUS> has been upgraded from version 0.9109 to version 0.9111.
187 L<CPANPLUS::Dist::Build> has been upgraded from version 0.56 to version 0.58.
191 L<Devel::PPPort> has been upgraded from version 3.19 to version 3.20.
195 L<diagnostics> has been upgraded from version 1.24 to version 1.25.
197 It now strips out C<SZ<><...>> formatting codes before displaying
198 descriptions [perl #94488].
202 L<Data::Dumper> has been upgraded from version 2.133 to version 2.134.
204 The XS code for sorting hash keys has been simplified slightly.
208 L<Exporter> has been upgraded from version 5.64_03 to version 5.65.
212 L<ExtUtils::ParseXS> has been upgraded from version 3.03_01 to version 3.04_04.
214 The handling of C<dVAR> in the generated XS code has been simplified.
216 The previously broken "INCLUDE: ... |" functionality has been repaired
219 A compatibility-workaround for modules that cannot
220 live with the new XSUB staticness (see I<XSUBs are now static> above)
221 has been implemented with the C<PERL_EUPXS_ALWAYS_EXPORT> and
222 C<PERL_EUPXS_NEVER_EXPORT> preprocessor defines.
224 The compiler warnings when -except option is used with F<xsubpp>
227 The XSUB.h changes to make C<XS(name)> use C<XS_INTERNAL(name)>
228 by default (which were in the 5.15.2 dev release of perl)
229 have been reverted since too many CPAN modules expect to
230 be able to refer to XSUBs declared with C<XS(name)>.
231 Instead, C<ExtUtils::ParseXS> will define a copy of the
232 C<XS_INTERNAL>/C<XS_EXTERNAL> macros as necessary going back to
233 perl 5.10.0. By default, ExtUtils::ParseXS will use
234 C<XS_INTERNAL(name)> instead of C<XS(name)>.
236 Fixed regression for input-typemap override in XS argument
237 list (CPAN RT #70448).
239 C<ExtUtils::Typemaps> now properly strips trailing semicolons
240 from inputmaps. These could previously trigger warnings (errors
241 in strict C89 compilers) due to additional semicolons being
242 interpreted as empty statements.
244 Now detects and throws a warning if there is a C<CODE> section using
245 C<RETVAL>, but no C<OUTPUT> section (CPAN RT #69536).
249 L<Locale::Codes> has been upgraded from version 3.17 to version 3.18.
251 The CIA world added non-standard values, so this is no longer used as a source
256 L<File::Glob> has been upgraded from version 1.12 to version 1.13.
258 On Windows, tilde (~) expansion now checks the C<USERPROFILE> environment
259 variable, after checking C<HOME>.
261 See also L</Security>.
265 L<Filter::Simple> has been upgrade from version 0.87 to 0.88.
267 It is now better at detecting the end of a pod section. It always checks
268 for =cut, instead of checking for =end (if the pod begins with =begin) or
269 the end of the paragraph (if the pod begins with =for) [perl #92436].
271 It is also better at detecting variables. A method call on a variable is
272 no longer considered part of the variable name, so strings passed to a
273 method are now hidden from filters that do not want to deal with strings
278 L<Math::BigRat> has been upgraded from version 0.2602 to version 0.2603.
280 C<int()> on a Math::BigRat object containing -1/2 now creates a
281 Math::BigInt containing 0, rather than -0. L<Math::BigInt> does not even
282 support negative zero, so the resulting object was actually malformed
287 L<Module::CoreList> has been upgraded from version 2.55 to 2.56.
289 It was missing a few entries: L<DB_File> in 5.8.2, L<Errno> in 5.6.0 and
290 5.6.1, and L<VMS::Filespec> in 5.12.3.
294 L<Module::Metadata> has been upgraded from version 1.000005_01 to version 1.000007.
298 L<Module::Load::Conditional> has been upgraded from version 0.44 to version 0.46.
302 L<ODBM_File> has been upgraded from version 1.11 to version 1.12.
304 This is only a minor refactoring of the XS code to bring it closer to the
305 other C<?DBM_File> modules.
309 L<open> has been upgraded from version 1.08 to 1.09.
311 It no longer turns of layers on standard handles when invoked without the
312 ":std" directive. Similarly, when invoked I<with> the ":std" directive, it
313 now clears layers on STDERR before applying the new ones, and not just on
314 STDIN and STDOUT [perl #92728].
318 L<perlfaq> has been upgraded from version 5.01500302 to version 5.0150034.
322 L<Pod::Simple> has been upgraded from version 3.18 to version 3.19.
326 L<POSIX> has been upgraded from version 1.24 to version 1.25.
328 L<POSIX> no longer uses L<AutoLoader>. Any code which was relying on this
329 implementation detail was buggy, and may fail as a result of this change.
330 The module's Perl code has been considerably simplified, roughly halving
331 the number of lines, with no change in functionality. The XS code has
332 been refactored to reduce the size of the shared object by about 12%,
333 with no change in functionality. More POSIX functions now have tests.
335 C<POSIX::Termios::setattr> now defaults the third argument to C<TCSANOW>,
336 instead of 0. On most platforms C<TCSANOW> is defined as 0, but on some
337 0 is not a valid parameter, which caused a call with defaults to fail.
341 L<Storable> has been upgraded from version 2.31 to version 2.32.
343 XS code which duplicates functionality of F<ppport.h> has been removed.
344 Tests should now pass on older versions of L<Test::More>. Storable now
345 builds and passes tests back to perl 5.004.
349 L<threads::shared> has been upgraded from version 1.38 to 1.40.
351 Destructors on shared objects used to be ignored sometimes if the objects
352 were referenced only by shared data structures. This has been mostly
353 fixed, but destructors may still be ignored if the objects still exist at
354 global destruction time [perl #98204].
358 L<XSLoader> has been upgraded from version 0.15 to version 0.16.
362 =head2 Removed Modules and Pragmata
374 XXX Changes to files in F<pod/> go here. Consider grouping entries by
375 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
377 =head2 New Documentation
381 This a new OO tutorial. It focuses on basic OO concepts, and then recommends
382 that readers choose an OO framework from CPAN.
384 =head2 Changes to Existing Documentation
392 This document has been rewritten from scratch, and its coverage of various OO
393 concepts has been expanded.
403 There is now a standard convention for naming keys in the C<%^H>,
404 documented under L<Key naming|perlpragma/Key naming>.
408 =head2 Removed Documentation
410 =head3 Old OO Documentation
412 All the old OO tutorials, perltoot, perltooc, and perlboot, have been
413 removed. The perlbot (bag of object tricks) document has been removed as well.
415 =head3 Development Deltas
417 The old perldelta files for development cycles prior to 5.15 have been
422 The following additions or changes have been made to diagnostic output,
423 including warnings and fatal error messages. For the complete list of
424 diagnostic messages, see L<perldiag>.
426 XXX New or changed warnings emitted by the core's C<C> code go here. Also
427 include any changes in L<perldiag> that reconcile it to the C<C> code.
429 [ Within each section, list entries as a =item entry that links to perldiag,
434 L<Invalid version object|perldiag/"Invalid version object">
437 =head2 New Diagnostics
439 XXX Newly added diagnostic messages go here
447 XXX L<message|perldiag/"message">
457 XXX L<message|perldiag/"message">
461 =head2 Changes to Existing Diagnostics
463 XXX Changes (i.e. rewording) of diagnostic messages go here
469 XXX Describe change here
473 =head1 Utility Changes
475 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
476 here. Most of these are built within the directories F<utils> and F<x2p>.
478 [ List utility changes as a =head3 entry for each utility and =item
479 entries for each change
480 Use L<XXX> with program names to get proper documentation linking. ]
492 =head1 Configuration and Compilation
494 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
495 go here. Any other changes to the Perl build process should be listed here.
496 However, any platform-specific changes should be listed in the
497 L</Platform Support> section, instead.
499 [ List changes as a =item entry ].
505 The file F<global.sym> is no longer needed, and has been removed. It
506 contained a list of all exported functions, one of the files generated by
507 F<regen/embed.pl> from data in F<embed.fnc> and F<regen/opcodes>. The code
508 has been refactored so that the only user of F<global.sym>, F<makedef.pl>,
509 now reads F<embed.fnc> and F<regen/opcodes> directly, removing the need to
510 store the list of exported functions in an intermediate file.
512 As F<global.sym> was never installed, this change will not be visible
513 outside the build process.
519 XXX Any significant changes to the testing of a freshly built perl should be
520 listed here. Changes which create B<new> files in F<t/> go here as do any
521 large changes to the testing harness (e.g. when parallel testing was added).
522 Changes to existing files in F<t/> aren't worth summarising, although the bugs
523 that they represent may be covered elsewhere.
525 [ List each test improvement as a =item entry ]
531 F<t/porting/globvar.t> has been added, to run a sanity check on F<globar.sym>.
532 F<globar.sym> is not needed on most *nix platforms, but is for Win32, hence
533 previously was it was possible to inadvertently commit changes that worked
534 perfectly locally, but broke the build on Win32.
538 F<t/op/unlink.t> has been added to test the C<unlink> function.
542 =head1 Platform Support
544 XXX Any changes to platform support should be listed in the sections below.
546 [ Within the sections, list each platform as a =item entry with specific
547 changes as paragraphs below it. ]
551 XXX List any platforms that this version of perl compiles on, that previous
552 versions did not. These will either be enabled by new files in the F<hints/>
553 directories, or new subdirectories and F<README> files at the top level of the
558 =item XXX-some-platform
564 =head2 Discontinued Platforms
566 XXX List any platforms that this version of perl no longer compiles on.
570 =item XXX-some-platform
576 =head2 Platform-Specific Notes
578 XXX List any changes for specific platforms. This could include configuration
579 and compilation changes or changes in portability/compatibility. However,
580 changes within modules for platforms should generally be listed in the
581 L</Modules and Pragmata> section.
585 =item XXX-some-platform
591 =head1 Internal Changes
593 XXX Changes which affect the interface available to C<XS> code go here.
594 Other significant internal changes for future core maintainers should
597 [ List each change as a =item entry ]
603 The C<is_gv_magical_sv> function has been eliminated and merged with
604 C<gv_fetchpvn_flags>. It used to be called to determine whether a GV
605 should be autovivified in rvalue context. Now it has been replaced with a
606 new C<GV_ADDMG> flag (not part of the API).
610 Padlists are now marked C<AvREAL>; i.e., reference-counted. They have
611 always been reference-counted, but were not marked real, because F<pad.c>
612 did its own clean-up, instead of using the usual clean-up code in F<sv.c>.
613 That caused problems in thread cloning, so now the C<AvREAL> flag is on,
614 but is turned off in F<pad.c> right before the padlist is freed (after
615 F<pad.c> has done its custom freeing of the pads).
619 All the C files that make up the Perl core have been converted to UTF-8.
623 =head1 Selected Bug Fixes
625 XXX Important bug fixes in the core language are summarised here.
626 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
627 L</Modules and Pragmata>.
629 [ List each fix as a =item entry ]
635 In Perl 5.15.0 C<defined(${'$'})> stopped returning true if the C<$$>
636 variable had not been used yet. This has been fixed.
640 C<defined(${"..."})>, C<defined(*{"..."})>, etc., used to
641 return true for most, but not all built-in variables, if
642 they had not been used yet. Many times that new built-in
643 variables were added in past versions, this construct was
644 not taken into account, so this affected C<${^GLOBAL_PHASE}> and
645 C<${^UTF8CACHE}>, among others. It also used to return false if the
646 package name was given as well (C<${"::!"}>) and for subroutines in the
647 CORE package [perl #97978] [perl #97492] [perl #97484].
651 Perl 5.10.0 introduced a similar bug: C<defined(*{"foo"})> where "foo"
652 represents the name of a built-in global variable used to return false if
653 the variable had never been used before, but only on the I<first> call.
654 This, too, has been fixed.
658 Various functions that take a filehandle argument in rvalue context
659 (C<close>, C<readline>, etc.) used to call C<FETCH> multiple times, if it
660 was a tied variable, and warn twice, if it was C<undef> [perl #97482].
664 C<close> and similar filehandle functions, when called on built-in global
665 variables (like C<$+>), used to die if the variable happened to hold the
666 undefined value, instead of producing the usual "Use of uninitialized
671 When autovivified file handles were introduced in Perl 5.6.0, C<readline>
672 was inadvertently made to autovivify when called as C<readline($foo)> (but
673 not as C<< <$foo> >>). It has now been fixed never to autovivify.
677 C<defined ${ $tied_variable }> used to call C<FETCH> multiple times, but
678 now calls it just once.
682 Some cases of dereferencing a complex expression, such as
683 C<${ (), $tied } = 1>, used to call C<FETCH> multiple times, but now call
688 For a tied variable returning a package name, C<< $tied->method >> used to
689 call C<FETCH> multiple times (even up to six!), and sometimes would
690 fail to call the method, due to memory corruption.
694 Calling an undefined anonymous subroutine (e.g., what $x holds after
695 C<undef &{$x = sub{}}>) used to cause a "Not a CODE reference" error, which
696 has been corrected to "Undefined subroutine called" [perl #71154].
700 Causing C<@DB::args> to be freed between uses of C<caller> no longer
701 results in a crash [perl #93320].
705 Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined
706 values. It would die in strict mode or lvalue context for most undefined
707 values, but would be treated as the empty string (with a warning) for the
708 specific scalar return by C<undef()> (C<&PL_sv_undef> internally). This
709 has been corrected. C<undef()> is now treated like other undefined
710 scalars, as in Perl 5.005.
714 It used to be possible to free the typeglob of a localised array or hash
715 (e.g., C<local @{"x"}; delete $::{x}>), resulting in a crash on scope exit.
719 C<setpgrp($foo)> used to be equivalent to C<($foo, setpgrp)>, because
720 C<setpgrp> was ignoring its argument if there was just one. Now it is
721 equivalent to C<setpgrp($foo,0)>.
725 Assignments like C<*$tied = \&{"..."}> and C<*glob = $tied> now call FETCH
730 C<chdir>, C<chmod>, C<chown>, C<utime>, C<truncate>, C<stat>, C<lstat> and the filetest ops (C<-r>, C<-x>, etc.)
731 now always call FETCH if passed a tied
732 variable as the last argument. They used to ignore tiedness if the last
733 thing return from or assigned to the variable was a typeglob or reference
738 Perl 5.15.1 inadvertently stopped C<*foo =~ s/\*//r> from working, as it
739 would try to force the *foo glob into a string. This has been fixed
744 If things were arranged in memory the right way, it was possible for
745 thread joining to emit "Attempt to free unreferenced scalar" warnings if
746 C<caller> had been used from the C<DB> package prior to thread creation,
747 due to the way pads were reference-counted and cloned [perl #98092].
751 CORE:: subs were introduced in the previous development release, but
752 C<defined &{"CORE::..."}> did not return true. That has been rectified
757 Lvalue subroutines were made to autovivify in 5.15.0, but it did not work
758 in some cases involving an intervening list operator between the
759 dereference operator and the subroutine call (C<${(), lvsub()}>)
764 A bug has been fixed that occurs when a tied variable is used as a
765 subroutine reference: if the last thing assigned to or returned from the
766 variable was a reference or typeglob, the C<\&$tied> could either crash or
767 return the wrong subroutine. The reference case is a regression introduced
768 in Perl 5.10.0. For typeglobs, it has probably never worked till now.
772 C<given> was not scoping its implicit $_ properly, resulting in memory
773 leaks or "Variable is not available" warnings [perl #94682].
777 C<-l> followed by a bareword no longer "eats" the previous argument to
778 the list operator in whose argument list it resides. In less convoluted
779 English: C<print "bar", -l foo> now actually prints "bar", because C<-l>
784 In 5.14.0, filetest ops (C<-r>, C<-x>, etc.) started calling FETCH on a
785 tied argument belonging to the previous argument to a list operator, if
786 called with a bareword argument or no argument at all. This has been
787 fixed, so C<push @foo, $tied, -r> no longer calls FETCH on C<$tied>.
791 C<shmread> was not setting the scalar flags correctly when reading from
792 shared memory, causing the existing cached numeric representation in the
793 scalar to persist [perl #98480].
797 Weakening the first argument to an automatically-invoked C<DESTROY> method
798 could result in erroneous "DESTROY created new reference" errors or
799 crashes. Now it is an error to weaken a read-only reference.
803 Under miniperl (used to configure modules when perl itself is built),
804 C<glob> now clears %ENV before calling csh, since the latter croaks on some
805 systems if it does not like the contents of the LS_COLORS enviroment
806 variable [perl #98662].
810 =head1 Known Problems
812 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
813 tests that had to be C<TODO>ed for the release would be noted here, unless
814 they were specific to a particular platform (see below).
816 This is a list of some significant unfixed bugs, which are regressions
817 from either 5.XXX.XXX or 5.XXX.XXX.
819 [ List each fix as a =item entry ]
831 XXX If any significant core contributor has died, we've added a short obituary
834 =head1 Acknowledgements
836 XXX Generate this with:
838 perl Porting/acknowledgements.pl v5.15.2..HEAD
840 =head1 Reporting Bugs
842 If you find what you think is a bug, you might check the articles
843 recently posted to the comp.lang.perl.misc newsgroup and the perl
844 bug database at http://rt.perl.org/perlbug/ . There may also be
845 information at http://www.perl.org/ , the Perl Home Page.
847 If you believe you have an unreported bug, please run the L<perlbug>
848 program included with your release. Be sure to trim your bug down
849 to a tiny but sufficient test case. Your bug report, along with the
850 output of C<perl -V>, will be sent off to perlbug@perl.org to be
851 analysed by the Perl porting team.
853 If the bug you are reporting has security implications, which make it
854 inappropriate to send to a publicly archived mailing list, then please send
855 it to perl5-security-report@perl.org. This points to a closed subscription
856 unarchived mailing list, which includes
857 all the core committers, who will be able
858 to help assess the impact of issues, figure out a resolution, and help
859 co-ordinate the release of patches to mitigate or fix the problem across all
860 platforms on which Perl is supported. Please only use this address for
861 security issues in the Perl core, not for modules independently
866 The F<Changes> file for an explanation of how to view exhaustive details
869 The F<INSTALL> file for how to build Perl.
871 The F<README> file for general stuff.
873 The F<Artistic> and F<Copying> files for copyright information.