
perl5153delta - what is new for perl v5.15.3

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 perl5152delta, which describes differences between 5.15.1 and 5.15.2.

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.

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 &foo() syntax,
bypassing the prototype.
See CORE for a list of the exceptions.
The debugger now has disable and enable commands for disabling existing breakpoints and reënabling them.
See perldebug.

File::Glob::bsd_glob() memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).Calling File::Glob::bsd_glob 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.

The array/string index offsetting mechanism,
controlled by the $[ magic variable,
has been removed.
$[ 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 Array::Base,
which provides an independent implementation of the index offsetting concept,
or Classic::Perl,
which allows Array::Base to be controlled through assignment to $[.
This feature was deprecated in Perl 5.14, and has now been removed. The CPAN module Unicode::Casing provides better functionality without the drawbacks that this feature had, as are detailed in the 5.14 documentation: http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29
XSUB C functions are now 'static',
that is,
they are not visible from outside the compilation unit.
Users can use the new XS_EXTERNAL(name) and XS_INTERNAL(name) macros to pick the desired linking behaviour.
The ordinary XS(name) declaration for XSUBs will continue to declare non-'static' XSUBs for compatibility,
but the XS compiler,
ExtUtils::ParseXS (xsubpp) will emit 'static' XSUBs by default.
ExtUtils::ParseXS's behaviour can be reconfigured from XS using the EXPORT_XSUB_SYMBOLS keyword,
see perlxs for details.
All support for the Borland compiler has been dropped. The code had not worked for a long time anyway.
Weakening read-only references is no longer permitted. It should never hove worked anyway, and in some cases could result in crashes.

This is only a minor documentation update.
Resolved an issue where unzip executable was present in PATH on MSWin32
It now correctly deparses $#{/} and qq(${#}a).
Carp is now a dual life module and several fixes have been make to make it more portable to older versions of perl.
It now strips out SZ<><...> formatting codes before displaying descriptions [perl #94488].
The XS code for sorting hash keys has been simplified slightly.
The handling of dVAR 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 XSUBs are now static above) has been implemented with the PERL_EUPXS_ALWAYS_EXPORT and PERL_EUPXS_NEVER_EXPORT preprocessor defines.
The compiler warnings when -except option is used with xsubpp have been fixed.
The XSUB.h changes to make XS(name) use XS_INTERNAL(name) 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 XS(name).
Instead,
ExtUtils::ParseXS will define a copy of the XS_INTERNAL/XS_EXTERNAL macros as necessary going back to perl 5.10.0.
By default,
ExtUtils::ParseXS will use XS_INTERNAL(name) instead of XS(name).
Fixed regression for input-typemap override in XS argument list (CPAN RT #70448).
ExtUtils::Typemaps 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 CODE section using RETVAL,
but no OUTPUT section (CPAN RT #69536).
The CIA world added non-standard values, so this is no longer used as a source of data.
On Windows,
tilde (~) expansion now checks the USERPROFILE environment variable,
after checking HOME.
See also "Security".
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].
Together,
these upgrades fix a problem with IO::Handle's getline and getlines methods.
When these methods are called on the special ARGV handle,
the next file is automatically opened,
as happens with the built-in <> and readline functions.
But,
unlike the built-ins,
these methods were not respecting the caller's use of the open pragma and applying the approprate I/O layers to the newly-opened file [rt.cpan.org #66474].
int() on a Math::BigRat object containing -1/2 now creates a Math::BigInt containing 0,
rather than -0.
Math::BigInt does not even support negative zero,
so the resulting object was actually malformed [perl #95530].
Updated module for 5.15.3, additionally it was missing a few entries: DB_File in 5.8.2, Errno in 5.6.0 and 5.6.1, and VMS::Filespec in 5.12.3.
This is only a minor refactoring of the XS code to bring it closer to the other ?DBM_File modules.
It no longer turns of layers on standard handles when invoked without the ":std" directive. Similarly, when invoked with the ":std" directive, it now clears layers on STDERR before applying the new ones, and not just on STDIN and STDOUT [perl #92728].
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.
POSIX no longer uses AutoLoader. 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.
POSIX::Termios::setattr now defaults the third argument to TCSANOW,
instead of 0.
On most platforms TCSANOW is defined as 0,
but on some 0 is not a valid parameter,
which caused a call with defaults to fail.
XS code which duplicates functionality of ppport.h has been removed. Tests should now pass on older versions of Test::More. Storable now builds and passes tests back to perl 5.004.
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].

This a new OO tutorial. It focuses on basic OO concepts, and then recommends that readers choose an OO framework from CPAN.
%^H,
documented under Key naming.All the old OO tutorials, perltoot, perltooc, and perlboot, have been removed. The perlbot (bag of object tricks) document has been removed as well.
The old perldelta files for development cycles prior to 5.15 have been removed.

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 eval around the subroutine [perl #99368].

As global.sym was never installed, this change will not be visible outside the build process.

unlink function.ext/POSIX/t/export.t added to test @EXPORT and @EXPORT_OK. ext/POSIX/t/sigset.t added to see if POSIX::SigSet works. ext/POSIX/t/unimplemented.t added to test the diagnostics for unimplemented functions. ext/POSIX/t/usage.t added to test the diagnostics for usage messages. ext/POSIX/t/wrappers.t added to test the POSIX wrapper subroutines.
goto &xsub and hints.&foo() calls for CORE subs.
Remove unnecessary includes, fix miscellaneous compiler warnings and close some unclosed comments on vms/vms.c.
Remove sockadapt layer from the VMS build.

is_gv_magical_sv function has been eliminated and merged with gv_fetchpvn_flags. It used to be called to determine whether a GV should be autovivified in rvalue context. Now it has been replaced with a new GV_ADDMG flag (not part of the API).AvREAL; i.e., reference-counted. They have always been reference-counted, but were not marked real, because pad.c did its own clean-up, instead of using the usual clean-up code in sv.c. That caused problems in thread cloning, so now the AvREAL flag is on, but is turned off in pad.c right before the padlist is freed (after pad.c has done its custom freeing of the pads).
defined(${'$'}) stopped returning true if the $$ variable had not been used yet. This has been fixed.defined(${"..."}), defined(*{"..."}), 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 ${^GLOBAL_PHASE} and ${^UTF8CACHE}, among others. It also used to return false if the package name was given as well (${"::!"}) and for subroutines in the CORE package [perl #97978] [perl #97492] [perl #97484].defined(*{"foo"}) 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 first call. This, too, has been fixed.close, readline, etc.) used to call FETCH multiple times, if it was a tied variable, and warn twice, if it was undef [perl #97482].close and similar filehandle functions, when called on built-in global variables (like $+), used to die if the variable happened to hold the undefined value, instead of producing the usual "Use of uninitialized value" warning.readline was inadvertently made to autovivify when called as readline($foo) (but not as <$foo>). It has now been fixed never to autovivify.defined ${ $tied_variable } used to call FETCH multiple times, but now calls it just once.${ (), $tied } = 1, used to call FETCH multiple times, but now call it once.$tied->method used to call FETCH multiple times (even up to six!), and sometimes would fail to call the method, due to memory corruption.undef &{$x = sub{}}) used to cause a "Not a CODE reference" error, which has been corrected to "Undefined subroutine called" [perl #71154].@DB::args to be freed between uses of caller no longer results in a crash [perl #93320].*{ ... } 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 undef() (&PL_sv_undef internally). This has been corrected. undef() is now treated like other undefined scalars, as in Perl 5.005.local @{"x"}; delete $::{x}), resulting in a crash on scope exit.setpgrp($foo) used to be equivalent to ($foo, setpgrp), because setpgrp was ignoring its argument if there was just one. Now it is equivalent to setpgrp($foo,0).*$tied = \&{"..."} and *glob = $tied now call FETCH only once.chdir, chmod, chown, utime, truncate, stat, lstat and the filetest ops (-r, -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.*foo =~ s/\*//r from working, as it would try to force the *foo glob into a string. This has been fixed [perl #97954].caller had been used from the DB package prior to thread creation, due to the way pads were reference-counted and cloned [perl #98092].defined &{"CORE::..."} did not return true. That has been rectified [perl #97484].${(), lvsub()}) [perl #98184].\&$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.given was not scoping its implicit $_ properly, resulting in memory leaks or "Variable is not available" warnings [perl #94682].-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: print "bar", -l foo now actually prints "bar", because -l on longer eats it.-r, -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 push @foo, $tied, -r no longer calls FETCH on $tied.shmread 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].DESTROY method could result in erroneous "DESTROY created new reference" errors or crashes. Now it is an error to weaken a read-only reference.glob 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].++ and -- now work on copies of globs, instead of dying.goto &CORE::sub. 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.-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 stat/lstat call was an lstat.-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 (\*foo), but not for globs themselves (*foo). -l started returning undef 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.
If make is Sun's make≥, we get an error about a badly formed macro assignment in the Makefile. That happens when ./Configure tries to make depends. Configure then exits 0, but further make-ing fails.
If make is gmake, Configure completes, then we get errors related to /usr/include/stdbool.h

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 AUTHORS file in the Perl source distribution.

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 perlbug 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 perl -V, 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.

The Changes file for an explanation of how to view exhaustive details on what changed.
The INSTALL file for how to build Perl.
The README file for general stuff.
The Artistic and Copying files for copyright information.