Chris Williams > perl-5.15.7 > perl5156delta

Download:
perl-5.15.7.tar.gz

Annotate this POD

Website

Source   Latest Release: perl-5.15.9

NAME ^

perl5156delta - what is new for perl v5.15.6

DESCRIPTION ^

This document describes differences between the 5.15.5 release and the 5.15.6 release.

If you are upgrading from an earlier release such as 5.15.4, first read perl5155delta, which describes differences between 5.15.4 and 5.15.5.

Core Enhancements ^

__SUB__

The new __SUB__ token, available under the "current_sub" feature (see feature) or use v5.15, returns a reference to the current subroutine, making it easier to write recursive closures.

New option for the debugger's t command

The t command in the debugger, which toggles tracing mode, now accepts a numeric argument that determines how many levels of subroutine calls to trace.

Return value of tied

The value returned by tied on a tied variable is now the actual scalar that holds the object to which the variable is tied. This allows ties to be weakened with Scalar::Util::weaken(tied $tied_variable).

Security ^

is_utf8_char()

The XS-callable function is_utf8_char(), when presented with malformed UTF-8 input, can read up to 12 bytes beyond the end of the string. This cannot be fixed without changing its API. It is not called from CPAN. The documentation now describes how to use it safely.

Other is_utf8_foo() functions, as well as utf8_to_foo(), etc.

Most of the other XS-callable functions that take UTF-8 encoded input implicitly assume that the UTF-8 is valid (not malformed) in regards to buffer length. Do not do things such as change a character's case or see if it is alphanumeric without first being sure that it is valid UTF-8. This can be safely done for a whole string by using one of the functions is_utf8_string(), is_utf8_string_loc(), and is_utf8_string_loclen().

use VERSION

As of this release, version declarations like use v5.16 now disable all features before enabling the new feature bundle. This means that the following holds true:

    use 5.016;
    # 5.16 features enabled here
    use 5.014;
    # 5.16 features disabled here

use v5.12 and higher continue to enable strict, but explicit use strict and no strict now override the version declaration, even when they come first:

    no strict;
    use 5.012;
    # no strict here

There is a new ":default" feature bundle that represents the set of features enabled before any version declaration or use feature has been seen. Version declarations below 5.10 now enable the ":default" feature set. This does not actually change the behaviour of use v5.8, because features added to the ":default" set are those that were traditionally enabled by default, before they could be turned off.

$[ is now disabled under use v5.16. It is part of the default feature set and can be turned on or off explicitly with use feature 'array_base'.

UNIVERSAL::VERSION

The change to UNIVERSAL::VERSION in 5.15.2 has been reverted. It now returns a stringified version object once more.

substr lvalue revamp

When substr is called in lvalue or potential lvalue context with two or three arguments, a special lvalue scalar is returned that modifies the original string (the first argument) when assigned to.

Previously, the offsets (the second and third arguments) passed to substr would be converted immediately to match the string, negative offsets being translated to positive and offsets beyond the end of the string being truncated.

Now, the offsets are recorded without modification in the special lvalue scalar that is returned, and the original string is not even looked at by substr itself, but only when the returned lvalue is read or modified.

These changes result in several incompatible changes and bug fixes:

It was impossible to fix all the bugs without an incompatible change, and the behaviour of negative offsets was never specified, so the change was deemed acceptable.

Return value of eval

eval returns undef in scalar context or an empty list in list context when there is a run-time error. When eval was passed a string in list context and a syntax error occurred, it used to return a list containing a single undefined element. Now it returns an empty list in list context for all errors [perl #80630].

Anonymous handles

Automatically generated file handles are now named __ANONIO__ when the variable name cannot be determined, rather than $__ANONIO__.

Last-accessed filehandle

Perl has an internal variable that stores the last filehandle to be accessed. It is used by $. and by tell and eof without arguments.

It used to be possible to set this internal variable to a glob copy and then modify that glob copy to be something other than a glob, and still have the last-accessed filehandle associated with the variable after assigning a glob to it again:

    my $foo = *STDOUT;  # $foo is a glob copy
    <$foo>;             # $foo is now the last-accessed handle
    $foo = 3;           # no longer a glob
    $foo = *STDERR;     # still the last-accessed handle

Now the $foo = 3 assignment unsets that internal variable, so there is no last-accessed filehandle, just as if <$foo> had never happened.

XS API tweak

The newCONSTSUB_flags C-level function, added in 5.15.4, now has a len parameter.

Performance Enhancements ^

Modules and Pragmata ^

Updated Modules and Pragmata

Removed Modules and Pragmata

Documentation ^

Changes to Existing Documentation

"Laundering and Detecting Tainted Data" in perlsec

Diagnostics ^

Changes to Existing Diagnostics

Utility Changes ^

zipdetails

Configuration and Compilation ^

Testing ^

Platform Support ^

Platform-Specific Notes

VMS

Selected Bug Fixes ^

Acknowledgments ^

Perl 5.15.6 represents approximately 2 months of development since Perl 5.15.5 and contains approximately 48,000 lines of changes across 560 files from 36 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.6:

Aaron Crane, Abhijit Menon-Sen, Alexandr Ciornii, Brian Fraser, Carl Hayter, Chris 'BinGOs' Williams, Craig A. Berry, Dave Rolsky, David Golden, David Mitchell, Dominic Hargreaves, Father Chrysostomos, James E Keenan, Johannes Plunien, John Peacock, Karl Williamson, Marc Green, Mark Dootson, Matthew Horsfall, Nicholas Clark, Paul Evans, Peter Martini, Peter Scott, Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Rodolfo Carvalho, Shlomi Fish, Steffen Müller, Steve Hay, Steve Peters, Thomas Sibley, Timothe Litt, Tony Cook, Vadim Konovalov, Ævar Arnfjörð Bjarmason.

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.

syntax highlighting: