NAME

DESCRIPTION

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

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

Core Enhancements

splice() doesn't warn when truncating

You can now limit the size of an array using splice(@a,MAX_LEN) without worrying about warnings.

The \$ prototype accepts any scalar lvalue

The \$ and \[$] subroutine prototypes now accept any scalar lvalue argument. Previously they only accepted scalars beginning with $ and hash and array elements. This change makes them consistent with the way the built-in read and recv functions (among others) parse their arguments. This means that one can override the built-in functions with custom subroutines that parse their arguments the same way.

You can now study more than one string

The restriction that you can only have one study active at a time has been removed. You can now usefully study as many strings as you want (until you exhaust memory).

The Unicode Script_Extensions property is now supported.

DTrace probes for interpreter phase change

The phase-change probes will fire when the interpreter's phase changes, which tracks the ${^GLOBAL_PHASE} variable. arg0 is the new phase name; arg1 is the old one. This is useful mostly for limiting your instrumentation to one or more of: compile time, run time, destruct time.

New Pad API

Performance Enhancements

The short-circuiting operators &&, ||, and //, when chained (such as $a || $b || $c), are now considerably faster to short-circuit, due to reduced optree traversal.

The implementation of s///r makes one fewer copy of the scalar's value.

If a studied scalar is split with a regex, the engine will now take advantage of the study data.

study now uses considerably less memory for shorter strings. Strings shorter than 65535 characters use roughly half the memory than previously, strings shorter than 255 characters use roughly one quarter of the memory.

Recursive calls to lvalue subroutines in lvalue scalar context use less memory.

Modules and Pragmata

New Modules and Pragmata

The logic for parsing, merging, and dumping XS typemaps has been extracted from ExtUtils::ParseXS into a module of its own, ExtUtils::Typemaps. ExtUtils::Typemaps offers an interface to typemap handling outside of the scope of the XS compiler itself.

As a first use case of the improved API and extensibility, typemaps can now be included inline in XS code with a HEREDOC-like syntax:

url() was fixed to return PATH_INFO when it is explicitly requested with either the path=>1 or path_info=>1 flag.

If your code is running under mod_rewrite (or compatible) and you are calling self_url() or you are calling url() and passing path_info=>1, These methods will actually be returning PATH_INFO now, as you have explicitly requested, or has self_url() has requested on your behalf.

The PATH_INFO has been omitted in such URLs since the issue was introduced in the 3.12 release in December, 2005.

This bug is so old your application may have come to depend on it or workaround it. Check for application before upgrading to this release.

IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA (method 14). There is a fix for a CRC issue in IO::Compress::Unzip and it supports Streamed Stored context now. And fixed a Zip64 issue in IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.

Cwd has been upgraded from version 3.36 to 3.37, to address an incompatibility with the EPIC debugger.

Fixed the return value for the all_XXX_codes and all_XXX_names functions. RT 69100

Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to allow for cleaner future additions. The original four modules (Locale::Language, Locale::Currency, Locale::Country, Locale::Script) will continue to work, but all new sets of codes will be added in the Locale::Codes namespace.

Removed Modules and Pragmata

Perl 4-era .pl libraries

Perl used to bundle a handful of library files that predate Perl 5. Most of these files, which have been deprecated since version 5.14.0, have now been removed. If your code still relies on these libraries, you can install them again from Perl4::CoreLibs on CPAN.

Warnings that mention the names of lexical (my) variables with Unicode characters in them now respect the presence or absence of the :utf8 layer on the output handle, instead of outputting UTF8 regardless. Also, the correct names are included in the strings passed to $SIG{__WARN__} handlers, rather than the raw UTF8 bytes.

Testing

t/run/dtrace.t was added to test Perl's DTrace support. This test will only be run if your Perl was built with -Dusedtrace and if calling dtrace actually lets you instrument code. This generally requires being run as root, so this test file is primarily intended for use by the dtrace subcommittee of p5p.

t/win32/runenv.t was added to test aspects of Perl's environment variable handling on MSWin32 platforms. Previously, such tests were skipped on MSWin32 platforms.

Some bitrot has been fixed in the miniperl test suite, so that it now nearly passes. The minitest is normally only run when building the full perl fails, so it was liable to fall into disrepair making it a less useful debugging tool. When it is fully passing it is hoped to start including it in regular smoke tests, so that future bitrot will be quickly detected.

Platform Support

Platform-Specific Notes

Windows

On Windows 7, 2008 and Vista, @INC is now always properly populated based on the value of PERL5LIB set in the environment. Previously, values of PERL5LIB longer than 32766 bytes were skipped when @INC was being populated. Tests for environment handling were also added (see "Testing" section). Fixes RT #87322.

Internal Changes

The experimental fetch_cop_label function has been renamed to cop_fetch_label.

The cop_store_label function has been added to the API, but is experimental.

Selected Bug Fixes

Applying the :lvalue attribute to subroutine that is already defined does not work properly, as the attribute changes the way the sub is compiled. Hence, Perl 5.12 began warning when an attempt is made to apply the attribute to an already defined sub. In such cases, the attribute is discarded.

But the change in 5.12 missed the case where custom attributes are also present: that case still silently and ineffectively applied the attribute. That omission has now been corrected. sub foo :lvalue :Whatever (when foo is already defined) now warns about the :lvalue attribute, and does not apply it.

attributes.pm has likewise been updated to warn and not apply the attribute.

The remaining discrepancies between explicit and implicit return from lvalue subroutines have been resolved. They mainly involved which error message to display when a read-only value is returned in lvalue context. Also, returning a PADTMP (the result of most built-ins, like index) in lvalue context is now forbidden for explicit return, as it always has been for implicit return. This is not a regression from 5.14, as all the cases in which it could happen where previously syntax errors.

Explicitly returning a tied my variable from an lvalue subroutine in list lvalue context used to clear the variable before the assignment could happen. This is something that was missed when explicit return was made to work in 5.15.0.

A minor memory leak, introduced in 5.15.0, has been fixed. It would occur when a hash is freed that has had its current iterator deleted [perl #93454].

The prototype function no longer dies for the __FILE__, __LINE__ and __PACKAGE__ directives. It now returns an empty-string prototype for them, because they are syntactically very similar to nullary functions like time.

prototype now returns undef for all overridable infix operators, such as eq, which are not callable in any way resembling functions. It used to return incorrect prototypes for some and die for others [perl #94984].

A bug affecting lvalue context propagation through nested lvalue subroutine calls has been fixed. Previously, returning a value in nested rvalue context would be treated as lvalue context by the inner subroutine call, resulting in some values (such as read-only values) being rejected.

Some core bugs affecting Hash::Util have been fixed: locking a hash element that is a glob copy no longer causes subsequent assignment to it to corrupt the glob, and unlocking a hash element that holds a copy-on-write scalar no longer causes modifications to that scalar to modify other scalars that were sharing the same string buffer.

when blocks are now capable of returning variables declared inside the enclosing given block [perl #93548].

A problem with context propagation when a do block is an argument to return has been fixed. It used to cause undef to be returned in some cases of a return inside an if block which itself is followed by another return.

Calling index with a tainted constant no longer causes constants in subsequently compiled code to become tainted [perl #64804].

Use of lexical (my) variables in code blocks embedded in regular expressions will no longer result in memory corruption or crashes.

Nevertheless, these code blocks are still experimental, as there are still problems with the wrong variables being closed over (in loops for instance) and with abnormal exiting (e.g., die) causing memory corruption.

The SvIsCOW C macro now returns false for read-only copies of typeglobs, such as those created by:

$hash{elem} = *foo;
Hash::Util::lock_value %hash, 'elem';

It used to return true.

Assignment to $^A (the format output accumulator) now recalculates the number of lines output.

The regexp optimiser no longer crashes on debugging builds when merging fixed-string nodes with inconvenient contents.

Acknowledgements

Perl 5.15.1 represents approximately 5 weeks of development since Perl 5.15.0 and contains approximately 220,000 lines of changes across 650 files from 37 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.1:

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.

Module Install Instructions

To install perl5151delta, simply copy and paste either of the commands in to your terminal