++ed by:
ABRAXXA ADAMJS ALEXBIO ANDREFS ARJONES

117 PAUSE user(s)
93 non-PAUSE user(s).

Dave Rolsky

NAME

perl5153delta - what is new for perl v5.15.3

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

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.

Core Enhancements

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 &foo() syntax, bypassing the prototype. See CORE for a list of the exceptions.

New debugger commands

The debugger now has disable and enable commands for disabling existing breakpoints and reënabling them. See perldebug.

Security

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.

Incompatible Changes

$[ has been removed

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 $[.

User-defined case changing operations.

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

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 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.

Borland compiler

All support for the Borland compiler has been dropped. The code had not worked for a long time anyway.

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.

Modules and Pragmata

Updated Modules and Pragmata

  • AnyDBM_File has been upgraded from version 1.00 to version 1.01.

    This is only a minor documentation update.

  • Archive::Extract has been upgraded from version 0.52 to version 0.56.

    Resolved an issue where unzip executable was present in PATH on MSWin32

  • Archive::Tar has been upgraded from version 1.76 to version 1.78.

  • attributes has been upgraded from version 0.15 to version 0.16.

  • Attribute::Handlers has been upgraded from version 0.92 to version 0.93.

  • B::Deparse has been upgraded from version 1.07 to 1.08.

    It now correctly deparses $#{/} and qq(${#}a).

  • Carp has been upgraded from version 1.21 to 1.23.

    Carp is now a dual life module and several fixes have been make to make it more portable to older versions of perl.

  • CPAN::Meta has been upgraded from version 2.112150 to version 2.112621.

  • CPAN::Meta::YAML has been upgraded from version 0.003 to version 0.004.

  • CPANPLUS has been upgraded from version 0.9109 to version 0.9111.

  • CPANPLUS::Dist::Build has been upgraded from version 0.56 to version 0.58.

  • Devel::PPPort has been upgraded from version 3.19 to version 3.20.

  • diagnostics has been upgraded from version 1.24 to version 1.25.

    It now strips out SZ<><...> formatting codes before displaying descriptions [perl #94488].

  • Data::Dumper has been upgraded from version 2.133 to version 2.134.

    The XS code for sorting hash keys has been simplified slightly.

  • Exporter has been upgraded from version 5.64_03 to version 5.65.

  • ExtUtils::ParseXS has been upgraded from version 3.03_01 to version 3.04_04.

    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).

  • Locale::Codes 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.

  • File::Glob has been upgraded from version 1.12 to version 1.13.

    On Windows, tilde (~) expansion now checks the USERPROFILE environment variable, after checking HOME.

    See also "Security".

  • Filter::Simple 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].

  • IO has been upgraded from version 1.25_05 to 1.25_06, and IO::Handle from version 1.32 to 1.33.

    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].

  • Math::BigFloat has been upgraded from version 1.995 to version 1.997.

  • Math::BigInt has been upgraded from version 1.996 to version 1.997.

  • Math::BigInt::FastCalc has been upgraded from version 0.29 to 0.30.

  • Math::BigRat has been upgraded from version 0.2602 to version 0.2603.

    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].

  • Module::CoreList has been upgraded from version 2.55 to 2.56.

    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.

  • Module::Metadata has been upgraded from version 1.000005_01 to version 1.000007.

  • Module::Load::Conditional has been upgraded from version 0.44 to version 0.46.

  • ODBM_File 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 ?DBM_File modules.

  • open 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 with the ":std" directive, it now clears layers on STDERR before applying the new ones, and not just on STDIN and STDOUT [perl #92728].

  • perlfaq has been upgraded from version 5.01500302 to version 5.0150034.

  • Pod::Perldoc 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.

  • Pod::Simple has been upgraded from version 3.18 to version 3.19.

  • POSIX has been upgraded from version 1.24 to version 1.25.

    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.

  • Search::Dict has been upgraded from version 1.03 to 1.04.

  • Storable has been upgraded from version 2.31 to version 2.32.

    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.

  • Text::Abbrev has been upgraded from version 1.01 to 1.02.

  • threads has been upgraded from version 1.83 to 1.85.

  • threads::shared 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].

  • Unicode::UCD has been upgraded from version 0.34 to version 0.35.

  • UNIVERSAL has been upgraded from version 1.08 to version 1.09.

  • XSLoader has been upgraded from version 0.15 to version 0.16.

Documentation

New Documentation

perlootut

This a new OO tutorial. It focuses on basic OO concepts, and then recommends that readers choose an OO framework from CPAN.

Changes to Existing Documentation

perlobj

  • This document has been rewritten from scratch, and its coverage of various OO concepts has been expanded.

perlpragma

  • There is now a standard convention for naming keys in the %^H, documented under Key naming.

Removed Documentation

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.

Development Deltas

The old perldelta files for development cycles prior to 5.15 have been removed.

Utility Changes

h2ph

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

Configuration and Compilation

  • The file global.sym is no longer needed, and has been removed. It contained a list of all exported functions, one of the files generated by regen/embed.pl from data in embed.fnc and regen/opcodes. The code has been refactored so that the only user of global.sym, makedef.pl, now reads embed.fnc and regen/opcodes directly, removing the need to store the list of exported functions in an intermediate file.

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

Testing

  • t/porting/globvar.t has been added, to run a sanity check on globar.sym. globar.sym 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.

  • t/op/unlink.t has been added to test the unlink function.

  • Several tests were added in POSIX.

    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.

  • ext/XS-APItest/t/gotosub.t in XS::APItest tests goto &xsub and hints.

  • t/io/shm.t was added to see if SysV shared memory works.

  • t/op/coreamp.t was added to test &foo() calls for CORE subs.

Platform Support

Platform-Specific Notes

VMS

Remove unnecessary includes, fix miscellaneous compiler warnings and close some unclosed comments on vms/vms.c.

Remove sockadapt layer from the VMS build.

Internal Changes

  • The 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).

  • Padlists are now marked 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).

  • All the C files that make up the Perl core have been converted to UTF-8.

Selected Bug Fixes

  • In Perl 5.15.0 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].

  • Perl 5.10.0 introduced a similar bug: 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.

  • Various functions that take a filehandle argument in rvalue context (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.

  • When autovivified file handles were introduced in Perl 5.6.0, 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.

  • Some cases of dereferencing a complex expression, such as ${ (), $tied } = 1, used to call FETCH multiple times, but now call it once.

  • For a tied variable returning a package name, $tied->method used to call FETCH multiple times (even up to six!), and sometimes would fail to call the method, due to memory corruption.

  • Calling an undefined anonymous subroutine (e.g., what $x holds after undef &{$x = sub{}}) used to cause a "Not a CODE reference" error, which has been corrected to "Undefined subroutine called" [perl #71154].

  • Causing @DB::args to be freed between uses of caller no longer results in a crash [perl #93320].

  • Since 5.6.0, *{ ... } 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.

  • It used to be possible to free the typeglob of a localised array or hash (e.g., 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).

  • Assignments like *$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.

  • Perl 5.15.1 inadvertently stopped *foo =~ s/\*//r from working, as it would try to force the *foo glob into a string. This has been fixed [perl #97954].

  • If things were arranged in memory the right way, it was possible for thread joining to emit "Attempt to free unreferenced scalar" warnings if caller had been used from the DB package prior to thread creation, due to the way pads were reference-counted and cloned [perl #98092].

  • CORE:: subs were introduced in the previous development release, but defined &{"CORE::..."} did not return true. That has been rectified [perl #97484].

  • 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 (${(), lvsub()}) [perl #98184].

  • 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 \&$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.

  • In 5.14.0, filetest ops (-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].

  • Weakening the first argument to an automatically-invoked DESTROY method could result in erroneous "DESTROY created new reference" errors or crashes. Now it is an error to weaken a read-only reference.

  • Under miniperl (used to configure modules when perl itself is built), 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.

  • 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 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.

  • Stacked -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.

  • In Perl 5.6, -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.

Known Problems

  • We have a failing test in op/sigdispatch.t on i386-netbsd 3.1

  • On Solaris, we have two kinds of failure.

    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

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

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 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.

SEE ALSO

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.




Hosting generously
sponsored by Bytemark