You are viewing the version of this documentation from Perl 5.22.0. View the latest version

CONTENTS

NAME

perl5218delta - what is new for perl v5.21.8

DESCRIPTION

This document describes differences between the 5.21.7 release and the 5.21.8 release.

If you are upgrading from an earlier release such as 5.21.6, first read perl5217delta, which describes differences between 5.21.6 and 5.21.7.

Notice

With this release we are now in the contentious changes portion of the code freeze as we prepare for the next stable release of Perl 5.

Core Enhancements

The warnings pragma now supports warnings outside of "all"

Ever since perl v5.6.0 we've had no way of adding new warnings without retroactively adding them to all existing programs that used -w, -W or use warnings.

This caused us to not add new useful warnings out of fear that they might unduly burden users who just wanted to upgrade perl and didn't want to deal with a bunch of warnings from their existing code.

We now support a way to have our cake and eat it too, and can add new warnings to the core going forward through other top-level warning categories. See the warnings documentation for details.

Non-Capturing Regular Expression Flag

Regular expressions now support a /n flag that disables capturing and filling in $1, $2, etc... inside of groups:

"hello" =~ /(hi|hello)/n; # $1 is not set

This is equivalent to putting ?: at the beginning of every capturing group.

See "n" in perlre for more information.

prototype with no arguments

prototype() with no arguments now infers $_. [perl #123514]

use re 'strict'

This applies stricter syntax rules to regular expression patterns compiled within its scope, which hopefully will alert you to typos and other unintentional behavior that backwards-compatibility issues prevent us from doing in normal regular expression compilations. Because the behavior of this is subject to change in future Perl releases as we gain experience, using this pragma will raise a category experimental:re_strict warning. See 'strict' in re.

New "const" subroutine attribute

The "const" attribute can be applied to an anonymous subroutine. It causes it to be executed immediately when it is cloned. Its value is captured and used to create a new constant subroutine that is returned. This feature is experimental. See "Constant Functions" in perlsub.

Incompatible Changes

sub signatures moved before attributes

The experimental sub signatures feature, as introduced in 5.20, parsed signatures after attributes. In this release, the positioning has been moved such that signatures occur in exactly the same positioning a prototype would be found.

Modules and Pragmata

Updated Modules and Pragmata

Documentation

New Documentation

perlunicook

This document, by Tom Christiansen, provides examples of handling Unicode in Perl.

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

New Warnings

Changes to Existing Diagnostics

Configuration and Compilation

Testing

Platform Support

Platform-Specific Notes

Win32
  • Previously, on Visual C++ for Win64 built Perls only, when compiling every Perl XS module (including CPAN ones) and Perl aware .c file with a 64 bit Visual C++, would unconditionally have around a dozen warnings from hv_func.h. These warnings have been silenced. GCC all bitness and Visual C++ for Win32 were not affected.

  • Support for building without PerlIO has been removed from the Windows makefiles. Non-PerlIO builds were all but deprecated in Perl 5.18.0 and are already not supported by Configure on POSIX systems.

  • Between 2 and 6 ms and 7 I/O calls have been saved per attempt to open a perl module for each path in @INC.

Internal Changes

Selected Bug Fixes

Acknowledgements

Perl 5.21.8 represents approximately 4 weeks of development since Perl 5.21.7 and contains approximately 26,000 lines of changes across 750 files from 27 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 13,000 lines of changes to 410 .pm, .t, .c and .h files.

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

Aaron Crane, Andreas Voegele, Chad Granum, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David Mitchell, E. Choroba, Ed J, Father Chrysostomos, H.Merijn Brand, Hugo van der Sanden, James E Keenan, Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Matthew Horsfall, Max Maischein, Peter Martini, Rafael Garcia-Suarez, Ricardo Signes, Rostislav Skudnov, Slaven Rezic, Steve Hay, Tony Cook, Yves Orton, Æ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 https://rt.perl.org/ . 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.