=encoding utf8 =head1 NAME perl5153delta - what is new for perl v5.15.3 =head1 DESCRIPTION This document describes differences between the 5.15.2 release and the 5.15.3 release. If you are upgrading from an earlier release such as 5.15.1, first read L, which describes differences between 5.15.1 and 5.15.2. =head1 Notice This release includes a rewrite of the perl OO docs which represent a significant modernization of the OO documentation. All of the old OO tutorials (perltoot, perlboot, etc.) have been replaced with pointers to the new docs. =head1 Core Enhancements =head2 More CORE subs are callable through references Perl 5.15.2 introduced subroutines in the CORE namespace. Most of them could only be called as barewords; i.e., they could be aliased at compile time and then inlined under new names. Almost all of these functions can now be called through references and via C<&foo()> syntax, bypassing the prototype. See L for a list of the exceptions. =head2 New debugger commands The debugger now has C and C commands for disabling existing breakpoints and reënabling them. See L. =head1 Security =head2 C memory error with GLOB_ALTDIRFUNC (CVE-2011-2728). Calling C with the unsupported flag GLOB_ALTDIRFUNC would cause an access violation / segfault. A Perl program that accepts a flags value from an external source could expose itself to denial of service or arbitrary code execution attacks. There are no known exploits in the wild. The problem has been corrected by explicitly disabling all unsupported flags and setting unused function pointers to null. Bug reported by Clément Lecigne. =head1 Incompatible Changes =head2 $[ has been removed The array/string index offsetting mechanism, controlled by the C<$[> magic variable, has been removed. C<$[> now always reads as zero. Writing a zero to it is still permitted, but writing a non-zero value causes an exception. Those hopelessly addicted to FORTRAN-style 1-based indexing may wish to use the module L, which provides an independent implementation of the index offsetting concept, or L, which allows L to be controlled through assignment to C<$[>. =head2 User-defined case changing operations. This feature was deprecated in Perl 5.14, and has now been removed. The CPAN module L provides better functionality without the drawbacks that this feature had, as are detailed in the 5.14 documentation: L =head2 XSUBs are now 'static' XSUB C functions are now 'static', that is, they are not visible from outside the compilation unit. Users can use the new C and C macros to pick the desired linking behaviour. The ordinary C declaration for XSUBs will continue to declare non-'static' XSUBs for compatibility, but the XS compiler, C (C) will emit 'static' XSUBs by default. C's behaviour can be reconfigured from XS using the C keyword, see L for details. =head2 Borland compiler All support for the Borland compiler has been dropped. The code had not worked for a long time anyway. =head2 Weakening read-only references Weakening read-only references is no longer permitted. It should never hove worked anyway, and in some cases could result in crashes. =head1 Modules and Pragmata =head2 Updated Modules and Pragmata =over 4 =item * L has been upgraded from version 1.00 to version 1.01. This is only a minor documentation update. =item * L has been upgraded from version 0.52 to version 0.56. Resolved an issue where C executable was present in C on MSWin32 =item * L has been upgraded from version 1.76 to version 1.78. =item * L has been upgraded from version 0.15 to version 0.16. =item * L has been upgraded from version 0.92 to version 0.93. =item * L has been upgraded from version 1.07 to 1.08. It now correctly deparses C<$#{/}> and C. =item * L has been upgraded from version 1.21 to 1.23. L is now a dual life module and several fixes have been make to make it more portable to older versions of perl. =item * L has been upgraded from version 2.112150 to version 2.112621. =item * L has been upgraded from version 0.003 to version 0.004. =item * L has been upgraded from version 0.9109 to version 0.9111. =item * L has been upgraded from version 0.56 to version 0.58. =item * L has been upgraded from version 3.19 to version 3.20. =item * L has been upgraded from version 1.24 to version 1.25. It now strips out CEE...E> formatting codes before displaying descriptions [perl #94488]. =item * L has been upgraded from version 2.133 to version 2.134. The XS code for sorting hash keys has been simplified slightly. =item * L has been upgraded from version 5.64_03 to version 5.65. =item * L has been upgraded from version 3.03_01 to version 3.04_04. The handling of C in the generated XS code has been simplified. The previously broken "INCLUDE: ... |" functionality has been repaired (CPAN RT #70213). A compatibility-workaround for modules that cannot live with the new XSUB staticness (see I above) has been implemented with the C and C preprocessor defines. The compiler warnings when -except option is used with F have been fixed. The XSUB.h changes to make C use C by default (which were in the 5.15.2 dev release of perl) have been reverted since too many CPAN modules expect to be able to refer to XSUBs declared with C. Instead, C will define a copy of the C/C macros as necessary going back to perl 5.10.0. By default, ExtUtils::ParseXS will use C instead of C. Fixed regression for input-typemap override in XS argument list (CPAN RT #70448). C now properly strips trailing semicolons from inputmaps. These could previously trigger warnings (errors in strict C89 compilers) due to additional semicolons being interpreted as empty statements. Now detects and throws a warning if there is a C section using C, but no C section (CPAN RT #69536). =item * L has been upgraded from version 3.17 to version 3.18. The CIA world added non-standard values, so this is no longer used as a source of data. =item * L has been upgraded from version 1.12 to version 1.13. On Windows, tilde (~) expansion now checks the C environment variable, after checking C. See also L. =item * L has been upgrade from version 0.87 to 0.88. It is now better at detecting the end of a pod section. It always checks for =cut, instead of checking for =end (if the pod begins with =begin) or the end of the paragraph (if the pod begins with =for) [perl #92436]. It is also better at detecting variables. A method call on a variable is no longer considered part of the variable name, so strings passed to a method are now hidden from filters that do not want to deal with strings [perl #92436]. =item * L has been upgraded from version 1.25_05 to 1.25_06, and L from version 1.32 to 1.33. Together, these upgrades fix a problem with IO::Handle's C and C methods. When these methods are called on the special ARGV handle, the next file is automatically opened, as happens with the built-in CE> and C functions. But, unlike the built-ins, these methods were not respecting the caller's use of the L pragma and applying the approprate I/O layers to the newly-opened file [rt.cpan.org #66474]. =item * L has been upgraded from version 1.995 to version 1.997. =item * L has been upgraded from version 1.996 to version 1.997. =item * L has been upgraded from version 0.29 to 0.30. =item * L has been upgraded from version 0.2602 to version 0.2603. C on a Math::BigRat object containing -1/2 now creates a Math::BigInt containing 0, rather than -0. L does not even support negative zero, so the resulting object was actually malformed [perl #95530]. =item * L has been upgraded from version 2.55 to 2.56. Updated module for 5.15.3, additionally it was missing a few entries: L in 5.8.2, L in 5.6.0 and 5.6.1, and L in 5.12.3. =item * L has been upgraded from version 1.000005_01 to version 1.000007. =item * L has been upgraded from version 0.44 to version 0.46. =item * L has been upgraded from version 1.11 to version 1.12. This is only a minor refactoring of the XS code to bring it closer to the other C modules. =item * L has been upgraded from version 1.08 to 1.09. It no longer turns of layers on standard handles when invoked without the ":std" directive. Similarly, when invoked I the ":std" directive, it now clears layers on STDERR before applying the new ones, and not just on STDIN and STDOUT [perl #92728]. =item * L has been upgraded from version 5.01500302 to version 5.0150034. =item * L has been upgraded from version 3.15_06 to 3.15_07. When rendering a file specified as an HTTP URL, it now use a manpage name based on the URL, instead of the name of the temporary file. =item * L has been upgraded from version 3.18 to version 3.19. =item * L has been upgraded from version 1.24 to version 1.25. L no longer uses L. Any code which was relying on this implementation detail was buggy, and may fail as a result of this change. The module's Perl code has been considerably simplified, roughly halving the number of lines, with no change in functionality. The XS code has been refactored to reduce the size of the shared object by about 12%, with no change in functionality. More POSIX functions now have tests. C now defaults the third argument to C, instead of 0. On most platforms C is defined as 0, but on some 0 is not a valid parameter, which caused a call with defaults to fail. =item * L has been upgraded from version 1.03 to 1.04. =item * L has been upgraded from version 2.31 to version 2.32. XS code which duplicates functionality of F has been removed. Tests should now pass on older versions of L. Storable now builds and passes tests back to perl 5.004. =item * L has been upgraded from version 1.01 to 1.02. =item * L has been upgraded from version 1.83 to 1.85. =item * L has been upgraded from version 1.38 to 1.40. Destructors on shared objects used to be ignored sometimes if the objects were referenced only by shared data structures. This has been mostly fixed, but destructors may still be ignored if the objects still exist at global destruction time [perl #98204]. =item * L has been upgraded from version 0.34 to version 0.35. =item * L has been upgraded from version 1.08 to version 1.09. =item * L has been upgraded from version 0.15 to version 0.16. =back =head1 Documentation =head2 New Documentation =head3 L This a new OO tutorial. It focuses on basic OO concepts, and then recommends that readers choose an OO framework from CPAN. =head2 Changes to Existing Documentation =head3 L =over 4 =item * This document has been rewritten from scratch, and its coverage of various OO concepts has been expanded. =back =head3 L =over 4 =item * There is now a standard convention for naming keys in the C<%^H>, documented under L. =back =head2 Removed Documentation =head3 Old OO Documentation All the old OO tutorials, perltoot, perltooc, and perlboot, have been removed. The perlbot (bag of object tricks) document has been removed as well. =head3 Development Deltas The old perldelta files for development cycles prior to 5.15 have been removed. =head1 Utility Changes =head3 L =over 4 =item * L used to generate code of the form unless(defined(&FOO)) { sub FOO () {42;} } But the subroutine is a compile-time declaration, and is hence unaffected by the condition. It has now been corrected to emit a string C around the subroutine [perl #99368]. =back =head1 Configuration and Compilation =over 4 =item * The file F is no longer needed, and has been removed. It contained a list of all exported functions, one of the files generated by F from data in F and F. The code has been refactored so that the only user of F, F, now reads F and F directly, removing the need to store the list of exported functions in an intermediate file. As F was never installed, this change will not be visible outside the build process. =back =head1 Testing =over 4 =item * F has been added, to run a sanity check on F. F is not needed on most *nix platforms, but is for Win32, hence previously was it was possible to inadvertently commit changes that worked perfectly locally, but broke the build on Win32. =item * F has been added to test the C function. =item * Several tests were added in L. F added to test C<@EXPORT> and C<@EXPORT_OK>. F added to see if C works. F added to test the diagnostics for unimplemented functions. F added to test the diagnostics for usage messages. F added to test the L wrapper subroutines. =item * F in L tests C and hints. =item * F was added to see if SysV shared memory works. =item * F was added to test C<&foo()> calls for CORE subs. =back =head1 Platform Support =head2 Platform-Specific Notes =over 4 =item VMS Remove unnecessary includes, fix miscellaneous compiler warnings and close some unclosed comments on F. Remove sockadapt layer from the VMS build. =back =head1 Internal Changes =over 4 =item * The C function has been eliminated and merged with C. It used to be called to determine whether a GV should be autovivified in rvalue context. Now it has been replaced with a new C flag (not part of the API). =item * Padlists are now marked C; i.e., reference-counted. They have always been reference-counted, but were not marked real, because F did its own clean-up, instead of using the usual clean-up code in F. That caused problems in thread cloning, so now the C flag is on, but is turned off in F right before the padlist is freed (after F has done its custom freeing of the pads). =item * All the C files that make up the Perl core have been converted to UTF-8. =back =head1 Selected Bug Fixes =over 4 =item * In Perl 5.15.0 C stopped returning true if the C<$$> variable had not been used yet. This has been fixed. =item * C, C, etc., used to return true for most, but not all built-in variables, if they had not been used yet. Many times that new built-in variables were added in past versions, this construct was not taken into account, so this affected C<${^GLOBAL_PHASE}> and C<${^UTF8CACHE}>, among others. It also used to return false if the package name was given as well (C<${"::!"}>) and for subroutines in the CORE package [perl #97978] [perl #97492] [perl #97484]. =item * Perl 5.10.0 introduced a similar bug: C where "foo" represents the name of a built-in global variable used to return false if the variable had never been used before, but only on the I call. This, too, has been fixed. =item * Various functions that take a filehandle argument in rvalue context (C, C, etc.) used to call C multiple times, if it was a tied variable, and warn twice, if it was C [perl #97482]. =item * C and similar filehandle functions, when called on built-in global variables (like C<$+>), used to die if the variable happened to hold the undefined value, instead of producing the usual "Use of uninitialized value" warning. =item * When autovivified file handles were introduced in Perl 5.6.0, C was inadvertently made to autovivify when called as C (but not as C$fooE>). It has now been fixed never to autovivify. =item * C used to call C multiple times, but now calls it just once. =item * Some cases of dereferencing a complex expression, such as C<${ (), $tied } = 1>, used to call C multiple times, but now call it once. =item * For a tied variable returning a package name, C<$tied-Emethod> used to call C multiple times (even up to six!), and sometimes would fail to call the method, due to memory corruption. =item * Calling an undefined anonymous subroutine (e.g., what $x holds after C) used to cause a "Not a CODE reference" error, which has been corrected to "Undefined subroutine called" [perl #71154]. =item * Causing C<@DB::args> to be freed between uses of C no longer results in a crash [perl #93320]. =item * Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined values. It would die in strict mode or lvalue context for most undefined values, but would be treated as the empty string (with a warning) for the specific scalar return by C (C<&PL_sv_undef> internally). This has been corrected. C is now treated like other undefined scalars, as in Perl 5.005. =item * It used to be possible to free the typeglob of a localised array or hash (e.g., C), resulting in a crash on scope exit. =item * C used to be equivalent to C<($foo, setpgrp)>, because C was ignoring its argument if there was just one. Now it is equivalent to C. =item * Assignments like C<*$tied = \&{"..."}> and C<*glob = $tied> now call FETCH only once. =item * C, C, C, C, C, C, C and the filetest ops (C<-r>, C<-x>, etc.) now always call FETCH if passed a tied variable as the last argument. They used to ignore tiedness if the last thing return from or assigned to the variable was a typeglob or reference to a typeglob. =item * Perl 5.15.1 inadvertently stopped C<*foo =~ s/\*//r> from working, as it would try to force the *foo glob into a string. This has been fixed [perl #97954]. =item * If things were arranged in memory the right way, it was possible for thread joining to emit "Attempt to free unreferenced scalar" warnings if C had been used from the C package prior to thread creation, due to the way pads were reference-counted and cloned [perl #98092]. =item * CORE:: subs were introduced in the previous development release, but C did not return true. That has been rectified [perl #97484]. =item * Lvalue subroutines were made to autovivify in 5.15.0, but it did not work in some cases involving an intervening list operator between the dereference operator and the subroutine call (C<${(), lvsub()}>) [perl #98184]. =item * A bug has been fixed that occurs when a tied variable is used as a subroutine reference: if the last thing assigned to or returned from the variable was a reference or typeglob, the C<\&$tied> could either crash or return the wrong subroutine. The reference case is a regression introduced in Perl 5.10.0. For typeglobs, it has probably never worked till now. =item * C was not scoping its implicit $_ properly, resulting in memory leaks or "Variable is not available" warnings [perl #94682]. =item * C<-l> followed by a bareword no longer "eats" the previous argument to the list operator in whose argument list it resides. In less convoluted English: C now actually prints "bar", because C<-l> on longer eats it. =item * In 5.14.0, filetest ops (C<-r>, C<-x>, etc.) started calling FETCH on a tied argument belonging to the previous argument to a list operator, if called with a bareword argument or no argument at all. This has been fixed, so C no longer calls FETCH on C<$tied>. =item * C was not setting the scalar flags correctly when reading from shared memory, causing the existing cached numeric representation in the scalar to persist [perl #98480]. =item * Weakening the first argument to an automatically-invoked C method could result in erroneous "DESTROY created new reference" errors or crashes. Now it is an error to weaken a read-only reference. =item * Under miniperl (used to configure modules when perl itself is built), C now clears %ENV before calling csh, since the latter croaks on some systems if it does not like the contents of the LS_COLORS enviroment variable [perl #98662]. =item * C<++> and C<--> now work on copies of globs, instead of dying. =item * The subroutines in the CORE:: namespace that were introduced in the previous development release run with the lexical hints (strict, warnings) of the caller, just as though the built-in function had been called. But this was not the case for C. The CORE sub would end up running with the lexical hints of the subroutine it replaced, instead of that subroutine's caller. This has been fixed. =item * Stacked C<-l> (followed immediately by other filetest operators) did not work previously; now it does. It is only permitted when the rightmost filetest op has the special "_" handle for its argument and the most recent C/C call was an C. =item * In Perl 5.6, C<-l> followed by anything other than a bareword would treat its argument as a file name. That was changed in 5.8 for glob references (C<\*foo>), but not for globs themselves (C<*foo>). C<-l> started returning C for glob references without setting the last stat buffer that the "_" handle uses, but only if warnings were turned on. With warnings off, it was the same as 5.6. In other words, it was simply buggy and inconsistent. Now the 5.6 behaviour has been restored. =back =head1 Known Problems =over 4 =item * We have a failing test in F on i386-netbsd 3.1 =item * On Solaris, we have two kinds of failure. If F is Sun's F, we get an error about a badly formed macro assignment in the F. That happens when F<./Configure> tries to make depends. F then exits 0, but further F-ing fails. If F is F, F completes, then we get errors related to F =back =head1 Acknowledgements Perl 5.15.3 represents approximately 2 months of development since Perl 5.15.2 and contains approximately 160,000 lines of changes across 700 files from 44 authors. Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.15.3: Abigail, Alexandr Ciornii, Aristotle Pagaltzis, Chas. Owens, Chip Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry, Damian Conway, Dave Rolsky, David Mitchell, Dominic Hargreaves, Douglas Christopher Wilson, Eric Brine, Father Chrysostomos, Florian Ragwitz, Frederic Briere, George Greer, Gerard Goossen, H.Merijn Brand, Jerry D. Hedden, Jesse Vincent, Jim Cromie, Karl Williamson, Keith Thompson, Leo Lapworth, Leon Timmermans, Lukas Mai, Mark Jason Dominus, Matthew Horsfall, Moritz Lenz, Nicholas Clark, Peter John Acklam, Rafael Garcia-Suarez, Ricardo Signes, Robin Barker, Shlomi Fish, Steffen Müller, Stephen Bennett, Stevan Little, Steve Hay, Tony Cook, Vincent Pit, Walt Mankowski, Zefram. The list above is almost certainly incomplete as it is automatically generated from version control history. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker. Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish. For a more complete list of all of Perl's historical contributors, please see the F file in the Perl source distribution. =head1 Reporting Bugs If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , the Perl Home Page. If you believe you have an unreported bug, please run the L program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of C, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who will be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN. =head1 SEE ALSO The F file for an explanation of how to view exhaustive details on what changed. The F file for how to build Perl. The F file for general stuff. The F and F files for copyright information. =cut