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::YAML> has been upgraded from version 0.003 to version 0.004.
179 L<CPANPLUS> has been upgraded from version 0.9109 to version 0.9111.
183 L<CPANPLUS::Dist::Build> has been upgraded from version 0.56 to version 0.58.
187 L<Devel::PPPort> has been upgraded from version 3.19 to version 3.20.
191 L<diagnostics> has been upgraded from version 1.24 to version 1.25.
193 It now strips out C<SZ<><...>> formatting codes before displaying
194 descriptions [perl #94488].
198 L<Data::Dumper> has been upgraded from version 2.133 to version 2.134.
200 The XS code for sorting hash keys has been simplified slightly.
204 L<Exporter> has been upgraded from version 5.64_03 to version 5.65.
208 L<ExtUtils::ParseXS> has been upgraded from version 3.03_01 to version 3.04_04.
210 The handling of C<dVAR> in the generated XS code has been simplified.
212 The previously broken "INCLUDE: ... |" functionality has been repaired
215 A compatibility-workaround for modules that cannot
216 live with the new XSUB staticness (see I<XSUBs are now static> above)
217 has been implemented with the C<PERL_EUPXS_ALWAYS_EXPORT> and
218 C<PERL_EUPXS_NEVER_EXPORT> preprocessor defines.
220 The compiler warnings when -except option is used with F<xsubpp>
223 The XSUB.h changes to make C<XS(name)> use C<XS_INTERNAL(name)>
224 by default (which were in the 5.15.2 dev release of perl)
225 have been reverted since too many CPAN modules expect to
226 be able to refer to XSUBs declared with C<XS(name)>.
227 Instead, C<ExtUtils::ParseXS> will define a copy of the
228 C<XS_INTERNAL>/C<XS_EXTERNAL> macros as necessary going back to
229 perl 5.10.0. By default, ExtUtils::ParseXS will use
230 C<XS_INTERNAL(name)> instead of C<XS(name)>.
232 Fixed regression for input-typemap override in XS argument
233 list (CPAN RT #70448).
235 C<ExtUtils::Typemaps> now properly strips trailing semicolons
236 from inputmaps. These could previously trigger warnings (errors
237 in strict C89 compilers) due to additional semicolons being
238 interpreted as empty statements.
240 Now detects and throws a warning if there is a C<CODE> section using
241 C<RETVAL>, but no C<OUTPUT> section (CPAN RT #69536).
245 L<Locale::Codes> has been upgraded from version 3.17 to version 3.18.
247 The CIA world added non-standard values, so this is no longer used as a source
252 L<File::Glob> has been upgraded from version 1.12 to version 1.13.
254 On Windows, tilde (~) expansion now checks the C<USERPROFILE> environment
255 variable, after checking C<HOME>.
257 See also L</Security>.
261 L<Filter::Simple> has been upgrade from version 0.87 to 0.88.
263 It is now better at detecting the end of a pod section. It always checks
264 for =cut, instead of checking for =end (if the pod begins with =begin) or
265 the end of the paragraph (if the pod begins with =for) [perl #92436].
267 It is also better at detecting variables. A method call on a variable is
268 no longer considered part of the variable name, so strings passed to a
269 method are now hidden from filters that do not want to deal with strings
274 L<Math::BigRat> has been upgraded from version 0.2602 to version 0.2603.
276 C<int()> on a Math::BigRat object containing -1/2 now creates a
277 Math::BigInt containing 0, rather than -0. L<Math::BigInt> does not even
278 support negative zero, so the resulting object was actually malformed
283 L<Module::CoreList> has been upgraded from version 2.55 to 2.56.
285 It was missing a few entries: L<DB_File> in 5.8.2, L<Errno> in 5.6.0 and
286 5.6.1, and L<VMS::Filespec> in 5.12.3.
290 L<Module::Metadata> has been upgraded from version 1.000005_01 to version 1.000007.
294 L<Module::Load::Conditional> has been upgraded from version 0.44 to version 0.46.
298 L<ODBM_File> has been upgraded from version 1.11 to version 1.12.
300 This is only a minor refactoring of the XS code to bring it closer to the
301 other C<?DBM_File> modules.
305 L<open> has been upgraded from version 1.08 to 1.09.
307 It no longer turns of layers on standard handles when invoked without the
308 ":std" directive. Similarly, when invoked I<with> the ":std" directive, it
309 now clears layers on STDERR before applying the new ones, and not just on
310 STDIN and STDOUT [perl #92728].
314 L<perlfaq> has been upgraded from version 5.01500302 to version 5.0150034.
318 L<Pod::Simple> has been upgraded from version 3.18 to version 3.19.
322 L<POSIX> has been upgraded from version 1.24 to version 1.25.
324 L<POSIX> no longer uses L<AutoLoader>. Any code which was relying on this
325 implementation detail was buggy, and may fail as a result of this change.
326 The module's Perl code has been considerably simplified, roughly halving
327 the number of lines, with no change in functionality. The XS code has
328 been refactored to reduce the size of the shared object by about 12%,
329 with no change in functionality. More POSIX functions now have tests.
331 C<POSIX::Termios::setattr> now defaults the third argument to C<TCSANOW>,
332 instead of 0. On most platforms C<TCSANOW> is defined as 0, but on some
333 0 is not a valid parameter, which caused a call with defaults to fail.
337 L<Storable> has been upgraded from version 2.31 to version 2.32.
339 XS code which duplicates functionality of F<ppport.h> has been removed.
340 Tests should now pass on older versions of L<Test::More>. Storable now
341 builds and passes tests back to perl 5.004.
345 L<threads::shared> has been upgraded from version 1.38 to 1.40.
347 Destructors on shared objects used to be ignored sometimes if the objects
348 were referenced only by shared data structures. This has been mostly
349 fixed, but destructors may still be ignored if the objects still exist at
350 global destruction time [perl #98204].
354 L<XSLoader> has been upgraded from version 0.15 to version 0.16.
358 =head2 Removed Modules and Pragmata
370 XXX Changes to files in F<pod/> go here. Consider grouping entries by
371 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
373 =head2 New Documentation
377 This a new OO tutorial. It focuses on basic OO concepts, and then recommends
378 that readers choose an OO framework from CPAN.
380 =head2 Changes to Existing Documentation
388 This document has been rewritten from scratch, and its coverage of various OO
389 concepts has been expanded.
399 There is now a standard convention for naming keys in the C<%^H>,
400 documented under L<Key naming|perlpragma/Key naming>.
404 =head2 Removed Documentation
406 =head3 Old OO Documentation
408 All the old OO tutorials, perltoot, perltooc, and perlboot, have been
409 removed. The perlbot (bag of object tricks) document has been removed as well.
411 =head3 Development Deltas
413 The old perldelta files for development cycles prior to 5.15 have been
418 The following additions or changes have been made to diagnostic output,
419 including warnings and fatal error messages. For the complete list of
420 diagnostic messages, see L<perldiag>.
422 XXX New or changed warnings emitted by the core's C<C> code go here. Also
423 include any changes in L<perldiag> that reconcile it to the C<C> code.
425 [ Within each section, list entries as a =item entry that links to perldiag,
430 L<Invalid version object|perldiag/"Invalid version object">
433 =head2 New Diagnostics
435 XXX Newly added diagnostic messages go here
443 XXX L<message|perldiag/"message">
453 XXX L<message|perldiag/"message">
457 =head2 Changes to Existing Diagnostics
459 XXX Changes (i.e. rewording) of diagnostic messages go here
465 XXX Describe change here
469 =head1 Utility Changes
471 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
472 here. Most of these are built within the directories F<utils> and F<x2p>.
474 [ List utility changes as a =head3 entry for each utility and =item
475 entries for each change
476 Use L<XXX> with program names to get proper documentation linking. ]
488 =head1 Configuration and Compilation
490 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
491 go here. Any other changes to the Perl build process should be listed here.
492 However, any platform-specific changes should be listed in the
493 L</Platform Support> section, instead.
495 [ List changes as a =item entry ].
501 The file F<global.sym> is no longer needed, and has been removed. It
502 contained a list of all exported functions, one of the files generated by
503 F<regen/embed.pl> from data in F<embed.fnc> and F<regen/opcodes>. The code
504 has been refactored so that the only user of F<global.sym>, F<makedef.pl>,
505 now reads F<embed.fnc> and F<regen/opcodes> directly, removing the need to
506 store the list of exported functions in an intermediate file.
508 As F<global.sym> was never installed, this change will not be visible
509 outside the build process.
515 XXX Any significant changes to the testing of a freshly built perl should be
516 listed here. Changes which create B<new> files in F<t/> go here as do any
517 large changes to the testing harness (e.g. when parallel testing was added).
518 Changes to existing files in F<t/> aren't worth summarising, although the bugs
519 that they represent may be covered elsewhere.
521 [ List each test improvement as a =item entry ]
527 F<t/porting/globvar.t> has been added, to run a sanity check on F<globar.sym>.
528 F<globar.sym> is not needed on most *nix platforms, but is for Win32, hence
529 previously was it was possible to inadvertently commit changes that worked
530 perfectly locally, but broke the build on Win32.
534 F<t/op/unlink.t> has been added to test the C<unlink> function.
538 =head1 Platform Support
540 XXX Any changes to platform support should be listed in the sections below.
542 [ Within the sections, list each platform as a =item entry with specific
543 changes as paragraphs below it. ]
547 XXX List any platforms that this version of perl compiles on, that previous
548 versions did not. These will either be enabled by new files in the F<hints/>
549 directories, or new subdirectories and F<README> files at the top level of the
554 =item XXX-some-platform
560 =head2 Discontinued Platforms
562 XXX List any platforms that this version of perl no longer compiles on.
566 =item XXX-some-platform
572 =head2 Platform-Specific Notes
574 XXX List any changes for specific platforms. This could include configuration
575 and compilation changes or changes in portability/compatibility. However,
576 changes within modules for platforms should generally be listed in the
577 L</Modules and Pragmata> section.
581 =item XXX-some-platform
587 =head1 Internal Changes
589 XXX Changes which affect the interface available to C<XS> code go here.
590 Other significant internal changes for future core maintainers should
593 [ List each change as a =item entry ]
599 The C<is_gv_magical_sv> function has been eliminated and merged with
600 C<gv_fetchpvn_flags>. It used to be called to determine whether a GV
601 should be autovivified in rvalue context. Now it has been replaced with a
602 new C<GV_ADDMG> flag (not part of the API).
606 Padlists are now marked C<AvREAL>; i.e., reference-counted. They have
607 always been reference-counted, but were not marked real, because F<pad.c>
608 did its own clean-up, instead of using the usual clean-up code in F<sv.c>.
609 That caused problems in thread cloning, so now the C<AvREAL> flag is on,
610 but is turned off in F<pad.c> right before the padlist is freed (after
611 F<pad.c> has done its custom freeing of the pads).
615 All the C files that make up the Perl core have been converted to UTF-8.
619 =head1 Selected Bug Fixes
621 XXX Important bug fixes in the core language are summarised here.
622 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
623 L</Modules and Pragmata>.
625 [ List each fix as a =item entry ]
631 In Perl 5.15.0 C<defined(${'$'})> stopped returning true if the C<$$>
632 variable had not been used yet. This has been fixed.
636 C<defined(${"..."})>, C<defined(*{"..."})>, etc., used to
637 return true for most, but not all built-in variables, if
638 they had not been used yet. Many times that new built-in
639 variables were added in past versions, this construct was
640 not taken into account, so this affected C<${^GLOBAL_PHASE}> and
641 C<${^UTF8CACHE}>, among others. It also used to return false if the
642 package name was given as well (C<${"::!"}>) and for subroutines in the
643 CORE package [perl #97978] [perl #97492] [perl #97484].
647 Perl 5.10.0 introduced a similar bug: C<defined(*{"foo"})> where "foo"
648 represents the name of a built-in global variable used to return false if
649 the variable had never been used before, but only on the I<first> call.
650 This, too, has been fixed.
654 Various functions that take a filehandle argument in rvalue context
655 (C<close>, C<readline>, etc.) used to call C<FETCH> multiple times, if it
656 was a tied variable, and warn twice, if it was C<undef> [perl #97482].
660 C<close> and similar filehandle functions, when called on built-in global
661 variables (like C<$+>), used to die if the variable happened to hold the
662 undefined value, instead of producing the usual "Use of uninitialized
667 When autovivified file handles were introduced in Perl 5.6.0, C<readline>
668 was inadvertently made to autovivify when called as C<readline($foo)> (but
669 not as C<< <$foo> >>). It has now been fixed never to autovivify.
673 C<defined ${ $tied_variable }> used to call C<FETCH> multiple times, but
674 now calls it just once.
678 Some cases of dereferencing a complex expression, such as
679 C<${ (), $tied } = 1>, used to call C<FETCH> multiple times, but now call
684 For a tied variable returning a package name, C<< $tied->method >> used to
685 call C<FETCH> multiple times (even up to six!), and sometimes would
686 fail to call the method, due to memory corruption.
690 Calling an undefined anonymous subroutine (e.g., what $x holds after
691 C<undef &{$x = sub{}}>) used to cause a "Not a CODE reference" error, which
692 has been corrected to "Undefined subroutine called" [perl #71154].
696 Causing C<@DB::args> to be freed between uses of C<caller> no longer
697 results in a crash [perl #93320].
701 Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined
702 values. It would die in strict mode or lvalue context for most undefined
703 values, but would be treated as the empty string (with a warning) for the
704 specific scalar return by C<undef()> (C<&PL_sv_undef> internally). This
705 has been corrected. C<undef()> is now treated like other undefined
706 scalars, as in Perl 5.005.
710 It used to be possible to free the typeglob of a localised array or hash
711 (e.g., C<local @{"x"}; delete $::{x}>), resulting in a crash on scope exit.
715 C<setpgrp($foo)> used to be equivalent to C<($foo, setpgrp)>, because
716 C<setpgrp> was ignoring its argument if there was just one. Now it is
717 equivalent to C<setpgrp($foo,0)>.
721 Assignments like C<*$tied = \&{"..."}> and C<*glob = $tied> now call FETCH
726 C<chdir>, C<chmod>, C<chown>, C<utime>, C<truncate>, C<stat>, C<lstat> and the filetest ops (C<-r>, C<-x>, etc.)
727 now always call FETCH if passed a tied
728 variable as the last argument. They used to ignore tiedness if the last
729 thing return from or assigned to the variable was a typeglob or reference
734 Perl 5.15.1 inadvertently stopped C<*foo =~ s/\*//r> from working, as it
735 would try to force the *foo glob into a string. This has been fixed
740 If things were arranged in memory the right way, it was possible for
741 thread joining to emit "Attempt to free unreferenced scalar" warnings if
742 C<caller> had been used from the C<DB> package prior to thread creation,
743 due to the way pads were reference-counted and cloned [perl #98092].
747 CORE:: subs were introduced in the previous development release, but
748 C<defined &{"CORE::..."}> did not return true. That has been rectified
753 Lvalue subroutines were made to autovivify in 5.15.0, but it did not work
754 in some cases involving an intervening list operator between the
755 dereference operator and the subroutine call (C<${(), lvsub()}>)
760 A bug has been fixed that occurs when a tied variable is used as a
761 subroutine reference: if the last thing assigned to or returned from the
762 variable was a reference or typeglob, the C<\&$tied> could either crash or
763 return the wrong subroutine. The reference case is a regression introduced
764 in Perl 5.10.0. For typeglobs, it has probably never worked till now.
768 C<given> was not scoping its implicit $_ properly, resulting in memory
769 leaks or "Variable is not available" warnings [perl #94682].
773 C<-l> followed by a bareword no longer "eats" the previous argument to
774 the list operator in whose argument list it resides. In less convoluted
775 English: C<print "bar", -l foo> now actually prints "bar", because C<-l>
780 In 5.14.0, filetest ops (C<-r>, C<-x>, etc.) started calling FETCH on a
781 tied argument belonging to the previous argument to a list operator, if
782 called with a bareword argument or no argument at all. This has been
783 fixed, so C<push @foo, $tied, -r> no longer calls FETCH on C<$tied>.
787 C<shmread> was not setting the scalar flags correctly when reading from
788 shared memory, causing the existing cached numeric representation in the
789 scalar to persist [perl #98480].
793 Weakening the first argument to an automatically-invoked C<DESTROY> method
794 could result in erroneous "DESTROY created new reference" errors or
795 crashes. Now it is an error to weaken a read-only reference.
799 =head1 Known Problems
801 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
802 tests that had to be C<TODO>ed for the release would be noted here, unless
803 they were specific to a particular platform (see below).
805 This is a list of some significant unfixed bugs, which are regressions
806 from either 5.XXX.XXX or 5.XXX.XXX.
808 [ List each fix as a =item entry ]
820 XXX If any significant core contributor has died, we've added a short obituary
823 =head1 Acknowledgements
825 XXX Generate this with:
827 perl Porting/acknowledgements.pl v5.15.2..HEAD
829 =head1 Reporting Bugs
831 If you find what you think is a bug, you might check the articles
832 recently posted to the comp.lang.perl.misc newsgroup and the perl
833 bug database at http://rt.perl.org/perlbug/ . There may also be
834 information at http://www.perl.org/ , the Perl Home Page.
836 If you believe you have an unreported bug, please run the L<perlbug>
837 program included with your release. Be sure to trim your bug down
838 to a tiny but sufficient test case. Your bug report, along with the
839 output of C<perl -V>, will be sent off to perlbug@perl.org to be
840 analysed by the Perl porting team.
842 If the bug you are reporting has security implications, which make it
843 inappropriate to send to a publicly archived mailing list, then please send
844 it to perl5-security-report@perl.org. This points to a closed subscription
845 unarchived mailing list, which includes
846 all the core committers, who will be able
847 to help assess the impact of issues, figure out a resolution, and help
848 co-ordinate the release of patches to mitigate or fix the problem across all
849 platforms on which Perl is supported. Please only use this address for
850 security issues in the Perl core, not for modules independently
855 The F<Changes> file for an explanation of how to view exhaustive details
858 The F<INSTALL> file for how to build Perl.
860 The F<README> file for general stuff.
862 The F<Artistic> and F<Copying> files for copyright information.