Changes for version v5.20.0

  • Warnings will now be issued at compile time when these operations are detected.
    • no if $] >= 5.01908, warnings => "experimental::autoderef";
  • Consider, though, replacing the use of these features, as they may change behavior again before becoming stable.
  • =item *
  • L<A sequence of multiple spaces in a charnames alias definition is deprecated|perldiag/"A sequence of multiple spaces in a charnames alias definition is deprecated">
  • L<Trailing white-space in a charnames alias definition is deprecated|perldiag/"Trailing white-space in a charnames alias definition is deprecated">
  • These two deprecation warnings involving C<\N{...}> were incorrectly implemented. They did not warn by default (now they do) and could not be made fatal via C<< use warnings FATAL => 'deprecated' >> (now they can).
  • =item *
  • L<Attribute prototype(%s) discards earlier prototype attribute in same sub|perldiag/"Attribute prototype(%s) discards earlier prototype attribute in same sub">
  • (W misc) A sub was declared as C<sub foo : prototype(A) : prototype(B) {}>, for example. Since each sub can only have one prototype, the earlier declaration(s) are discarded while the last one is applied.
  • =item *
  • L<Invalid \0 character in %s for %s: %s\0%s|perldiag/"Invalid \0 character in %s for %s: %s\0%s">
  • (W syscalls) Embedded \0 characters in pathnames or other system call arguments produce a warning as of 5.20. The parts after the \0 were formerly ignored by system calls.
  • =item *
  • L<Matched non-Unicode code point 0x%X against Unicode property; may not be portable|perldiag/"Matched non-Unicode code point 0x%X against Unicode property; may not be portable">.
  • This replaces the message "Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches succeed".
  • =item *
  • L<Missing ']' in prototype for %s : %s|perldiag/"Missing ']' in prototype for %s : %s">
  • (W illegalproto) A grouping was started with C<[> but never closed with C<]>.
  • =item *
  • L<Possible precedence issue with control flow operator|perldiag/"Possible precedence issue with control flow operator">
  • (W syntax) There is a possible problem with the mixing of a control flow operator (e.g. C<return>) and a low-precedence operator like C<or>. Consider:
    • sub { return $a or $b; }
  • This is parsed as:
    • sub { (return $a) or $b; }
  • Which is effectively just:
    • sub { return $a; }
  • Either use parentheses or the high-precedence variant of the operator.
  • Note this may be also triggered for constructs like:
    • sub { 1 if die; }
  • =item *
  • L<Postfix dereference is experimental|perldiag/"Postfix dereference is experimental">
  • (S experimental::postderef) This warning is emitted if you use the experimental postfix dereference syntax. Simply suppress the warning if you want to use the feature, but know that in doing so you are taking the risk of using an experimental feature which may change or be removed in a future Perl version:
    • no warnings "experimental::postderef"; use feature "postderef", "postderef_qq"; $ref->$*; $aref->@*; $aref->@[@indices]; ... etc ...
  • =item *
  • L<Prototype '%s' overridden by attribute 'prototype(%s)' in %s|perldiag/"Prototype '%s' overridden by attribute 'prototype(%s)' in %s">
  • (W prototype) A prototype was declared in both the parentheses after the sub name and via the prototype attribute. The prototype in parentheses is useless, since it will be replaced by the prototype from the attribute before it's ever used.
  • =item *
  • L<Scalar value @%s[%s] better written as $%s[%s]|perldiag/"Scalar value @%s[%s] better written as $%s[%s]">
  • (W syntax) In scalar context, you've used an array index/value slice (indicated by %) to select a single element of an array. Generally it's better to ask for a scalar value (indicated by $). The difference is that C<$foo[&bar]> always behaves like a scalar, both in the value it returns and when evaluating its argument, while C<%foo[&bar]> provides a list context to its subscript, which can do weird things if you're expecting only one subscript. When called in list context, it also returns the index (what C<&bar> returns) in addition to the value.
  • =item *
  • L<Scalar value @%s{%s} better written as $%s{%s}|perldiag/"Scalar value @%s{%s} better written as $%s{%s}">
  • (W syntax) In scalar context, you've used a hash key/value slice (indicated by %) to select a single element of a hash. Generally it's better to ask for a scalar value (indicated by $). The difference is that C<$foo{&bar}> always behaves like a scalar, both in the value it returns and when evaluating its argument, while C<@foo{&bar}> and provides a list context to its subscript, which can do weird things if you're expecting only one subscript. When called in list context, it also returns the key in addition to the value.
  • =item *
  • L<Setting $E<sol> to a reference to %s as a form of slurp is deprecated, treating as undef|perldiag/"Setting $E<sol> to a reference to %s as a form of slurp is deprecated, treating as undef">
  • =item *
  • L<Unexpected exit %u|perldiag/"Unexpected exit %u">
  • (S) exit() was called or the script otherwise finished gracefully when C<PERL_EXIT_WARN> was set in C<PL_exit_flags>.
  • =item *
  • L<Unexpected exit failure %d|perldiag/"Unexpected exit failure %d">
  • (S) An uncaught die() was called when C<PERL_EXIT_WARN> was set in C<PL_exit_flags>.
  • =item *
  • L<Use of literal control characters in variable names is deprecated|perldiag/"Use of literal control characters in variable names is deprecated">
  • (D deprecated) Using literal control characters in the source to refer to the ^FOO variables, like $^X and ${^GLOBAL_PHASE} is now deprecated. This only affects code like $\cT, where \cT is a control (like a C<SOH>) in the source code: ${"\cT"} and $^T remain valid.
  • =item *
  • L<Useless use of greediness modifier|perldiag/"Useless use of greediness modifier '%c' in regex; marked by <-- HERE in m/%s/">
  • This fixes [Perl #42957].
  • =back
  • =head2 Changes to Existing Diagnostics
  • =over 4
  • =item *
  • Warnings and errors from the regexp engine are now UTF-8 clean.
  • =item *
  • The "Unknown switch condition" error message has some slight changes. This error triggers when there is an unknown condition in a C<(?(foo))> conditional. The error message used to read:
    • Unknown switch condition (?(%s in regex;
  • But what %s could be was mostly up to luck. For C<(?(foobar))>, you might have seen "fo" or "f". For Unicode characters, you would generally get a corrupted string. The message has been changed to read:
    • Unknown switch condition (?(...)) in regex;
  • Additionally, the C<'E<lt>-- HERE'> marker in the error will now point to the correct spot in the regex.
  • =item *
  • The "%s "\x%X" does not map to Unicode" warning is now correctly listed as a severe warning rather than as a fatal error.
  • =item *
  • Under rare circumstances, one could get a "Can't coerce readonly REF to string" instead of the customary "Modification of a read-only value". This alternate error message has been removed.
  • =item *
  • "Ambiguous use of * resolved as operator *": This and similar warnings about "%" and "&" used to occur in some circumstances where there was no operator of the type cited, so the warning was completely wrong. This has been fixed [perl #117535, #76910].
  • =item *
  • Warnings about malformed subroutine prototypes are now more consistent in how the prototypes are rendered. Some of these warnings would truncate prototypes containing nulls. In other cases one warning would suppress another. The warning about illegal characters in prototypes no longer says "after '_'" if the bad character came before the underscore.
  • =item *
  • L<Perl folding rules are not up-to-date for 0x%X; please use the perlbug utility to report; in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Perl folding rules are not up-to-date for 0x%X; please use the perlbug utility to report; in regex; marked by <-- HERE in m/%s/">
  • This message is now only in the regexp category, and not in the deprecated category. It is still a default (i.e., severe) warning [perl #89648].
  • =item *
  • L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">
  • This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to be in scalar context at compile time. Previously it was worded "Scalar value %%s[%s] better written as $%s[%s]".
  • =item *
  • L<Switch condition not recognized in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Switch condition not recognized in regex; marked by <-- HERE in m/%s/">:
  • The description for this diagnostic has been extended to cover all cases where the warning may occur. Issues with the positioning of the arrow indicator have also been resolved.
  • =item *
  • The error messages for C<my($a?$b$c)> and C<my(do{})> now mention "conditional expression" and "do block", respectively, instead of reading 'Can't declare null operation in "my"'.
  • =item *
  • When C<use re "debug"> executes a regex containing a backreference, the debugging output now shows what string is being matched.
  • =item *
  • The now fatal error message C<Character following "\c" must be ASCII> has been reworded as C<Character following "\c" must be printable ASCII> to emphasize that in C<\cI<X>>, I<X> must be a I<printable (non-control)> ASCII character.
  • =back
  • =head1 Utility Changes
  • =head3 L<a2p>
  • =over 4
  • =item *
  • A possible crash from an off-by-one error when trying to access before the beginning of a buffer has been fixed. [perl #120244]
  • =back
  • =head3 F<bisect.pl>
  • The git bisection tool F<Porting/bisect.pl> has had many enhancements.
  • It is provided as part of the source distribution but not installed because it is not self-contained as it relies on being run from within a git checkout. Note also that it makes no attempt to fix tests, correct runtime bugs or make something useful to install - its purpose is to make minimal changes to get any historical revision of interest to build and run as close as possible to "as-was", and thereby make C<git bisect> easy to use.
  • =over 4
  • =item *
  • Can optionally run the test case with a timeout.
  • =item *
  • Can now run in-place in a clean git checkout.
  • =item *
  • Can run the test case under C<valgrind>.
  • =item *
  • Can apply user supplied patches and fixes to the source checkout before building.
  • =item *
  • Now has fixups to enable building several more historical ranges of bleadperl, which can be useful for pinpointing the origins of bugs or behaviour changes.
  • =back
  • =head3 L<find2perl>
  • =over 4
  • =item *
  • L<find2perl> now handles C<?> wildcards correctly. [perl #113054]
  • =back
  • =head3 L<perlbug>
  • =over 4
  • =item *
  • F<perlbug> now has a C<-p> option for attaching patches with a bug report.
  • =item *
  • L<perlbug> has been modified to supply the report template with CRLF line endings on Windows.
  • L<perl #121277|https://rt.perl.org/Public/Bug/Display.html?id=121277>
    • =item *
    • L<perlbug> now makes as few assumptions as possible about the encoding of the report. This will likely change in the future to assume UTF-8 by default but allow a user override.
    • =back
    • =head1 Configuration and Compilation
    • =over 4
    • =item *
    • The F<Makefile.PL> for L<SDBM_File> now generates a better F<Makefile>, which avoids a race condition during parallel makes, which could cause the build to fail. This is the last known parallel make problem (on *nix platforms), and therefore we believe that a parallel make should now always be error free.
    • =item *
    • F<installperl> and F<installman>'s option handling has been refactored to use L<Getopt::Long>. Both are used by the F<Makefile> C<install> targets, and are not installed, so these changes are only likely to affect custom installation scripts.
    • =over 4
    • =item *
    • Single letter options now also have long names.
    • =item *
    • Invalid options are now rejected.
    • =item *
    • Command line arguments that are not options are now rejected.
    • =item *
    • Each now has a C<--help> option to display the usage message.
    • =back
    • The behaviour for all valid documented invocations is unchanged.
    • =item *
    • Where possible, the build now avoids recursive invocations of F<make> when building pure-Perl extensions, without removing any parallelism from the build. Currently around 80 extensions can be processed directly by the F<make_ext.pl> tool, meaning that 80 invocations of F<make> and 160 invocations of F<miniperl> are no longer made.
    • =item *
    • The build system now works correctly when compiling under GCC or Clang with link-time optimization enabled (the C<-flto> option). [perl #113022]
    • =item *
    • Distinct library basenames with C<d_libname_unique>.
    • When compiling perl with this option, the library files for XS modules are named something "unique" -- for example, Hash/Util/Util.so becomes Hash/Util/PL_Hash__Util.so. This behavior is similar to what currently happens on VMS, and serves as groundwork for the Android port.
    • =item *
    • C<sysroot> option to indicate the logical root directory under gcc and clang.
    • When building with this option set, both Configure and the compilers search for all headers and libraries under this new sysroot, instead of /.
    • This is a huge time saver if cross-compiling, but can also help on native builds if your toolchain's files have non-standard locations.
    • =item *
    • The cross-compilation model has been renovated. There's several new options, and some backwards-incompatible changes:
    • We now build binaries for miniperl and generate_uudmap to be used on the host, rather than running every miniperl call on the target; this means that, short of 'make test', we no longer need access to the target system once Configure is done. You can provide already-built binaries through the C<hostperl> and C<hostgenerate> options to Configure.
    • Additionally, if targeting an EBCDIC platform from an ASCII host, or viceversa, you'll need to run Configure with C<-Uhostgenerate>, to indicate that generate_uudmap should be run on the target.
    • Finally, there's also a way of having Configure end early, right after building the host binaries, by cross-compiling without specifying a C<targethost>.
    • The incompatible changes include no longer using xconfig.h, xlib, or Cross.pm, so canned config files and Makefiles will have to be updated.
    • =item *
    • Related to the above, there is now a way of specifying the location of sh (or equivalent) on the target system: C<targetsh>.
    • For example, Android has its sh in /system/bin/sh, so if cross-compiling from a more normal Unixy system with sh in /bin/sh, "targetsh" would end up as /system/bin/sh, and "sh" as /bin/sh.
    • =item *
    • By default, B<gcc> 4.9 does some optimizations that break perl. The B<-fwrapv> option disables those optimizations (and probably others), so for B<gcc> 4.3 and later (since the there might be similar problems lurking on older versions too, but B<-fwrapv> was broken before 4.3, and the optimizations probably won't go away), F<Configure> now adds B<-fwrapv> unless the user requests B<-fno-wrapv>, which disables B<-fwrapv>, or B<-fsanitize=undefined>, which turns the overflows B<-fwrapv> ignores into runtime errors.
  • L<perl #121505|https://rt.perl.org/Public/Bug/Display.html?id=121505>
    • =back
    • =head1 Testing
    • =over 4
    • =item *
    • The C<test.valgrind> make target now allows tests to be run in parallel. This target allows Perl's test suite to be run under Valgrind, which detects certain sorts of C programming errors, though at significant cost in running time. On suitable hardware, allowing parallel execution claws back a lot of that additional cost. [perl #121431]
    • =item *
    • Various tests in F<t/porting/> are no longer skipped when the perl F<.git> directory is outside the perl tree and pointed to by C<$GIT_DIR>. [perl #120505]
    • =item *
    • The test suite no longer fails when the user's interactive shell maintains a C<$PWD> environment variable, but the F</bin/sh> used for running tests doesn't.
    • =back
    • =head1 Platform Support
    • =head2 New Platforms
    • =over 4
    • =item Android
    • Perl can now be built for Android, either natively or through cross-compilation, for all three currently available architectures (ARM, MIPS, and x86), on a wide range of versions.
    • =item Bitrig
    • Compile support has been added for Bitrig, a fork of OpenBSD.
    • =item FreeMiNT
    • Support has been added for FreeMiNT, a free open-source OS for the Atari ST system and its successors, based on the original MiNT that was officially adopted by Atari.
    • =item Synology
    • Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ P1022 ppc - e500v2) not meant for workstations or development. These boxes should build now. The basic problems are the non-standard location for tools.
    • =back
    • =head2 Discontinued Platforms
    • =over 4
    • =item C<sfio>
    • Code related to supporting the C<sfio> I/O system has been removed.
    • Perl 5.004 added support to use the native API of C<sfio>, AT&T's Safe/Fast I/O library. This code still built with v5.8.0, albeit with many regression tests failing, but was inadvertently broken before the v5.8.1 release, meaning that it has not worked on any version of Perl released since then. In over a decade we have received no bug reports about this, hence it is clear that no-one is using this functionality on any version of Perl that is still supported to any degree.
    • =item AT&T 3b1
    • Configure support for the 3b1, also known as the AT&T Unix PC (and the similar AT&T 7300), has been removed.
    • =item DG/UX
    • DG/UX was a Unix sold by Data General. The last release was in April 2001. It only runs on Data General's own hardware.
    • =item EBCDIC
    • In the absence of a regular source of smoke reports, code intended to support native EBCDIC platforms will be removed from perl before 5.22.0.
    • =back
    • =head2 Platform-Specific Notes
    • =over 4
    • =item Cygwin
    • =over 4
    • =item *
    • recv() on a connected handle would populate the returned sender address with whatever happened to be in the working buffer. recv() now uses a workaround similar to the Win32 recv() wrapper and returns an empty string when recvfrom(2) doesn't modify the supplied address length. [perl #118843]
    • =item *
    • Fixed a build error in cygwin.c on Cygwin 1.7.28.
    • Tests now handle the errors that occur when C<cygserver> isn't running.
    • =back
    • =item GNU/Hurd
    • The BSD compatibility library C<libbsd> is no longer required for builds.
    • =item Linux
    • The hints file now looks for C<libgdbm_compat> only if C<libgdbm> itself is also wanted. The former is never useful without the latter, and in some circumstances, including it could actually prevent building.
    • =item Mac OS
    • The build system now honors an C<ld> setting supplied by the user running F<Configure>.
    • =item MidnightBSD
    • C<objformat> was removed from version 0.4-RELEASE of MidnightBSD and had been deprecated on earlier versions. This caused the build environment to be erroneously configured for C<a.out> rather than C<elf>. This has been now been corrected.
    • =item Mixed-endian platforms
    • The code supporting C<pack> and C<unpack> operations on mixed endian platforms has been removed. We believe that Perl has long been unable to build on mixed endian architectures (such as PDP-11s), so we don't think that this change will affect any platforms which were able to build v5.18.0.
    • =item VMS
    • =over 4
    • =item *
    • The C<PERL_ENV_TABLES> feature to control the population of %ENV at perl start-up was broken in Perl 5.16.0 but has now been fixed.
    • =item *
    • Skip access checks on remotes in opendir(). [perl #121002]
    • =item *
    • A check for glob metacharacters in a path returned by the L<C<glob()>|perlfunc/glob> operator has been replaced with a check for VMS wildcard characters. This saves a significant number of unnecessary L<C<lstat()>|perlfunc/lstat> calls such that some simple glob operations become 60-80% faster.
    • =back
    • =item Win32
    • =over 4
    • =item *
    • C<rename> and C<link> on Win32 now set $! to ENOSPC and EDQUOT when appropriate. [perl #119857]
    • =item *
    • The BUILD_STATIC and ALL_STATIC makefile options for linking some or (nearly) all extensions statically (into perl520.dll, and into a separate perl-static.exe too) were broken for MinGW builds. This has now been fixed.
    • The ALL_STATIC option has also been improved to include the Encode and Win32 extensions (for both VC++ and MinGW builds).
    • =item *
    • Support for building with Visual C++ 2013 has been added. There are currently two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which will hopefully be resolved soon.
    • =item *
    • Experimental support for building with Intel C++ Compiler has been added. The nmake makefile (win32/Makefile) and the dmake makefile (win32/makefile.mk) can be used. A "nmake test" will not pass at this time due to F<cpan/CGI/t/url.t>.
    • =item *
    • Killing a process tree with L<perlfunc/kill> and a negative signal, was broken starting in 5.18.0. In this bug, C<kill> always returned 0 for a negative signal even for valid PIDs, and no processes were terminated. This has been fixed [perl #121230].
    • =item *
    • The time taken to build perl on Windows has been reduced quite significantly (time savings in the region of 30-40% are typically seen) by reducing the number of, usually failing, I/O calls for each L<C<require()>|perlfunc/require> (for B<miniperl.exe> only).
  • L<perl #121119|https://rt.perl.org/Public/Bug/Display.html?id=121119>
    • =item *
    • About 15 minutes of idle sleeping was removed from running C<make test> due to a bug in which the timeout monitor used for tests could not be cancelled once the test completes, and the full timeout period elapsed before running the next test file.
  • L<perl #121395|https://rt.perl.org/Public/Bug/Display.html?id=121395>
    • =item *
    • On a perl built without pseudo-fork (pseudo-fork builds were not affected by this bug), killing a process tree with L<C<kill()>|perlfunc/kill> and a negative signal resulted in C<kill()> inverting the returned value. For example, if C<kill()> killed 1 process tree PID then it returned 0 instead of 1, and if C<kill()> was passed 2 invalid PIDs then it returned 2 instead of 0. This has probably been the case since the process tree kill feature was implemented on Win32. It has now been corrected to follow the documented behaviour.
  • L<perl #121230|https://rt.perl.org/Public/Bug/Display.html?id=121230>
    • =item *
    • When building a 64-bit perl, an uninitialized memory read in B<miniperl.exe>, used during the build process, could lead to a 4GB B<wperl.exe> being created. This has now been fixed. (Note that B<perl.exe> itself was unaffected, but obviously B<wperl.exe> would have been completely broken.)
  • L<perl #121471|https://rt.perl.org/Public/Bug/Display.html?id=121471>
    • =item *
    • Perl can now be built with B<gcc> version 4.8.1 from L<http://www.mingw.org>. This was previously broken due to an incorrect definition of DllMain() in one of perl's source files. Earlier B<gcc> versions were also affected when using

Changes for version 5.20.0

  • If you are upgrading from an earlier release such as 5.16.0, first read L<perl5180delta>, which describes differences between 5.16.0 and 5.18.0.
  • =head1 Core Enhancements
  • =head2 Experimental Subroutine signatures
  • Declarative syntax to unwrap argument list into lexical variables. C<sub foo ($a,$b) {...}> checks the number of arguments and puts the arguments into lexical variables. Signatures are not equivalent to the existing idiom of C<sub foo { my($a,$b) = @_; ... }>. Signatures are only available by enabling a non-default feature, and generate warnings about being experimental. The syntactic clash with prototypes is managed by disabling the short prototype syntax when signatures are enabled.
  • See L<perlsub/Signatures> for details.
  • =head2 C<sub>s now take a C<prototype> attribute
  • When declaring or defining a C<sub>, the prototype can now be specified inside of a C<prototype> attribute instead of in parens following the name.
  • For example, C<sub foo($$){}> could be rewritten as C<sub foo : prototype($$){}>.
  • =head2 More consistent prototype parsing
  • Multiple semicolons in subroutine prototypes have long been tolerated and treated as a single semicolon. There was one case where this did not happen. A subroutine whose prototype begins with "*" or ";*" can affect whether a bareword is considered a method name or sub call. This now applies also to ";;;*".
  • Whitespace has long been allowed inside subroutine prototypes, so C<sub( $ $ )> is equivalent to C<sub($$)>, but until now it was stripped when the subroutine was parsed. Hence, whitespace was I<not> allowed in prototypes set by C<Scalar::Util::set_prototype>. Now it is permitted, and the parser no longer strips whitespace. This means C<prototype &mysub> returns the original prototype, whitespace and all.
  • =head2 C<rand> now uses a consistent random number generator
  • Previously perl would use a platform specific random number generator, varying between the libc rand(), random() or drand48().
  • This meant that the quality of perl's random numbers would vary from platform to platform, from the 15 bits of rand() on Windows to 48-bits on POSIX platforms such as Linux with drand48().
  • Perl now uses its own internal drand48() implementation on all platforms. This does not make perl's C<rand> cryptographically secure. [perl #115928]
  • =head2 New slice syntax
  • The new C<%hash{...}> and C<%array[...]> syntax returns a list of key/value (or index/value) pairs. See L<perldata/"Key/Value Hash Slices">.
  • =head2 Experimental Postfix Dereferencing
  • When the C<postderef> feature is in effect, the following syntactical equivalencies are set up:
    • $sref->$*; # same as ${ $sref } # interpolates $aref->@*; # same as @{ $aref } # interpolates $href->%*; # same as %{ $href } $cref->&*; # same as &{ $cref } $gref->**; # same as *{ $gref }
    • $aref->$#*; # same as $#{ $aref }
    • $gref->*{ $slot }; # same as *{ $gref }{ $slot }
    • $aref->@[ ... ]; # same as @$aref[ ... ] # interpolates $href->@{ ... }; # same as @$href{ ... } # interpolates $aref->%[ ... ]; # same as %$aref[ ... ] $href->%{ ... }; # same as %$href{ ... }
  • Those marked as interpolating only interpolate if the associated C<postderef_qq> feature is also enabled. This feature is B<experimental> and will trigger C<experimental::postderef>-category warnings when used, unless they are suppressed.
  • For more information, consult L<the Postfix Dereference Syntax section of perlref|perlref/Postfix Dereference Syntax>.
  • =head2 Unicode 6.3 now supported
  • Perl now supports and is shipped with Unicode 6.3 (though Perl may be recompiled with any previous Unicode release as well). A detailed list of Unicode 6.3 changes is at L<http://www.unicode.org/versions/Unicode6.3.0/>.
  • =head2 New C<\p{Unicode}> regular expression pattern property
  • This is a synonym for C<\p{Any}> and matches the set of Unicode-defined code points 0 - 0x10FFFF.
  • =head2 Better 64-bit support
  • On 64-bit platforms, the internal array functions now use 64-bit offsets, allowing Perl arrays to hold more than 2**31 elements, if you have the memory available.
  • The regular expression engine now supports strings longer than 2**31 characters. [perl #112790, #116907]
  • The functions PerlIO_get_bufsiz, PerlIO_get_cnt, PerlIO_set_cnt and PerlIO_set_ptrcnt now have SSize_t, rather than int, return values and parameters.
  • =head2 C<S<use locale>> now works on UTF-8 locales
  • Until this release, only single-byte locales, such as the ISO 8859 series were supported. Now, the increasingly common multi-byte UTF-8 locales are also supported. A UTF-8 locale is one in which the character set is Unicode and the encoding is UTF-8. The POSIX C<LC_CTYPE> category operations (case changing (like C<lc()>, C<"\U">), and character classification (C<\w>, C<\D>, C<qr/[[:punct:]]/>)) under such a locale work just as if not under locale, but instead as if under C<S<use feature 'unicode_strings'>>, except taint rules are followed. Sorting remains by code point order in this release. [perl #56820].
  • =head2 C<S<use locale>> now compiles on systems without locale ability
  • Previously doing this caused the program to not compile. Within its scope the program behaves as if in the "C" locale. Thus programs written for platforms that support locales can run on locale-less platforms without change. Attempts to change the locale away from the "C" locale will, of course, fail.
  • =head2 More locale initialization fallback options
  • If there was an error with locales during Perl start-up, it immediately gave up and tried to use the C<"C"> locale. Now it first tries using other locales given by the environment variables, as detailed in L<perllocale/ENVIRONMENT>. For example, if C<LC_ALL> and C<LANG> are both set, and using the C<LC_ALL> locale fails, Perl will now try the C<LANG> locale, and only if that fails, will it fall back to C<"C">. On Windows machines, Perl will try, ahead of using C<"C">, the system default locale if all the locales given by environment variables fail.
  • =head2 C<-DL> runtime option now added for tracing locale setting
  • This is designed for Perl core developers to aid in field debugging bugs regarding locales.
  • =head2 B<-F> now implies B<-a> and B<-a> implies B<-n>
  • Previously B<-F> without B<-a> was a no-op, and B<-a> without B<-n> or B<-p> was a no-op, with this change, if you supply B<-F> then both B<-a> and B<-n> are implied and if you supply B<-a> then B<-n> is implied.
  • You can still use B<-p> for its extra behaviour. [perl #116190]
  • =head2 $a and $b warnings exemption
  • The special variables $a and $b, used in C<sort>, are now exempt from "used once" warnings, even where C<sort> is not used. This makes it easier for CPAN modules to provide functions using $a and $b for similar purposes.
  • perl #120462
    • =head1 Security
    • =head2 Avoid possible read of free()d memory during parsing
    • It was possible that free()d memory could be read during parsing in the unusual circumstance of the Perl program ending with a heredoc and the last line of the file on disk having no terminating newline character. This has now been fixed.
    • =head1 Incompatible Changes
    • =head2 C<do> can no longer be used to call subroutines
    • The C<do SUBROUTINE(LIST)> form has resulted in a deprecation warning since Perl v5.0.0, and is now a syntax error.
    • =head2 Quote-like escape changes
    • The character after C<\c> in a double-quoted string ("..." or qq(...)) or regular expression must now be a printable character and may not be C<{>.
    • A literal C<{> after C<\B> or C<\b> is now fatal.
    • These were deprecated in perl v5.14.0.
    • =head2 Tainting happens under more circumstances; now conforms to documentation
    • This affects regular expression matching and changing the case of a string (C<lc>, C<"\U">, I<etc>.) within the scope of C<use locale>. The result is now tainted based on the operation, no matter what the contents of the string were, as the documentation (L<perlsec>, L<perllocale/SECURITY>) indicates it should. Previously, for the case change operation, if the string contained no characters whose case change could be affected by the locale, the result would not be tainted. For example, the result of C<uc()> on an empty string or one containing only above-Latin1 code points is now tainted, and wasn't before. This leads to more consistent tainting results. Regular expression patterns taint their non-binary results (like C<$&>, C<$2>) if and only if the pattern contains elements whose matching depends on the current (potentially tainted) locale. Like the case changing functions, the actual contents of the string being matched now do not matter, whereas formerly it did. For example, if the pattern contains a C<\w>, the results will be tainted even if the match did not have to use that portion of the pattern to succeed or fail, because what a C<\w> matches depends on locale. However, for example, a C<.> in a pattern will not enable tainting, because the dot matches any single character, and what the current locale is doesn't change in any way what matches and what doesn't.
    • =head2 C<\p{}>, C<\P{}> matching has changed for non-Unicode code points.
    • C<\p{}> and C<\P{}> are defined by Unicode only on Unicode-defined code points (C<U+0000> through C<U+10FFFF>). Their behavior on matching these legal Unicode code points is unchanged, but there are changes for code points C<0x110000> and above. Previously, Perl treated the result of matching C<\p{}> and C<\P{}> against these as C<undef>, which translates into "false". For C<\P{}>, this was then complemented into "true". A warning was supposed to be raised when this happened. However, various optimizations could prevent the warning, and the results were often counter-intuitive, with both a match and its seeming complement being false. Now all non-Unicode code points are treated as typical unassigned Unicode code points. This generally is more Do-What-I-Mean. A warning is raised only if the results are arguably different from a strict Unicode approach, and from what Perl used to do. Code that needs to be strictly Unicode compliant can make this warning fatal, and then Perl always raises the warning.
    • Details are in L<perlunicode/Beyond Unicode code points>.
    • =head2 C<\p{All}> has been expanded to match all possible code points
    • The Perl-defined regular expression pattern element C<\p{All}>, unused on CPAN, used to match just the Unicode code points; now it matches all possible code points; that is, it is equivalent to C<qr/./s>. Thus C<\p{All}> is no longer synonymous with C<\p{Any}>, which continues to match just the Unicode code points, as Unicode says it should.
    • =head2 Data::Dumper's output may change
    • Depending on the data structures dumped and the settings set for Data::Dumper, the dumped output may have changed from previous versions.
    • If you have tests that depend on the exact output of Data::Dumper, they may fail.
    • To avoid this problem in your code, test against the data structure from evaluating the dumped structure, instead of the dump itself.
    • =head2 Locale decimal point character no longer leaks outside of S<C<use locale>> scope
    • This is actually a bug fix, but some code has come to rely on the bug being present, so this change is listed here. The current locale that the program is running under is not supposed to be visible to Perl code except within the scope of a S<C<use locale>>. However, until now under certain circumstances, the character used for a decimal point (often a comma) leaked outside the scope. If your code is affected by this change, simply add a S<C<use locale>>.
    • =head2 Assignments of Windows sockets error codes to $! now prefer F<errno.h> values over WSAGetLastError() values
    • In previous versions of Perl, Windows sockets error codes as returned by WSAGetLastError() were assigned to $!, and some constants such as ECONNABORTED, not in F<errno.h> in VC++ (or the various Windows ports of gcc) were defined to corresponding WSAE* values to allow $! to be tested against the E* constants exported by L<Errno> and L<POSIX>.
    • This worked well until VC++ 2010 and later, which introduced new E* constants with values E<gt> 100 into F<errno.h>, including some being (re)defined by perl to WSAE* values. That caused problems when linking XS code against other libraries which used the original definitions of F<errno.h> constants.
    • To avoid this incompatibility, perl now maps WSAE* error codes to E* values where possible, and assigns those values to $!. The E* constants exported by L<Errno> and L<POSIX> are updated to match so that testing $! against them, wherever previously possible, will continue to work as expected, and all E* constants found in F<errno.h> are now exported from those modules with their original F<errno.h> values.
    • In order to avoid breakage in existing Perl code which assigns WSAE* values to $!, perl now intercepts the assignment and performs the same mapping to E* values as it uses internally when assigning to $! itself.
    • However, one backwards-incompatibility remains: existing Perl code which compares $! against the numeric values of the WSAE* error codes that were previously assigned to $! will now be broken in those cases where a corresponding E* value has been assigned instead. This is only an issue for those E* values E<lt> 100, which were always exported from L<Errno> and L<POSIX> with their original F<errno.h> values, and therefore could not be used for WSAE* error code tests (e.g. WSAEINVAL is 10022, but the corresponding EINVAL is 22). (E* values E<gt> 100, if present, were redefined to WSAE* values anyway, so compatibility can be achieved by using the E* constants, which will work both before and after this change, albeit using different numeric values under the hood.)
    • =head2 Functions C<PerlIO_vsprintf> and C<PerlIO_sprintf> have been removed
    • These two functions, undocumented, unused in CPAN, and problematic, have been removed.
    • =head1 Deprecations
    • =head2 The C</\C/> character class
    • The C</\C/> regular expression character class is deprecated. From perl

Documentation

README for the Porting/ directory in the Perl 5 core distribution.
use git bisect to pinpoint changes
Check that all the URLs in the Perl source are valid
Check source code for ANSI-C violations
list of Perl release epigraphs
expand C macros using the C preprocessor
Annotate commits for perldelta
How to write a perldelta
Notes on handling the Perl Patch Pumpkin And Porting Perl
Releasing a new version of perl 5.x
Perl 5 release schedule
Sort warning and error messages in perldiag.pod
Perl TO-DO list
A post processor for make test.valgrind
autogenerated documentation for the perl public API
access Perl configuration information
lib
manipulate @INC at compile time
Dynamically load C libraries into Perl code
System errno constants
Group Perl's functions a la perlfunc.pod
Test Pod::Functions
convert .pod files to .html files
Test Pod::Html::anchorify()
the
Test HTML cross reference links
Test --htmldir feature
Test --htmldir feature
Test --htmldir feature
Test --htmldir feature
Test --htmldir feature
Test HTML links
Plain Old Documentation: format specification and notes
Perl predefined variables
converts a collection of POD pages to HTML format.
Namespace for Perl's core routines
The tests for Pod::InputObjects
Tests for Pod::Select.
Tests for Pod::Usage
the perl debugger
make patchnum
distribute ppport.h among extensions
The Perl 5 language interpreter
what's new for perl5.004
what's new for perl5.005
what is new for perl 5.10.0
what is new for perl v5.10.1
what is new for perl v5.12.0
what is new for perl v5.12.1
what is new for perl v5.12.2
what is new for perl v5.12.3
what is new for perl v5.12.4
what is new for perl v5.12.5
what is new for perl v5.14.0
what is new for perl v5.14.1
what is new for perl v5.14.2
what is new for perl v5.14.3
what is new for perl v5.14.4
what is new for perl v5.16.0
what is new for perl v5.16.1
what is new for perl v5.16.2
what is new for perl v5.16.3
what is new for perl v5.18.0
what is new for perl v5.18.1
what is new for perl v5.18.2
what's new for perl v5.6.1
what's new for perl v5.6.0
what is new for perl v5.8.1
what is new for perl v5.8.2
what is new for perl v5.8.3
what is new for perl v5.8.4
what is new for perl v5.8.5
what is new for perl v5.8.6
what is new for perl v5.8.7
what is new for perl v5.8.8
what is new for perl v5.8.9
what is new for perl v5.8.0
perl's IO abstraction interface.
the Perl Artistic License
Books about and related to Perl
Links to information on object-oriented programming in Perl
Links to information on object-oriented programming in Perl
Perl calling conventions from C
Perl 5 Cheat Sheet
Internal replacements for standard C library functions
a brief overview of the Perl community
Perl data types
Perl DBM Filters
Guts of Perl debugging
Perl debugging tutorial
Perl debugging
what is new for perl v5.20.0
various Perl diagnostics
Perl Data Structures Cookbook
Perl's support for DTrace
Considerations for running Perl on EBCDIC platforms
how to embed perl in your C program
A listing of experimental features in Perl
Source Filters
Perl's fork() emulation
Perl formats
Perl builtin functions
Detailed information about git and the Perl repository
the GNU General Public License, version 1
Introduction to the Perl API
How to hack on Perl
Tips for Perl core C code hacking
Walk through the creation of a simple C code patch
the Perl history records
An overview of the Perl interpreter
a brief introduction and overview of Perl
C API for Perl's implementation of IO in Layers.
Perl interprocess communication (signals, fifos, pipes, safe subprocesses, sockets, and semaphores)
Perl Lexical Warnings
Perl locale handling (internationalization and localization)
Manipulating Arrays of Arrays in Perl
Perl modules (packages and symbol tables)
Installing CPAN Modules
constructing new Perl modules and finding existing ones
Perl module style guide
Perl method resolution plugin interface
preparing a new module for distribution
semantics of numbers and numeric operations in Perl
Perl object reference
Object-Oriented Programming in Perl Tutorial
Perl operators and precedence
simple recipes for opening files and pipes in Perl
tutorial on pack and unpack
Perl Performance and Optimization Techniques
the Plain Old Documentation format
Plain Old Documentation: format specification and notes
Perl POD style guide
Various and sundry policies and commitments related to the Perl core
Writing portable Perl
how to write a user pragma
Perl regular expressions
Perl regular expression plugin interface
Perl Regular Expression Backslash Sequences and Escapes
Perl Regular Expression Character Classes
Perl references and nested data structures
Mark's very short tutorial about references
Description of the Perl regular expression engine.
Links to current information on the Perl source repository
Perl regular expressions quick start
Perl Regular Expressions Reference
Perl regular expressions tutorial
how to execute the Perl interpreter
Perl security
A guide to the Perl source tree
Perl style guide
Perl subroutines
Perl syntax
Tutorial on threads in Perl
how to hide an object class in a simple variable
Link to the Perl to-do list
Links to information on object-oriented programming in Perl
Links to information on object-oriented programming in Perl
Perl traps for the unwary
Unicode support in Perl
Perl Unicode FAQ
Perl Unicode introduction
Perl Unicode Tutorial
utilities packaged with the Perl distribution
Perl predefined variables
VMS-specific documentation for Perl
Perl pragma to enable new features
Generate C macros that match character classes efficiently
Perl pragma to control optional warnings
a C++ base class encapsulating a Perl interpreter in Symbian
a C++ utility class for Perl/Symbian
convert .h C header files to .ph Perl header files
convert .h C header files to Perl extensions
configure libnet
how to submit bug reports on Perl
Perl Installation Verification Procedure
Rough tool to translate Perl4 .pl files to Perl5 .pm modules.
a2p
Awk to Perl translator
translate find command lines to Perl code
a stream editor

Modules

functions for dealing with RFC3066-style language tags
detect the user's language preferences
tags and names for human languages
IO
load various IO modules
supply object methods for directory handles
supply object methods for filehandles
supply object methods for I/O handles
supply object methods for pipes
Object interface to system poll call
supply seek based methods for I/O objects
OO interface to the select system call
Object interface to socket communications
Object interface for AF_INET domain sockets
Object interface for AF_UNIX domain sockets
B
The Perl Compiler Backend
Walk Perl syntax tree, printing concise info about ops
Show lexical variables used in functions or files
Walk Perl syntax tree, printing terse info about ops
Generates cross reference reports for Perl programs
O
Generic interface to Perl Compiler backends
check optrees as rendered by B::Concise
A data debugging tool for the XS programmer
write the C code for perlmain.c
load the C Fcntl.h defines
DOS like globbing and then some
Traverse a directory tree.
Perl extension for BSD glob routine
keep more files open than the system permits
Perl5 access to the gdbm library.
Support for Inside-Out Classes
A selection of general-utility hash subroutines
query locale information
open a process for both reading and writing using open2()
open a process for reading, writing, and error handling using open3()
Tied access to ndbm files
Tied access to odbm files
Disable named opcodes when compiling perl code
ops
Perl pragma to restrict unsafe operations when compiling
Perl interface to IEEE Std 1003.1
encoding layer
Memory mapped IO
in-memory IO, scalar IO
Helper class for PerlIO layers implemented in perl
module to convert pod files to HTML
Tied access to sdbm files
Try every conceivable way to get hostname
Named regexp capture buffers
add data to hash when needed
Perl extension to manipulate DCL symbols
convert between VMS and Unix file specification syntax
standard I/O functions via VMS extensions
Win32 CORE function stubs
Test the perl C API
module to test the XS typemaps distributed with perl
Set indexing base via $[
get/set subroutine or variable attributes
mro
Method Resolution Order
re
Perl pragma to alter regular expression behaviour
Interfaces to some Haiku API Functions
provide framework for multiple DBMs
Perl compiler backend to produce perl code
benchmark running times of Perl code
declare struct-like datatypes as Perl classes
hash lookup of which core extensions were built.
DB
programmatic interface to the Perl debugging API
Filter DBM keys/values
filter for DBM_Filter
filter for DBM_Filter
filter for DBM_Filter
filter for DBM_Filter
filter for DBM_Filter
supply object methods for directory handles
use nice English (or awk) names for ugly punctuation variables
Utilities for embedding Perl in C/C++ applications
keep sets of symbol names palatable to the VMS linker
Parse file paths into directory, filename and suffix.
Compare files or filehandles
Copy files or filehandles
by-name interface to Perl's built-in stat() functions
supply object methods for filehandles
Locate directory of original perl script
by-name interface to Perl's built-in gethost*() functions
by-name interface to Perl's built-in getnet*() functions
by-name interface to Perl's built-in getproto*() functions
by-name interface to Perl's built-in getserv*() functions
On demand loader for PerlIO layers and root of PerlIO::* name space
save and restore selected file handle
manipulate Perl symbols and their names
Manipulate threads in Perl (for old code only)
base class for tied arrays
base class definitions for tied handles
base class definitions for tied handles
Fixed-table-size, fixed-key-length hashing
by-name interface to Perl's built-in gmtime() function
by-name interface to Perl's built-in localtime() function
internal object used by Time::gmtime and Time::localtime
base class for ALL classes (blessed references)
Unicode character database
by-name interface to Perl's built-in getgr*() functions
by-name interface to Perl's built-in getpw*() functions
Use MakeMaker's uninstalled version of a package
Perl pragma to force byte semantics rather than character semantics
access to Unicode character names and named character sequences; also define character names
Perl pragma for deprecating the core version of a module
Perl pragma to enable new features
Perl pragma to control the filetest permission operators
Perl pragma to use integer arithmetic instead of floating point
perl pragma to request less of something
Perl pragma to use or avoid POSIX locales for built-in operations
perl pragma to set default PerlIO layers for input and output
Package for overloading Perl operations
perl pragma to lexically control overloading
Perl pragma to enable simple signal handling
perl pragma to control sort() behaviour
Perl pragma to restrict unsafe constructs
Perl pragma to predeclare sub names
Perl pragma to enable/disable UTF-8 (or UTF-EBCDIC) in source code
Perl pragma to predeclare global variable names
Perl pragma to control VMS-specific language features
Perl pragma to control optional warnings
warnings import function
Perl access to extended attributes.
Perl extension for access to OS/2 setting database.
exports constants for system() call, and process control on OS2.
access to DLLs with REXX calling convention.
access to DLLs with REXX calling convention and REXX runtime.

Provides

in ext/B/B.pm
in ext/B/B.pm
in lib/Class/Struct.pm
in lib/perl5db/t/EnableModule.pm
in lib/Getopt/Std.pm
in symbian/ext/Moped/Msg/Msg.pm
in lib/perl5db/t/MyModule.pm
in os2/OS2/OS2-REXX/DLL/DLL.pm
in os2/OS2/OS2-PrfDB/PrfDB.pm
in os2/OS2/OS2-PrfDB/PrfDB.pm
in os2/OS2/OS2-REXX/REXX.pm
in os2/OS2/OS2-REXX/REXX.pm
in os2/OS2/OS2-REXX/REXX.pm
in os2/OS2/OS2-Process/Process.pm
in ext/POSIX/lib/POSIX.pm
in ext/POSIX/lib/POSIX.pm
in ext/POSIX/lib/POSIX.pm
in ext/Pod-Html/lib/Pod/Html.pm
in ext/File-Find/t/lib/Testing.pm
in lib/Tie/Hash.pm
in lib/DBM_Filter.pm
in lib/Tie/Hash.pm
in lib/Tie/Scalar.pm
in lib/Tie/Array.pm
in lib/Tie/Hash.pm
in lib/Tie/Scalar.pm
in ext/VMS-Stdio/Stdio.pm
in lib/diagnostics.pm
in lib/overload/numbers.pm
in ext/XS-APItest/t/BHK.pm
in ext/XS-APItest/t/Markers.pm