Perl Programming Documentation
Download Perl
Explore

Manual

- Overview
- Tutorials
- FAQs
- History / Changes
- License

Reference

- Language
- Functions
- Operators
- Special Variables
- Pragmas
- Utilities
- Internals
- Platform Specific

Modules

- A • B • C • D • E
- F • G • H • I • L
- M • N • O • P • S
- T • U • X

Tools

- Preferences

# perl5212delta

Perl 5 version 22.0 documentation
Go to top
Show page index • Show recent pages
Recently read

# perl5212delta

- NAME
- DESCRIPTION
- Core Enhancements
  - Better heuristics on older platforms for determining locale UTF8ness
- Security
  - Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available
- Deprecations
  - /\C/ character class
- Performance Enhancements
- Modules and Pragmata
  - Updated Modules and Pragmata
- Documentation
  - Changes to Existing Documentation
- Diagnostics
  - New Diagnostics
- Configuration and Compilation
- Testing
- Platform Support
  - Platform-Specific Notes
- Internal Changes
- Selected Bug Fixes
- Acknowledgements
- Reporting Bugs
- SEE ALSO

# NAME

perl5212delta - what is new for perl v5.21.2

# DESCRIPTION

This document describes differences between the 5.21.1 release and the 5.21.2 release.

If you are upgrading from an earlier release such as 5.21.0, first read perl5211delta, which describes differences between 5.21.0 and 5.21.1.

# Core Enhancements

## Better heuristics on older platforms for determining locale UTF8ness

On platforms that implement neither the C99 standard nor the POSIX 2001 standard, determining if the current locale is UTF8 or not depends on heuristics. These are improved in this release.

# Security

## Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available

The 'code hardening' option called `_FORTIFY_SOURCE` , available in gcc 4.*, is now always used for compiling Perl, if available.

Note that this isn't necessarily a huge step since in many platforms the step had already been taken several years ago: many Linux distributions (like Fedora) have been using this option for Perl, and OS X has enforced the same for many years.

# Deprecations

## `/\C/` character class

This character class, which matches a single byte, even if it appears in a multi-byte character has been deprecated. Matching single bytes in a multi-byte character breaks encapsulation, and can corrupt utf8 strings.

# Performance Enhancements

- Refactoring of `pp_tied` and C`pp_ref` for small improvements.

- Pathtools don't try to load XS on miniperl.

- A typo fix reduces the size of the `OP` structure.

- Hash lookups where the key is a constant is faster.

# Modules and Pragmata

## Updated Modules and Pragmata

- arybase has been upgraded from version 0.07 to 0.08.

- B has been upgraded from version 1.49 to 1.50.

- Devel::Peek has been upgraded from version 1.17 to 1.18.

- experimental has been upgraded from version 0.007 to 0.008.

- ExtUtils::Manifest has been upgraded from version 1.63 to 1.64.

- File::Copy has been upgraded from version 2.29 to 2.30.

- The PathTools module collection (File::Spec and friends) has been upgraded from version 3.48 to 3.49.

- Filter::Simple has been upgraded from version 0.91 to 0.92.

- Hash::Util has been upgraded from version 0.17 to 0.18.

- IO has been upgraded from version 1.32 to 1.33.

- IO::Socket::IP has been upgraded from version 0.29 to 0.31.

  A better fix for subclassing `connect()`. [cpan #95983] [cpan #97050]

- IPC::Open3 has been upgraded from version 1.16 to 1.17.

- Math::BigInt has been upgraded from version 1.9995 to 1.9996.

  Correct handling of subclasses. [cpan #96254] [cpan #96329]

- Module::CoreList has been upgraded from version 5.021001_01 to 5.021002.

- Pod::Usage has been upgraded from version 1.63 to 1.64.

- POSIX has been upgraded from version 1.40 to 1.41.

- threads has been upgraded from version 1.94 to 1.95.

- warnings has been upgraded from version 1.24 to 1.26.

# Documentation

## Changes to Existing Documentation

### perlpolicy

- We now have a code of conduct for the p5p mailing list, as documented in STANDARDS OF CONDUCT in perlpolicy.

### perlfunc

- Improve documentation of `our`.

### perlsyn

- The empty conditional in `for` and `while` is now documented in perlsyn.

# Diagnostics

## New Diagnostics

### New Warnings

- Argument %s treated as 0 in increment (++)

  (W numeric) The indicated string was fed as an argument to the `++` operator which expects either a number or a string matching `/^[a-zA-Z]*[0-9]*\z/` . See Auto-increment and Auto-decrement in perlop for details.

- Redundant argument in %s

  (W redundant) You called a function with more arguments than other arguments you supplied indicated would be needed. Currently only emitted when a printf-type format required fewer arguments than were supplied, but might be used in the future for e.g. pack.

  The warnings category `redundant` is new. See also [RT #121025]

# Configuration and Compilation

- A new compilation flag, `-DPERL_OP_PARENT` is available. For details, see the discussion below at Internal Changes.

# Testing

- `test.pl` now allows `plan skip_all => $reason` , to make it more compatible with `Test::More` .

# Platform Support

## Platform-Specific Notes

- Solaris

  Builds on Solaris 10 with `-Dusedtrace` would fail early since make didn't follow implied dependencies to build `perldtrace.h` . Added an explicit dependency to `depend` . [perl #120120]

# Internal Changes

- The following private API functions had their context parameter removed, `Perl_cast_ulong` , `Perl_cast_i32` , `Perl_cast_iv` , `Perl_cast_uv` , `Perl_cv_const_sv` , `Perl_mg_find` , `Perl_mg_findext` , `Perl_mg_magical` , `Perl_mini_mktime` , `Perl_my_dirfd` , `Perl_sv_backoff` , `Perl_utf8_hop` .

  Users of the public API prefix-less calls remain unaffected.

- Experimental support for ops in the optree to be able to locate their parent, if any. A general-purpose function, `op_sibling_splice()` allows for general manipulating an `op_sibling` chain. The last op in such a chain is now marked with the field `op_lastsib` .

  A new build define, `-DPERL_OP_PARENT` has been added; if given, it forces the core to use `op_lastsib` to detect the last sibling in a chain, freeing the last `op_sibling` pointer, which then points back to the parent (instead of being `NULL` ).

  A C-level `op_parent()` function, and a `B` `parent()` method have been added; under a default build, they return `NULL` , but when `-DPERL_OP_PARENT` has been set, they return the parent of the current op.

# Selected Bug Fixes

- `s///e` on tainted utf8 strings got `pos()` messed up. This bug, introduced in 5.20, is now fixed. [RT #122148]

- A non-word boundary in a regular expression (`\B` ) did not always match the end of the string; in particular `q{} =~ /\B/` did not match. This bug, introduced in perl 5.14, is now fixed. [RT #122090]

- `" P" =~ /(?=.*P)P/` should match, but did not. This is now fixed. [RT #122171].

# Acknowledgements

Perl 5.21.2 represents approximately 4 weeks of development since Perl 5.21.1 and contains approximately 11,000 lines of changes across 220 files from 27 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 5,700 lines of changes to 140 .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.2:

Aaron Crane, Abhijit Menon-Sen, Abigail, Alexandr Ciornii, brian d foy, Brian Fraser, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David Golden, David Mitchell, Dmitri Tikhonov, George Greer, H.Merijn Brand, James E Keenan, Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Matthew Horsfall, Peter John Acklam, Peter Martini, Reini Urban, Ricardo Signes, 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.

Page index

- NAME
- DESCRIPTION
- Core Enhancements
  - Better heuristics on older platforms for determining locale UTF8ness
- Security
  - Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available
- Deprecations
  - /\C/ character class
- Performance Enhancements
- Modules and Pragmata
  - Updated Modules and Pragmata
- Documentation
  - Changes to Existing Documentation
- Diagnostics
  - New Diagnostics
- Configuration and Compilation
- Testing
- Platform Support
  - Platform-Specific Notes
- Internal Changes
- Selected Bug Fixes
- Acknowledgements
- Reporting Bugs
- SEE ALSO