The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

perl5152delta - what is new for perl v5.15.2

DESCRIPTION

This document describes differences between the 5.15.1 release and the 5.15.2 release.

If you are upgrading from an earlier release such as 5.15.0, first read perl5151delta, which describes differences between 5.15.0 and 5.15.1.

Core Enhancements

Subroutines in the CORE namespace

Many Perl keywords are now available as subroutines in the CORE namespace. Most of these cannot be called through references or via &foo syntax yet, but must be called as barewords. In other words, you can now do this:

    BEGIN { *entangle = \&CORE::tie }
    entangle $variable, $package, @args;

This currently works for overridable keywords other than dump and the infix operators. Calling through references only works for functions that take no arguments (like wantarray).

Work is under way to allow more of these subroutines to be called through references.

__FILE__() Syntax

The __FILE__, __LINE__ and __PACKAGE__ tokens can now be written with an empty pair of parentheses after them. This makes them parse the same way as time, fork and other built-in functions.

Incompatible Changes

UNIVERSAL::VERSION now returns $VERSION

UNIVERSAL::VERSION now return whatever is in $VERSION, instead of returning $VERSION converted to a version object and then to a string. As a result, it no longer parses the version when called without arguments, so it no longer dies in that case for malformed versions. This allows custom version number parsers to use ->VERSION to retrieve the version number, as was the case in Perl 5.8 [perl #95544].

Modules and Pragmata

Updated Modules and Pragmata

  • B has been upgraded from version 1.30 to version 1.31

    The XS code has changed slightly, as it was too tightly coupled to the contents of the header embedvar.h. Documentation in B::Terse and B::Xref has been improved, hence their versions have been increased.

  • CPAN has been upgraded from version 1.9600 to version 1.9800

  • CPANPLUS has been upgraded from version 0.9108 to version 0.9109

    Fixed support for v-strings and x.y.z versions with v5.8.4

  • CPAN::Meta has been upgraded from version 2.110930_001 to version 2.112150

    Stringify any objects encountered during conversion.

    Clarified that file paths in the 'provides' section must be in Unix-style (i.e. forward slashes)

  • DB_File has been upgraded from version 1.822 to version 1.824

    Will now croak if attempt to freeze/thaw DB_File object [RT #69985]

  • diagnostics has been upgraded from version 1.23 to 1.24.

    It now supports the %u formatting code. Previously it was unable to find descriptions for messages whose entries in perldiag included that code [perl #94988].

  • Encode has been upgraded from version 2.43 to version 2.44

    Addressed 'decode_xs n-byte heap-overflow' security bug in Unicode.xs

  • ExtUtils::Install has been upgraded from version 1.56 to version 1.57.

    There is no change to ExtUtils::Install other than the version number increase, but ExtUtils::Installed has been upgraded from version 1.999_001 to version 1.999002 and a new skip_cwd attribute has been added.

  • ExtUtils::MakeMaker has been upgraded from version 6.58 to version 6.59

  • ExtUtils::Manifest has been upgraded from version 1.58 to version 1.60

  • ExtUtils::ParseXS has been upgraded from 3.00_01 to 3.00_04.

  • IPC::Open3 has been upgraded from version 1.11 to 1.12.

    open3 with "-" for the program name works once more. This was broken in version 1.06 (and hence in Perl 5.14.0) [perl #95748].

  • Module::Build has been upgraded from version 0.3800 to version 0.39_01.

    Pod to HTML internals changed to support revisions to Pod::Html in core. Also fixes some minor bugs. [rt.cpan.org #68585] [rt.cpan.org #67893] [rt.cpan.org #67008]

  • Module::CoreList has been upgraded from version 2.54 to version 2.55

  • Module::Load has been upgraded from version 0.18 to version 0.20

  • Module::Metadata has been upgraded from version 1.000004 to version 1.000005

    Added new_from_handle() method.

  • Params::Check has been upgraded from version 0.28 to version 0.32

  • PerlIO::via has been upgraded from version 0.11 to version 0.12.

    The only change is a correction in the documentation.

  • Term::ANSIColor has been upgraded from version 3.00 to version 3.01

    Only interpret an initial array reference as a list of colors, not any initial reference, allowing the colored function to work properly on objects with stringification defined.

  • Unicode::Collate has been upgraded from version 0.77 to version 0.78

  • Unicode::Normalize has been upgraded from version 1.12 to version 1.13

Documentation

New Documentation

perlexperiment

This document is intended to provide a list of experimental features in Perl. It is still a work in progress.

Changes to Existing Documentation

perlsub

  • The ($;) prototype syntax, which has existed for rather a long time, is now documented in perlsub. It allows a unary function to have the same precedence as a list operator.

Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

New Diagnostics

New Errors

  • &CORE::%s cannot be called directly

    (F) You tried to call a subroutine in the CORE:: namespace with &foo syntax or through a reference. The subroutines in this package cannot yet be called that way, but must be called as barewords. Something like this will work:

        BEGIN { *shove = \&CORE::push; }
        shove @array, 1,2,3; # pushes on to @array

Utility Changes

perlivp

  • Fixed a bug whereby other perls under the current directory could cause false positive failures.

  • Tests for .ph files have been removed, as these test have been optional since 2005 and .ph files are no longer generated during installation.

splain

See the entry for diagnostics in "Updated Modules and Pragmata", above.

Configuration and Compilation

  • makedef.pl has been refactored. This should have no noticeable affect on any of the platforms that use it as part of their build (AIX, VMS, Win32).

  • useperlio can no longer be disabled.

Platform Support

HP-UX PA-RISC/64 now supports gcc-4.x

A fix to correct the socketsize now makes the test suite pass on HP-UX PA-RISC for 64bitall builds.

Internal Changes

  • embedvar.h has been simplified, and one level of macro indirection for PL_* variables has been removed for the default (non-multiplicity) configuration. PERLVAR*() macros now directly expand their arguments to tokens such as PL_defgv, instead of expanding to PL_Idefgv, with embedvar.h defining a macro to map PL_Idefgv to PL_defgv. XS code which has unwarranted chumminess with the implementation may need updating.

  • A coreargs opcode has been added, to be used by &CORE::foo subs to sort out @_.

  • An API has been added to explicitly choose whether or not to export XSUB symbols. More detail can be found in the comments for commit e64345f8.

Selected Bug Fixes

  • Locking a subroutine (via lock &sub) is no longer a compile-time error for regular subs. For lvalue subroutines, it no longer tries to return the sub as a scalar, resulting in strange side effects like ref \$_ returning "CODE" in some instances.

    lock &sub is now a run-time error if threads::shared is loaded (a no-op otherwise), but that may be rectified in a future version.

  • The prototypes of several built-in functions--getprotobynumber, lock, not and select--have been corrected, or at least are now closer to reality than before.

  • Most dereferencing operators (${}, etc.) used to call FETCH twice on a tied operand when doing a symbolic dereference (looking up a variable by name, which is not permitted under use strict 'refs'). Only &{} did not have this problem. This has been fixed.

  • A minor regression introduced in 5.15.0 has been fixed. Dereferencing a magical mortal (e.g., the return value of delete on a tied hash element) explicitly returned from a subroutine called recursively was not calling FETCH. This would affect code like @{ foo() } where the foo sub contains return delete $hash{elem} and is calling itself.

  • A panic involving the combination of the regular expression modifiers /aa and the \b escape sequence introduced in 5.14.0 has been fixed [perl #95964].

  • stat() would always return the inode number as an IV, even when the original was unsigned, or too large to fit in an IV. stat() now returns the inode number as the type that would best preserve the original value. [perl #84590]

  • The combination of the regular expression modifiers /aa and the \b and \B escape sequences did not work properly on UTF-8 encoded strings. All non-ASCII characters under /aa should be treated as non-word characters, but what was happening was that Unicode rules were used to determine wordness/non-wordness for non-ASCII characters. This is now fixed [perl #95968].

  • Infinite loops like 1 while 1 used to stop strict 'subs' mode from working for the rest of the block.t

  • The \h, \H, \v and \V regular expression metacharacters used to cause a panic error message when attempting to match at the end of the string [perl #96354].

  • For list assignments like ($a,$b) = ($b,$a), Perl has to make a copy of the items on the right-hand side before assignment them to the left. For efficiency's sake, it assigns the values on the right straight to the items on the left no variable is mentioned on both sides, as in ($a,$b) = ($c,$d). The logic for determining when it can cheat was faulty, in that && and || on the right-hand side could fool it. So ($a,$b) = $some_true_value && ($b,$a) would end up assigning the value of $b to both scalars.

  • Perl no longer tries to apply lvalue context to the string in ("string", $variable) ||= 1 (which used to be an error). Since the left-hand side of ||= is evaluated in scalar context, that's a scalar comma operator, which gives all but the last item void context. There is no such thing as void lvalue context, so it was a mistake for Perl to try to force it [perl #96942].

  • Every subroutine has a filename associated with it, that the debugger uses. The one associated with constant subroutines used to be misallocated when cloned under threads. Consequently, debugging threaded applications could result in memory corruption [perl #96126].

  • caller no longer leaks memory when called from the DB package if @DB::args was assigned to after the first call to caller. Carp was triggering this bug [perl #97010].

Acknowledgements

Perl 5.15.2 represents approximately 2 months of development since Perl 5.15.1 and contains approximately 17,000 lines of changes across 330 files from 35 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.2:

Abigail, Andreas König, brian d foy, Brian Greenfield, Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, David Golden, David Mitchell, Eric Brine, Father Chrysostomos, Florian Ragwitz, Gerard Goossen, H.Merijn Brand, Jesse Vincent, John Peacock, Karl Williamson, Karthik Rajagopalan, Keith Thompson, Kevin Ryde, Matthew Horsfall, Mike Sheldrake, Nicholas Clark, Niko Tyni, Reini Urban, Ricardo Signes, Salvador Fandiño, Shlomi Fish, Spiros Denaxas, Steffen Müller, Stephen Oberholtzer, Steve Hay, Tony Cook, Vincent Pit, 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.