perl5160delta - what is new for perl v5.16.0



NAME

perl5160delta - what is new for perl v5.16.0


DESCRIPTION

This document describes differences between the 5.14.0 release and the 5.16.0 release.

If you are upgrading from an earlier release such as 5.12.0, first read the perl5140delta manpage, which describes differences between 5.12.0 and 5.14.0.

Some bug fixes in this release have been backported to later releases of 5.14.x. Those are indicated with the 5.14.x version in parentheses.


Notice

With the release of Perl 5.16.0, the 5.12.x series of releases is now out of its support period. There may be future 5.12.x releases, but only in the event of a critical security issue. Users of Perl 5.12 or earlier should consider upgrading to a more recent release of Perl.

This policy is described in greater detail in perlpolicy.


Core Enhancements

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;
    # only 5.16 features enabled here
    use 5.014;
    # only 5.14 features enabled here (not 5.16)

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 behavior 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.

no feature now resets to the default feature set. To disable all features (which is likely to be a pretty special-purpose request, since it presumably won't match any named set of semantics) you can now write no feature ':all'.

$[ 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'.

__SUB__

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

New and Improved Built-ins

More consistent eval

The eval operator sometimes treats a string argument as a sequence of characters and sometimes as a sequence of bytes, depending on the internal encoding. The internal encoding is not supposed to make any difference, but there is code that relies on this inconsistency.

The new unicode_eval and evalbytes features (enabled under use 5.16.0) resolve this. The unicode_eval feature causes eval $string to treat the string always as Unicode. The evalbytes features provides a function, itself called evalbytes, which evaluates its argument always as a string of bytes.

These features also fix oddities with source filters leaking to outer dynamic scopes.

See the feature manpage for more detail.

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 an incompatible change:

If the original string changes length after the call to substr but before assignment to its return value, negative offsets will remember their position from the end of the string, affecting code like this:

    my $string = "string";
    my $lvalue = \substr $string, -4, 2;
    print $$lvalue, "\n"; # prints "ri"
    $string = "bailing twine";
    print $$lvalue, "\n"; # prints "wi"; used to print "il"

The same thing happens with an omitted third argument. The returned lvalue will always extend to the end of the string, even if the string becomes longer.

Since this change also allowed many bugs to be fixed (see The substr operator), and since the behavior of negative offsets has never been specified, the change was deemed acceptable.

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 lets ties be weakened with Scalar::Util::weaken(tied $tied_variable).

Unicode Support

Supports (almost) Unicode 6.1

Besides the addition of whole new scripts, and new characters in existing scripts, this new version of Unicode, as always, makes some changes to existing characters. One change that may trip up some applications is that the General Category of two characters in the Latin-1 range, PILCROW SIGN and SECTION SIGN, has been changed from Other_Symbol to Other_Punctuation. The same change has been made for a character in each of Tibetan, Ethiopic, and Aegean. The code points U+3248..U+324F (CIRCLED NUMBER TEN ON BLACK SQUARE through CIRCLED NUMBER EIGHTY ON BLACK SQUARE) have had their General Category changed from Other_Symbol to Other_Numeric. The Line Break property has changes for Hebrew and Japanese; and because of other changes in 6.1, the Perl regular expression construct \X now works differently for some characters in Thai and Lao.

New aliases (synonyms) have been defined for many property values; these, along with the previously existing ones, are all cross-indexed in perluniprops.

The return value of charnames::viacode() is affected by other changes:

 Code point      Old Name             New Name
   U+000A    LINE FEED (LF)        LINE FEED
   U+000C    FORM FEED (FF)        FORM FEED
   U+000D    CARRIAGE RETURN (CR)  CARRIAGE RETURN
   U+0085    NEXT LINE (NEL)       NEXT LINE
   U+008E    SINGLE-SHIFT 2        SINGLE-SHIFT-2
   U+008F    SINGLE-SHIFT 3        SINGLE-SHIFT-3
   U+0091    PRIVATE USE 1         PRIVATE USE-1
   U+0092    PRIVATE USE 2         PRIVATE USE-2
   U+2118    SCRIPT CAPITAL P      WEIERSTRASS ELLIPTIC FUNCTION

Perl will accept any of these names as input, but charnames::viacode() now returns the new name of each pair. The change for U+2118 is considered by Unicode to be a correction, that is the original name was a mistake (but again, it will remain forever valid to use it to refer to U+2118). But most of these changes are the fallout of the mistake Unicode 6.0 made in naming a character used in Japanese cell phones to be ``BELL'', which conflicts with the longstanding industry use of (and Unicode's recommendation to use) that name to mean the ASCII control character at U+0007. Therefore, that name has been deprecated in Perl since v5.14, and any use of it will raise a warning message (unless turned off). The name ``ALERT'' is now the preferred name for this code point, with ``BEL'' an acceptable short form. The name for the new cell phone character, at code point U+1F514, remains undefined in this version of Perl (hence we don't implement quite all of Unicode 6.1), but starting in v5.18, BELL will mean this character, and not U+0007.

Unicode has taken steps to make sure that this sort of mistake does not happen again. The Standard now includes all generally accepted names and abbreviations for control characters, whereas previously it didn't (though there were recommended names for most of them, which Perl used). This means that most of those recommended names are now officially in the Standard. Unicode did not recommend names for the four code points listed above between U+008E and U+008F, and in standardizing them Unicode subtly changed the names that Perl had previously given them, by replacing the final blank in each name by a hyphen. Unicode also officially accepts names that Perl had deprecated, such as FILE SEPARATOR. Now the only deprecated name is BELL. Finally, Perl now uses the new official names instead of the old (now considered obsolete) names for the first four code points in the list above (the ones which have the parentheses in them).

Now that the names have been placed in the Unicode standard, these kinds of changes should not happen again, though corrections, such as to U+2118, are still possible.

Unicode also added some name abbreviations, which Perl now accepts: SP for SPACE; TAB for CHARACTER TABULATION; NEW LINE, END OF LINE, NL, and EOL for LINE FEED; LOCKING-SHIFT ONE for SHIFT OUT; LOCKING-SHIFT ZERO for SHIFT IN; and ZWNBSP for ZERO WIDTH NO-BREAK SPACE.

More details on this version of Unicode are provided in http://www.unicode.org/versions/Unicode6.1.0/.

use charnames is no longer needed for \N{name}

When \N{name} is encountered, the charnames module is now automatically loaded when needed as if the :full and :short options had been specified. See the charnames manpage for more information.

\N{...} can now have Unicode loose name matching

This is described in the charnames item in Updated Modules and Pragmata below.

Unicode Symbol Names

Perl now has proper support for Unicode in symbol names. It used to be that *{$foo} would ignore the internal UTF8 flag and use the bytes of the underlying representation to look up the symbol. That meant that *{"\x{100}"} and *{"\xc4\x80"} would return the same thing. All these parts of Perl have been fixed to account for Unicode:

In addition, a parsing bug has been fixed that prevented *{é} from implicitly quoting the name, but instead interpreted it as *{+é}, which would cause a strict violation.

*{"*a::b"} automatically strips off the * if it is followed by an ASCII letter. That has been extended to all Unicode identifier characters.

One-character non-ASCII non-punctuation variables (like ) are now subject to ``Used only once'' warnings. They used to be exempt, as they were treated as punctuation variables.

Also, single-character Unicode punctuation variables (like $‰) are now supported [perl #69032].

Improved ability to mix locales and Unicode, including UTF-8 locales

An optional parameter has been added to use locale

 use locale ':not_characters';

which tells Perl to use all but the LC_CTYPE and LC_COLLATE portions of the current locale. Instead, the character set is assumed to be Unicode. This lets locales and Unicode be seamlessly mixed, including the increasingly frequent UTF-8 locales. When using this hybrid form of locales, the :locale layer to the the open manpage pragma can be used to interface with the file system, and there are CPAN modules available for ARGV and environment variable conversions.

Full details are in the perllocale manpage.

New function fc and corresponding escape sequence \F for Unicode foldcase

Unicode foldcase is an extension to lowercase that gives better results when comparing two strings case-insensitively. It has long been used internally in regular expression /i matching. Now it is available explicitly through the new fc function call (enabled by "use feature 'fc'", or use v5.16, or explicitly callable via CORE::fc) or through the new \F sequence in double-quotish strings.

Full details are in fc in the perlfunc manpage.

The Unicode Script_Extensions property is now supported.

New in Unicode 6.0, this is an improved Script property. Details are in Scripts in the perlunicode manpage.

XS Changes

Improved typemaps for Some Builtin Types

Most XS authors will know there is a longstanding bug in the OUTPUT typemap for T_AVREF (AV*), T_HVREF (HV*), T_CVREF (CV*), and T_SVREF (SVREF or \$foo) that requires manually decrementing the reference count of the return value instead of the typemap taking care of this. For backwards-compatibility, this cannot be changed in the default typemaps. But we now provide additional typemaps T_AVREF_REFCOUNT_FIXED, etc. that do not exhibit this bug. Using them in your extension is as simple as having one line in your TYPEMAP section:

  HV*   T_HVREF_REFCOUNT_FIXED

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, and so its use is now deprecated. Use is_utf8_char_buf() (described just below) instead.

Added is_utf8_char_buf()

This function is designed to replace the deprecated is_utf8_char() function. It includes an extra parameter to make sure it doesn't read past the end of the input buffer.

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

Most other XS-callable functions that take UTF-8 encoded input implicitly assume that the UTF-8 is valid (not malformed) with respect 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().

New Pad API

Many new functions have been added to the API for manipulating lexical pads. See Pad Data Structures in the perlapi manpage for more information.

Changes to Special Variables

$$ can be assigned to

$$ was made read-only in Perl 5.8.0. But only sometimes: local $$ would make it writable again. Some CPAN modules were using local $$ or XS code to bypass the read-only check, so there is no reason to keep $$ read-only. (This change also allowed a bug to be fixed while maintaining backward compatibility.)

$^X converted to an absolute path on FreeBSD, OS X and Solaris

$^X is now converted to an absolute path on OS X, FreeBSD (without needing /proc mounted) and Solaris 10 and 11. This augments the previous approach of using /proc on Linux, FreeBSD, and NetBSD (in all cases, where mounted).

This makes relocatable perl installations more useful on these platforms. (See ``Relocatable @INC'' in INSTALL)

Debugger Changes

Features inside the debugger

The current Perl's the feature manpage bundle is now enabled for commands entered in the interactive debugger.

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.

enable and disable

The debugger now has disable and enable commands for disabling existing breakpoints and re-enabling them. See the perldebug manpage.

Breakpoints with file names

The debugger's ``b'' command for setting breakpoints now lets a line number be prefixed with a file name. See b [file]:[line] [condition] in the perldebug manpage.

The CORE Namespace

The CORE:: prefix

The CORE:: prefix can now be used on keywords enabled by feature.pm, even outside the scope of use feature.

Subroutines in the CORE namespace

Many Perl keywords are now available as subroutines in the CORE namespace. This lets them be aliased:

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

And for prototypes to be bypassed:

    sub mytie(\[%$*@]$@) {
        my ($ref, $pack, @args) = @_;
        ... do something ...
        goto &CORE::tie;
    }

Some of these cannot be called through references or via &foo syntax, but must be called as barewords.

See the CORE manpage for details.

Other Changes

Anonymous handles

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

Autoloaded sort Subroutines

Custom sort subroutines can now be autoloaded [perl #30661]:

    sub AUTOLOAD { ... }
    @sorted = sort foo @list; # uses AUTOLOAD

continue no longer requires the ``switch'' feature

The continue keyword has two meanings. It can introduce a continue block after a loop, or it can exit the current when block. Up to now, the latter meaning was valid only with the ``switch'' feature enabled, and was a syntax error otherwise. Since the main purpose of feature.pm is to avoid conflicts with user-defined subroutines, there is no reason for continue to depend on it.

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 for limiting your instrumentation to one or more of: compile time, run time, or destruct time.

__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.

The \$ prototype accepts any scalar lvalue

The \$ and \[$] subroutine prototypes now accept any scalar lvalue argument. Previously they accepted only 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.

_ in subroutine prototypes

The _ character in subroutine prototypes is now allowed before @ or %.


Security

Use is_utf8_char_buf() and not is_utf8_char()

The latter function is now deprecated because its API is insufficient to guarantee that it doesn't read (up to 12 bytes in the worst case) beyond the end of its input string. See is_utf8_char_buf().

Malformed UTF-8 input could cause attempts to read beyond the end of the buffer

Two new XS-accessible functions, utf8_to_uvchr_buf() and utf8_to_uvuni_buf() are now available to prevent this, and the Perl core has been converted to use them. See Internal Changes.

File::Glob::bsd_glob() memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).

Calling File::Glob::bsd_glob with the unsupported flag GLOB_ALTDIRFUNC would cause an access violation / segfault. A Perl program that accepts a flags value from an external source could expose itself to denial of service or arbitrary code execution attacks. There are no known exploits in the wild. The problem has been corrected by explicitly disabling all unsupported flags and setting unused function pointers to null. Bug reported by Clément Lecigne. (5.14.2)

Privileges are now set correctly when assigning to $(

A hypothetical bug (probably unexploitable in practice) because the incorrect setting of the effective group ID while setting $( has been fixed. The bug would have affected only systems that have setresgid() but not setregid(), but no such systems are known to exist.


Deprecations

Don't read the Unicode data base files in lib/unicore

It is now deprecated to directly read the Unicode data base files. These are stored in the lib/unicore directory. Instead, you should use the new functions in the Unicode::UCD manpage. These provide a stable API, and give complete information.

Perl may at some point in the future change or remove these files. The file which applications were most likely to have used is lib/unicore/ToDigit.pl. prop_invmap() in the Unicode::UCD manpage can be used to get at its data instead.

XS functions is_utf8_char(), utf8_to_uvchr() and utf8_to_uvuni()

This function is deprecated because it could read beyond the end of the input string. Use the new is_utf8_char_buf(), utf8_to_uvchr_buf() and utf8_to_uvuni_buf() instead.


Future Deprecations

This section serves as a notice of features that are likely to be removed or deprecated in the next release of perl (5.18.0). If your code depends on these features, you should contact the Perl 5 Porters via the mailing list or perlbug to explain your use case and inform the deprecation process.

Core Modules

These modules may be marked as deprecated from the core. This only means that they will no longer be installed by default with the core distribution, but will remain available on the CPAN.

Platforms with no supporting programmers

These platforms will probably have their special build support removed during the 5.17.0 development series.

Other Future Deprecations


Incompatible Changes

Special blocks called in void context

Special blocks (BEGIN, CHECK, INIT, UNITCHECK, END) are now called in void context. This avoids wasteful copying of the result of the last statement [perl #108794].

The overloading pragma and regexp objects

With no overloading, regular expression objects returned by qr// are now stringified as ``Regexp=REGEXP(0xbe600d)'' instead of the regular expression itself [perl #108780].

Two XS typemap Entries removed

Two presumably unused XS typemap entries have been removed from the core typemap: T_DATAUNIT and T_CALLBACK. If you are, against all odds, a user of these, please see the instructions on how to restore them in the perlxstypemap manpage.

Unicode 6.1 has incompatibilities with Unicode 6.0

These are detailed in Supports (almost) Unicode 6.1 above. You can compile this version of Perl to use Unicode 6.0. See Hacking Perl to work on earlier Unicode versions (for very serious hackers only) in the perlunicode manpage.

Borland compiler

All support for the Borland compiler has been dropped. The code had not worked for a long time anyway.

Certain deprecated Unicode properties are no longer supported by default

Perl should never have exposed certain Unicode properties that are used by Unicode internally and not meant to be publicly available. Use of these has generated deprecated warning messages since Perl 5.12. The removed properties are Other_Alphabetic, Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and Other_Uppercase.

Perl may be recompiled to include any or all of them; instructions are given in perluniprops/Unicode character properties that are NOT accepted by Perl.

Dereferencing IO thingies as typeglobs

The *{...} operator, when passed a reference to an IO thingy (as in *{*STDIN{IO}}), creates a new typeglob containing just that IO object. Previously, it would stringify as an empty string, but some operators would treat it as undefined, producing an ``uninitialized'' warning. Now it stringifies as __ANONIO__ [perl #96326].

User-defined case-changing operations

This feature was deprecated in Perl 5.14, and has now been removed. The CPAN module the Unicode::Casing manpage provides better functionality without the drawbacks that this feature had, as are detailed in the 5.14 documentation: http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29

XSUBs are now 'static'

XSUB C functions are now 'static', that is, they are not visible from outside the compilation unit. Users can use the new XS_EXTERNAL(name) and XS_INTERNAL(name) macros to pick the desired linking behavior. The ordinary XS(name) declaration for XSUBs will continue to declare non-'static' XSUBs for compatibility, but the XS compiler, the ExtUtils::ParseXS manpage (xsubpp) will emit 'static' XSUBs by default. the ExtUtils::ParseXS manpage's behavior can be reconfigured from XS using the EXPORT_XSUB_SYMBOLS keyword. See the perlxs manpage for details.

Weakening read-only references

Weakening read-only references is no longer permitted. It should never have worked anyway, and could sometimes result in crashes.

Tying scalars that hold typeglobs

Attempting to tie a scalar after a typeglob was assigned to it would instead tie the handle in the typeglob's IO slot. This meant that it was impossible to tie the scalar itself. Similar problems affected tied and untie: tied $scalar would return false on a tied scalar if the last thing returned was a typeglob, and untie $scalar on such a tied scalar would do nothing.

We fixed this problem before Perl 5.14.0, but it caused problems with some CPAN modules, so we put in a deprecation cycle instead.

Now the deprecation has been removed and this bug has been fixed. So tie $scalar will always tie the scalar, not the handle it holds. To tie the handle, use tie *$scalar (with an explicit asterisk). The same applies to tied *$scalar and untie *$scalar.

IPC::Open3 no longer provides xfork(), xclose_on_exec() and xpipe_anon()

All three functions were private, undocumented, and unexported. They do not appear to be used by any code on CPAN. Two have been inlined and one deleted entirely.

$$ no longer caches PID

Previously, if one called fork(3) from C, Perl's notion of $$ could go out of sync with what getpid() returns. By always fetching the value of $$ via getpid(), this potential bug is eliminated. Code that depends on the caching behavior will break. As described in Core Enhancements, $$ is now writable, but it will be reset during a fork.

$$ and getppid() no longer emulate POSIX semantics under LinuxThreads

The POSIX emulation of $$ and getppid() under the obsolete LinuxThreads implementation has been removed. This only impacts users of Linux 2.4 and users of Debian GNU/kFreeBSD up to and including 6.0, not the vast majority of Linux installations that use NPTL threads.

This means that getppid(), like $$, is now always guaranteed to return the OS's idea of the current state of the process, not perl's cached version of it.

See the documentation for $$ for details.

$<, $>, $( and $) are no longer cached

Similarly to the changes to $$ and getppid(), the internal caching of $<, $>, $( and $) has been removed.

When we cached these values our idea of what they were would drift out of sync with reality if someone (e.g., someone embedding perl) called sete?[ug]id() without updating PL_e?[ug]id. Having to deal with this complexity wasn't worth it given how cheap the gete?[ug]id() system call is.

This change will break a handful of CPAN modules that use the XS-level PL_uid, PL_gid, PL_euid or PL_egid variables.

The fix for those breakages is to use PerlProc_gete?[ug]id() to retrieve them (e.g., PerlProc_getuid()), and not to assign to PL_e?[ug]id if you change the UID/GID/EUID/EGID. There is no longer any need to do so since perl will always retrieve the up-to-date version of those values from the OS.

Which Non-ASCII characters get quoted by quotemeta and \Q has changed

This is unlikely to result in a real problem, as Perl does not attach special meaning to any non-ASCII character, so it is currently irrelevant which are quoted or not. This change fixes bug [perl #77654] and brings Perl's behavior more into line with Unicode's recommendations. See quotemeta in the perlfunc manpage.


Performance Enhancements


Modules and Pragmata

Deprecated Modules

the Version::Requirements manpage
Version::Requirements is now DEPRECATED, use the CPAN::Meta::Requirements manpage, which is a drop-in replacement. It will be deleted from perl.git blead in v5.17.0.

New Modules and Pragmata

Updated Modules and Pragmata

This is only an overview of selected module updates. For a complete list of updates, run:

    $ corelist --diff 5.14.0 5.16.0

You can substitute your favorite version in place of 5.14.0, too.

Removed Modules and Pragmata

As promised in Perl 5.14.0's release notes, the following modules have been removed from the core distribution, and if needed should be installed from CPAN instead.


Documentation

New Documentation

the perldtrace manpage

the perldtrace manpage describes Perl's DTrace support, listing the provided probes and gives examples of their use.

the perlexperiment manpage

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

the perlootut manpage

This a new OO tutorial. It focuses on basic OO concepts, and then recommends that readers choose an OO framework from CPAN.

the perlxstypemap manpage

The new manual describes the XS typemapping mechanism in unprecedented detail and combines new documentation with information extracted from the perlxs manpage and the previously unofficial list of all core typemaps.

Changes to Existing Documentation

the perlapi manpage

the perlfunc manpage

the perlguts manpage

the perlobj manpage

the perlop manpage

the perlpragma manpage

Laundering and Detecting Tainted Data in the perlsec manpage

the perllol manpage

the perlmod manpage

the perlpodstyle manpage

the perlre manpage

the perlrun manpage

the perlsub manpage

the perltie manpage

the perlvar manpage

Other Changes

Removed Documentation

Old OO Documentation

The old OO tutorials, perltoot, perltooc, and perlboot, have been removed. The perlbot (bag of object tricks) document has been removed as well.

Development Deltas

The perldelta files for development releases are no longer packaged with perl. These can still be found in the perl source code repository.


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 the perldiag manpage.

New Diagnostics

New Errors

New Warnings

Removed Errors

Changes to Existing Diagnostics


Utility Changes

the h2ph manpage

the splain manpage

the zipdetails manpage


Configuration and Compilation


Platform Support

Platform-Specific Notes

Cygwin

HP-UX

VMS

GNU/Hurd

OpenVOS

SunOS

The CC workshop C++ compiler is now detected and used on systems that ship without cc.


Internal Changes


Selected Bug Fixes

Array and hash

C API fixes

Compile-time hints

Copy-on-write scalars

Copy-on-write or shared hash key scalars were introduced in 5.8.0, but most Perl code did not encounter them (they were used mostly internally). Perl 5.10.0 extended them, such that assigning __PACKAGE__ or a hash key to a scalar would make it copy-on-write. Several parts of Perl were not updated to account for them, but have now been fixed.

The debugger

Dereferencing operators

Filehandle, last-accessed

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

Filetests and stat

The term ``filetests'' refers to the operators that consist of a hyphen followed by a single letter: -r, -x, -M, etc. The term ``stacked'' when applied to filetests means followed by another filetest operator sharing the same operand, as in -r -x -w $fooo.

Formats

given and when

The glob operator

Lvalue subroutines

Overloading

Prototypes of built-in keywords

Regular expressions

Smartmatching

The sort operator

The substr operator

Support for embedded nulls

Some parts of Perl did not work correctly with nulls (chr 0) embedded in strings. That meant that, for instance, $m = "a\0b"; foo->$m would call the ``a'' method, instead of the actual method name contained in $m. These parts of perl have been fixed to support nulls:

One side effect of these changes is that blessing into ``\0'' no longer causes ref() to return false.

Threading bugs

Tied variables

Version objects and vstrings

Warnings, redefinition

Warnings, ``Uninitialized''

Weak references

Other notable fixes


Known Problems


Acknowledgements

Perl 5.16.0 represents approximately 12 months of development since Perl 5.14.0 and contains approximately 590,000 lines of changes across 2,500 files from 139 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.16.0:

Aaron Crane, Abhijit Menon-Sen, Abigail, Alan Haggai Alavi, Alberto Simões, Alexandr Ciornii, Andreas König, Andy Dougherty, Aristotle Pagaltzis, Bo Johansson, Bo Lindbergh, Breno G. de Oliveira, brian d foy, Brian Fraser, Brian Greenfield, Carl Hayter, Chas. Owens, Chia-liang Kao, Chip Salzenberg, Chris 'BinGOs' Williams, Christian Hansen, Christopher J. Madsen, chromatic, Claes Jacobsson, Claudio Ramirez, Craig A. Berry, Damian Conway, Daniel Kahn Gillmor, Darin McBride, Dave Rolsky, David Cantrell, David Golden, David Leadbeater, David Mitchell, Dee Newcum, Dennis Kaarsemaker, Dominic Hargreaves, Douglas Christopher Wilson, Eric Brine, Father Chrysostomos, Florian Ragwitz, Frederic Briere, George Greer, Gerard Goossen, Gisle Aas, H.Merijn Brand, Hojung Youn, Ian Goodacre, James E Keenan, Jan Dubois, Jerry D. Hedden, Jesse Luehrs, Jesse Vincent, Jilles Tjoelker, Jim Cromie, Jim Meyering, Joel Berger, Johan Vromans, Johannes Plunien, John Hawkinson, John P. Linderman, John Peacock, Joshua ben Jore, Juerd Waalboer, Karl Williamson, Karthik Rajagopalan, Keith Thompson, Kevin J. Woolley, Kevin Ryde, Laurent Dami, Leo Lapworth, Leon Brocard, Leon Timmermans, Louis Strous, Lukas Mai, Marc Green, Marcel Grünauer, Mark A. Stratman, Mark Dootson, Mark Jason Dominus, Martin Hasch, Matthew Horsfall, Max Maischein, Michael G Schwern, Michael Witten, Mike Sheldrake, Moritz Lenz, Nicholas Clark, Niko Tyni, Nuno Carvalho, Pau Amma, Paul Evans, Paul Green, Paul Johnson, Perlover, Peter John Acklam, Peter Martini, Peter Scott, Phil Monsen, Pino Toscano, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Robin Barker, Rodolfo Carvalho, Salvador Fandiño, Sam Kimbrel, Samuel Thibault, Shawn M Moore, Shigeya Suzuki, Shirakata Kentaro, Shlomi Fish, Sisyphus, Slaven Rezic, Spiros Denaxas, Steffen Müller, Steffen Schwigon, Stephen Bennett, Stephen Oberholtzer, Stevan Little, Steve Hay, Steve Peters, Thomas Sibley, Thorsten Glaser, Timothe Litt, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, Vadim Konovalov, Vincent Pit, Vladimir Timofeev, Walt Mankowski, Yves Orton, Zefram, Zsbán Ambrus, Æ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 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 use this address only 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.

 perl5160delta - what is new for perl v5.16.0