.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "PERL5200DELTA 1"
.TH PERL5200DELTA 1 2023-11-28 "perl v5.38.2" "Perl Programmers Reference Guide"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
perl5200delta \- what is new for perl v5.20.0
.SH DESCRIPTION
.IX Header "DESCRIPTION"
This document describes differences between the 5.18.0 release and the
5.20.0 release.
.PP
If you are upgrading from an earlier release such as 5.16.0, first read
perl5180delta, which describes differences between 5.16.0 and 5.18.0.
.SH "Core Enhancements"
.IX Header "Core Enhancements"
.SS "Experimental Subroutine signatures"
.IX Subsection "Experimental Subroutine signatures"
Declarative syntax to unwrap argument list into lexical variables.
\&\f(CW\*(C`sub foo ($a,$b) {...}\*(C'\fR checks the number of arguments and puts the
arguments into lexical variables. Signatures are not equivalent to
the existing idiom of \f(CW\*(C`sub foo { my($a,$b) = @_; ... }\*(C'\fR. 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.
.PP
See "Signatures" in perlsub for details.
.ie n .SS """sub""s now take a ""prototype"" attribute"
.el .SS "\f(CWsub\fPs now take a \f(CWprototype\fP attribute"
.IX Subsection "subs now take a prototype attribute"
When declaring or defining a \f(CW\*(C`sub\*(C'\fR, the prototype can now be specified inside
of a \f(CW\*(C`prototype\*(C'\fR attribute instead of in parens following the name.
.PP
For example, \f(CW\*(C`sub foo($$){}\*(C'\fR could be rewritten as
\&\f(CW\*(C`sub foo : prototype($$){}\*(C'\fR.
.SS "More consistent prototype parsing"
.IX Subsection "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 ";;;*".
.PP
Whitespace has long been allowed inside subroutine prototypes, so
\&\f(CW\*(C`sub( $ $ )\*(C'\fR is equivalent to \f(CWsub($$)\fR, but until now it was stripped
when the subroutine was parsed. Hence, whitespace was \fInot\fR allowed in
prototypes set by \f(CW\*(C`Scalar::Util::set_prototype\*(C'\fR. Now it is permitted,
and the parser no longer strips whitespace. This means
\&\f(CW\*(C`prototype &mysub\*(C'\fR returns the original prototype, whitespace and all.
.ie n .SS """rand"" now uses a consistent random number generator"
.el .SS "\f(CWrand\fP now uses a consistent random number generator"
.IX Subsection "rand now uses a consistent random number generator"
Previously perl would use a platform specific random number generator, varying
between the libc \fBrand()\fR, \fBrandom()\fR or \fBdrand48()\fR.
.PP
This meant that the quality of perl's random numbers would vary from platform
to platform, from the 15 bits of \fBrand()\fR on Windows to 48\-bits on POSIX
platforms such as Linux with \fBdrand48()\fR.
.PP
Perl now uses its own internal \fBdrand48()\fR implementation on all platforms. This
does not make perl's \f(CW\*(C`rand\*(C'\fR cryptographically secure. [perl #115928]
.SS "New slice syntax"
.IX Subsection "New slice syntax"
The new \f(CW%hash{...}\fR and \f(CW%array[...]\fR syntax returns a list of key/value (or
index/value) pairs. See "Key/Value Hash Slices" in perldata.
.SS "Experimental Postfix Dereferencing"
.IX Subsection "Experimental Postfix Dereferencing"
When the \f(CW\*(C`postderef\*(C'\fR feature is in effect, the following syntactical
equivalencies are set up:
.PP
.Vb 5
\& $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{ ... }
.Ve
.PP
Those marked as interpolating only interpolate if the associated
\&\f(CW\*(C`postderef_qq\*(C'\fR feature is also enabled. This feature is \fBexperimental\fR and
will trigger \f(CW\*(C`experimental::postderef\*(C'\fR\-category warnings when used, unless
they are suppressed.
.PP
For more information, consult the Postfix Dereference Syntax section of
perlref.
.SS "Unicode 6.3 now supported"
.IX Subsection "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 .
.ie n .SS "New ""\ep{Unicode}"" regular expression pattern property"
.el .SS "New \f(CW\ep{Unicode}\fP regular expression pattern property"
.IX Subsection "New p{Unicode} regular expression pattern property"
This is a synonym for \f(CW\*(C`\ep{Any}\*(C'\fR and matches the set of Unicode-defined
code points 0 \- 0x10FFFF.
.SS "Better 64\-bit support"
.IX Subsection "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.
.PP
The regular expression engine now supports strings longer than 2**31
characters. [perl #112790, #116907]
.PP
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.
.ie n .SS """use\ locale"" now works on UTF\-8 locales"
.el .SS "\f(CWuse\ locale\fP now works on UTF\-8 locales"
.IX Subsection "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
\&\f(CW\*(C`LC_CTYPE\*(C'\fR category operations (case changing (like \f(CWlc()\fR, \f(CW"\eU"\fR),
and character classification (\f(CW\*(C`\ew\*(C'\fR, \f(CW\*(C`\eD\*(C'\fR, \f(CW\*(C`qr/[[:punct:]]/\*(C'\fR)) under
such a locale work just as if not under locale, but instead as if under
\&\f(CW\*(C`use\ feature\ \*(Aqunicode_strings\*(Aq\*(C'\fR, except taint rules are followed.
Sorting remains by code point order in this release. [perl #56820].
.ie n .SS """use\ locale"" now compiles on systems without locale ability"
.el .SS "\f(CWuse\ locale\fP now compiles on systems without locale ability"
.IX Subsection "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.
.SS "More locale initialization fallback options"
.IX Subsection "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 \f(CW"C"\fR locale. Now it first tries using
other locales given by the environment variables, as detailed in
"ENVIRONMENT" in perllocale. For example, if \f(CW\*(C`LC_ALL\*(C'\fR and \f(CW\*(C`LANG\*(C'\fR are
both set, and using the \f(CW\*(C`LC_ALL\*(C'\fR locale fails, Perl will now try the
\&\f(CW\*(C`LANG\*(C'\fR locale, and only if that fails, will it fall back to \f(CW"C"\fR. On
Windows machines, Perl will try, ahead of using \f(CW"C"\fR, the system
default locale if all the locales given by environment variables fail.
.ie n .SS """\-DL"" runtime option now added for tracing locale setting"
.el .SS "\f(CW\-DL\fP runtime option now added for tracing locale setting"
.IX Subsection "-DL runtime option now added for tracing locale setting"
This is designed for Perl core developers to aid in field debugging bugs
regarding locales.
.SS "\fB\-F\fP now implies \fB\-a\fP and \fB\-a\fP implies \fB\-n\fP"
.IX Subsection "-F now implies -a and -a implies -n"
Previously \fB\-F\fR without \fB\-a\fR was a no-op, and \fB\-a\fR without \fB\-n\fR or \fB\-p\fR
was a no-op, with this change, if you supply \fB\-F\fR then both \fB\-a\fR and \fB\-n\fR
are implied and if you supply \fB\-a\fR then \fB\-n\fR is implied.
.PP
You can still use \fB\-p\fR for its extra behaviour. [perl #116190]
.ie n .SS "$a and $b warnings exemption"
.el .SS "\f(CW$a\fP and \f(CW$b\fP warnings exemption"
.IX Subsection "$a and $b warnings exemption"
The special variables \f(CW$a\fR and \f(CW$b\fR, used in \f(CW\*(C`sort\*(C'\fR, are now exempt from "used
once" warnings, even where \f(CW\*(C`sort\*(C'\fR is not used. This makes it easier for
CPAN modules to provide functions using \f(CW$a\fR and \f(CW$b\fR for similar purposes.
[perl #120462]
.SH Security
.IX Header "Security"
.SS "Avoid possible read of \fBfree()\fPd memory during parsing"
.IX Subsection "Avoid possible read of free()d memory during parsing"
It was possible that \fBfree()\fRd 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.
.SH "Incompatible Changes"
.IX Header "Incompatible Changes"
.ie n .SS """do"" can no longer be used to call subroutines"
.el .SS "\f(CWdo\fP can no longer be used to call subroutines"
.IX Subsection "do can no longer be used to call subroutines"
The \f(CW\*(C`do SUBROUTINE(LIST)\*(C'\fR form has resulted in a deprecation warning
since Perl v5.0.0, and is now a syntax error.
.SS "Quote-like escape changes"
.IX Subsection "Quote-like escape changes"
The character after \f(CW\*(C`\ec\*(C'\fR in a double-quoted string ("..." or qq(...))
or regular expression must now be a printable character and may not be
\&\f(CW\*(C`{\*(C'\fR.
.PP
A literal \f(CW\*(C`{\*(C'\fR after \f(CW\*(C`\eB\*(C'\fR or \f(CW\*(C`\eb\*(C'\fR is now fatal.
.PP
These were deprecated in perl v5.14.0.
.SS "Tainting happens under more circumstances; now conforms to documentation"
.IX Subsection "Tainting happens under more circumstances; now conforms to documentation"
This affects regular expression matching and changing the case of a
string (\f(CW\*(C`lc\*(C'\fR, \f(CW"\eU"\fR, \fIetc\fR.) within the scope of \f(CW\*(C`use locale\*(C'\fR.
The result is now tainted based on the operation, no matter what the
contents of the string were, as the documentation (perlsec,
"SECURITY" in perllocale) 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 \f(CWuc()\fR 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 \f(CW$&\fR, \f(CW$2\fR) 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 \f(CW\*(C`\ew\*(C'\fR, 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 \f(CW\*(C`\ew\*(C'\fR matches
depends on locale. However, for example, a \f(CW\*(C`.\*(C'\fR 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.
.ie n .SS """\ep{}"", ""\eP{}"" matching has changed for non-Unicode code points."
.el .SS "\f(CW\ep{}\fP, \f(CW\eP{}\fP matching has changed for non-Unicode code points."
.IX Subsection "p{}, P{} matching has changed for non-Unicode code points."
\&\f(CW\*(C`\ep{}\*(C'\fR and \f(CW\*(C`\eP{}\*(C'\fR are defined by Unicode only on Unicode-defined code
points (\f(CW\*(C`U+0000\*(C'\fR through \f(CW\*(C`U+10FFFF\*(C'\fR). Their behavior on matching
these legal Unicode code points is unchanged, but there are changes for
code points \f(CW0x110000\fR and above. Previously, Perl treated the result
of matching \f(CW\*(C`\ep{}\*(C'\fR and \f(CW\*(C`\eP{}\*(C'\fR against these as \f(CW\*(C`undef\*(C'\fR, which
translates into "false". For \f(CW\*(C`\eP{}\*(C'\fR, 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.
.PP
Details are in "Beyond Unicode code points" in perlunicode.
.ie n .SS """\ep{All}"" has been expanded to match all possible code points"
.el .SS "\f(CW\ep{All}\fP has been expanded to match all possible code points"
.IX Subsection "p{All} has been expanded to match all possible code points"
The Perl-defined regular expression pattern element \f(CW\*(C`\ep{All}\*(C'\fR, unused
on CPAN, used to match just the Unicode code points; now it matches all
possible code points; that is, it is equivalent to \f(CW\*(C`qr/./s\*(C'\fR. Thus
\&\f(CW\*(C`\ep{All}\*(C'\fR is no longer synonymous with \f(CW\*(C`\ep{Any}\*(C'\fR, which continues to
match just the Unicode code points, as Unicode says it should.
.SS "Data::Dumper's output may change"
.IX Subsection "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.
.PP
If you have tests that depend on the exact output of Data::Dumper,
they may fail.
.PP
To avoid this problem in your code, test against the data structure
from evaluating the dumped structure, instead of the dump itself.
.ie n .SS "Locale decimal point character no longer leaks outside of ""use\ locale"" scope"
.el .SS "Locale decimal point character no longer leaks outside of \f(CWuse\ locale\fP scope"
.IX Subsection "Locale decimal point character no longer leaks outside of 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 \f(CW\*(C`use\ locale\*(C'\fR. 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 \f(CW\*(C`use\ locale\*(C'\fR.
.SS "Assignments of Windows sockets error codes to $! now prefer \fIerrno.h\fP values over \fBWSAGetLastError()\fP values"
.IX Subsection "Assignments of Windows sockets error codes to $! now prefer errno.h values over WSAGetLastError() values"
In previous versions of Perl, Windows sockets error codes as returned by
\&\fBWSAGetLastError()\fR were assigned to $!, and some constants such as ECONNABORTED,
not in \fIerrno.h\fR 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 Errno and POSIX.
.PP
This worked well until VC++ 2010 and later, which introduced new E* constants
with values > 100 into \fIerrno.h\fR, 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 \fIerrno.h\fR constants.
.PP
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
Errno and 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 \fIerrno.h\fR are now exported from those modules with their
original \fIerrno.h\fR values.
.PP
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.
.PP
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 < 100, which were always exported from Errno and
POSIX with their original \fIerrno.h\fR 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 > 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.)
.ie n .SS "Functions ""PerlIO_vsprintf"" and ""PerlIO_sprintf"" have been removed"
.el .SS "Functions \f(CWPerlIO_vsprintf\fP and \f(CWPerlIO_sprintf\fP have been removed"
.IX Subsection "Functions PerlIO_vsprintf and PerlIO_sprintf have been removed"
These two functions, undocumented, unused in CPAN, and problematic, have been
removed.
.SH Deprecations
.IX Header "Deprecations"
.ie n .SS "The ""/\eC/"" character class"
.el .SS "The \f(CW/\eC/\fP character class"
.IX Subsection "The /C/ character class"
The \f(CW\*(C`/\eC/\*(C'\fR regular expression character class is deprecated. From perl
5.22 onwards it will generate a warning, and from perl 5.24 onwards it
will be a regular expression compiler error. If you need to examine the
individual bytes that make up a UTF8\-encoded character, then use
\&\f(CWutf8::encode()\fR on the string (or a copy) first.
.SS "Literal control characters in variable names"
.IX Subsection "Literal control characters in variable names"
This deprecation affects things like $\ecT, where \ecT is a literal control (such
as a \f(CW\*(C`NAK\*(C'\fR or \f(CW\*(C`NEGATIVE ACKNOWLEDGE\*(C'\fR character) in
the source code. Surprisingly, it appears that originally this was intended as
the canonical way of accessing variables like $^T, with the caret form only
being added as an alternative.
.PP
The literal control form is being deprecated for two main reasons. It has what
are likely unfixable bugs, such as $\ecI not working as an alias for $^I, and
their usage not being portable to non-ASCII platforms: While $^T will work
everywhere, \ecT is whitespace in EBCDIC. [perl #119123]
.ie n .SS "References to non-integers and non-positive integers in $/"
.el .SS "References to non-integers and non-positive integers in \f(CW$/\fP"
.IX Subsection "References to non-integers and non-positive integers in $/"
Setting \f(CW$/\fR to a reference to zero or a reference to a negative integer is
now deprecated, and will behave \fBexactly\fR as though it was set to \f(CW\*(C`undef\*(C'\fR.
If you want slurp behavior set \f(CW$/\fR to \f(CW\*(C`undef\*(C'\fR explicitly.
.PP
Setting \f(CW$/\fR to a reference to a non integer is now forbidden and will
throw an error. Perl has never documented what would happen in this
context and while it used to behave the same as setting \f(CW$/\fR to
the address of the references in future it may behave differently, so we
have forbidden this usage.
.SS "Character matching routines in POSIX"
.IX Subsection "Character matching routines in POSIX"
Use of any of these functions in the \f(CW\*(C`POSIX\*(C'\fR module is now deprecated:
\&\f(CW\*(C`isalnum\*(C'\fR, \f(CW\*(C`isalpha\*(C'\fR, \f(CW\*(C`iscntrl\*(C'\fR, \f(CW\*(C`isdigit\*(C'\fR, \f(CW\*(C`isgraph\*(C'\fR, \f(CW\*(C`islower\*(C'\fR,
\&\f(CW\*(C`isprint\*(C'\fR, \f(CW\*(C`ispunct\*(C'\fR, \f(CW\*(C`isspace\*(C'\fR, \f(CW\*(C`isupper\*(C'\fR, and \f(CW\*(C`isxdigit\*(C'\fR. The
functions are buggy and don't work on UTF\-8 encoded strings. See their
entries in POSIX for more information.
.PP
A warning is raised on the first call to any of them from each place in
the code that they are called. (Hence a repeated statement in a loop
will raise just the one warning.)
.SS "Interpreter-based threads are now \fIdiscouraged\fP"
.IX Subsection "Interpreter-based threads are now discouraged"
The "interpreter-based threads" provided by Perl are not the fast, lightweight
system for multitasking that one might expect or hope for. Threads are
implemented in a way that make them easy to misuse. Few people know how to
use them correctly or will be able to provide help.
.PP
The use of interpreter-based threads in perl is officially
discouraged.
.SS "Module removals"
.IX Subsection "Module removals"
The following modules will be removed from the core distribution in a
future release, and will at that time need to be installed from CPAN.
Distributions on CPAN which require these modules will need to list them as
prerequisites.
.PP
The core versions of these modules will now issue \f(CW"deprecated"\fR\-category
warnings to alert you to this fact. To silence these deprecation warnings,
install the modules in question from CPAN.
.PP
Note that the planned removal of these modules from core does not reflect a
judgement about the quality of the code and should not be taken as a suggestion
that their use be halted. Their disinclusion from core primarily hinges on
their necessity to bootstrapping a fully functional, CPAN-capable Perl
installation, not on concerns over their design.
.IP "CGI and its associated CGI:: packages" 4
.IX Item "CGI and its associated CGI:: packages"
.PD 0
.IP inc::latest 4
.IX Item "inc::latest"
.IP Package::Constants 4
.IX Item "Package::Constants"
.IP "Module::Build and its associated Module::Build:: packages" 4
.IX Item "Module::Build and its associated Module::Build:: packages"
.PD
.SS "Utility removals"
.IX Subsection "Utility removals"
The following utilities will be removed from the core distribution in a
future release, and will at that time need to be installed from CPAN.
.IP find2perl 4
.IX Item "find2perl"
.PD 0
.IP s2p 4
.IX Item "s2p"
.IP a2p 4
.IX Item "a2p"
.PD
.SH "Performance Enhancements"
.IX Header "Performance Enhancements"
.IP \(bu 4
Perl has a new copy-on-write mechanism that avoids the need to copy the
internal string buffer when assigning from one scalar to another. This
makes copying large strings appear much faster. Modifying one of the two
(or more) strings after an assignment will force a copy internally. This
makes it unnecessary to pass strings by reference for efficiency.
.Sp
This feature was already available in 5.18.0, but wasn't enabled by
default. It is the default now, and so you no longer need build perl with
the \fIConfigure\fR argument:
.Sp
.Vb 1
\& \-Accflags=\-DPERL_NEW_COPY_ON_WRITE
.Ve
.Sp
It can be disabled (for now) in a perl build with:
.Sp
.Vb 1
\& \-Accflags=\-DPERL_NO_COW
.Ve
.Sp
On some operating systems Perl can be compiled in such a way that any
attempt to modify string buffers shared by multiple SVs will crash. This
way XS authors can test that their modules handle copy-on-write scalars
correctly. See "Copy on Write" in perlguts for detail.
.IP \(bu 4
Perl has an optimizer for regular expression patterns. It analyzes the pattern
to find things such as the minimum length a string has to be to match, etc. It
now better handles code points that are above the Latin1 range.
.IP \(bu 4
Executing a regex that contains the \f(CW\*(C`^\*(C'\fR anchor (or its variant under the
\&\f(CW\*(C`/m\*(C'\fR flag) has been made much faster in several situations.
.IP \(bu 4
Precomputed hash values are now used in more places during method lookup.
.IP \(bu 4
Constant hash key lookups (\f(CW$hash{key}\fR as opposed to \f(CW$hash{$key}\fR) have
long had the internal hash value computed at compile time, to speed up
lookup. This optimisation has only now been applied to hash slices as
well.
.IP \(bu 4
Combined \f(CW\*(C`and\*(C'\fR and \f(CW\*(C`or\*(C'\fR operators in void context, like those
generated for \f(CW\*(C`unless ($a && $b)\*(C'\fR and \f(CW\*(C`if ($a || b)\*(C'\fR now
short circuit directly to the end of the statement. [perl #120128]
.IP \(bu 4
In certain situations, when \f(CW\*(C`return\*(C'\fR is the last statement in a subroutine's
main scope, it will be optimized out. This means code like:
.Sp
.Vb 1
\& sub baz { return $cat; }
.Ve
.Sp
will now behave like:
.Sp
.Vb 1
\& sub baz { $cat; }
.Ve
.Sp
which is notably faster.
.Sp
[perl #120765]
.IP \(bu 4
Code like:
.Sp
.Vb 2
\& my $x; # or @x, %x
\& my $y;
.Ve
.Sp
is now optimized to:
.Sp
.Vb 1
\& my ($x, $y);
.Ve
.Sp
In combination with the padrange optimization introduced in
v5.18.0, this means longer uninitialized my
variable statements are also optimized, so:
.Sp
.Vb 1
\& my $x; my @y; my %z;
.Ve
.Sp
becomes:
.Sp
.Vb 1
\& my ($x, @y, %z);
.Ve
.Sp
[perl #121077]
.IP \(bu 4
The creation of certain sorts of lists, including array and hash slices, is now
faster.
.IP \(bu 4
The optimisation for arrays indexed with a small constant integer is now
applied for integers in the range \-128..127, rather than 0..255. This should
speed up Perl code using expressions like \f(CW$x[\-1]\fR, at the expense of
(presumably much rarer) code using expressions like \f(CW$x[200]\fR.
.IP \(bu 4
The first iteration over a large hash (using \f(CW\*(C`keys\*(C'\fR or \f(CW\*(C`each\*(C'\fR) is now
faster. This is achieved by preallocating the hash's internal iterator
state, rather than lazily creating it when the hash is first iterated. (For
small hashes, the iterator is still created only when first needed. The
assumption is that small hashes are more likely to be used as objects, and
therefore never allocated. For large hashes, that's less likely to be true,
and the cost of allocating the iterator is swamped by the cost of allocating
space for the hash itself.)
.IP \(bu 4
When doing a global regex match on a string that came from the \f(CW\*(C`readline\*(C'\fR
or \f(CW\*(C`<>\*(C'\fR operator, the data is no longer copied unnecessarily.
[perl #121259]
.IP \(bu 4
Dereferencing (as in \f(CW\*(C`$obj\->[0]\*(C'\fR or \f(CW\*(C`$obj\->{k}\*(C'\fR) is now faster
when \f(CW$obj\fR is an instance of a class that has overloaded methods, but
doesn't overload any of the dereferencing methods \f(CW\*(C`@{}\*(C'\fR, \f(CW\*(C`%{}\*(C'\fR, and so on.
.IP \(bu 4
Perl's optimiser no longer skips optimising code that follows certain
\&\f(CW\*(C`eval {}\*(C'\fR expressions (including those with an apparent infinite loop).
.IP \(bu 4
The implementation now does a better job of avoiding meaningless work at
runtime. Internal effect-free "null" operations (created as a side-effect of
parsing Perl programs) are normally deleted during compilation. That
deletion is now applied in some situations that weren't previously handled.
.IP \(bu 4
Perl now does less disk I/O when dealing with Unicode properties that cover
up to three ranges of consecutive code points.
.SH "Modules and Pragmata"
.IX Header "Modules and Pragmata"
.SS "New Modules and Pragmata"
.IX Subsection "New Modules and Pragmata"
.IP \(bu 4
experimental 0.007 has been added to the Perl core.
.IP \(bu 4
IO::Socket::IP 0.29 has been added to the Perl core.
.SS "Updated Modules and Pragmata"
.IX Subsection "Updated Modules and Pragmata"
.IP \(bu 4
Archive::Tar has been upgraded from version 1.90 to 1.96.
.IP \(bu 4
arybase has been upgraded from version 0.06 to 0.07.
.IP \(bu 4
Attribute::Handlers has been upgraded from version 0.94 to 0.96.
.IP \(bu 4
attributes has been upgraded from version 0.21 to 0.22.
.IP \(bu 4
autodie has been upgraded from version 2.13 to 2.23.
.IP \(bu 4
AutoLoader has been upgraded from version 5.73 to 5.74.
.IP \(bu 4
autouse has been upgraded from version 1.07 to 1.08.
.IP \(bu 4
B has been upgraded from version 1.42 to 1.48.
.IP \(bu 4
B::Concise has been upgraded from version 0.95 to 0.992.
.IP \(bu 4
B::Debug has been upgraded from version 1.18 to 1.19.
.IP \(bu 4
B::Deparse has been upgraded from version 1.20 to 1.26.
.IP \(bu 4
base has been upgraded from version 2.18 to 2.22.
.IP \(bu 4
Benchmark has been upgraded from version 1.15 to 1.18.
.IP \(bu 4
bignum has been upgraded from version 0.33 to 0.37.
.IP \(bu 4
Carp has been upgraded from version 1.29 to 1.3301.
.IP \(bu 4
CGI has been upgraded from version 3.63 to 3.65.
NOTE: CGI is deprecated and may be removed from a future version of Perl.
.IP \(bu 4
charnames has been upgraded from version 1.36 to 1.40.
.IP \(bu 4
Class::Struct has been upgraded from version 0.64 to 0.65.
.IP \(bu 4
Compress::Raw::Bzip2 has been upgraded from version 2.060 to 2.064.
.IP \(bu 4
Compress::Raw::Zlib has been upgraded from version 2.060 to 2.065.
.IP \(bu 4
Config::Perl::V has been upgraded from version 0.17 to 0.20.
.IP \(bu 4
constant has been upgraded from version 1.27 to 1.31.
.IP \(bu 4
CPAN has been upgraded from version 2.00 to 2.05.
.IP \(bu 4
CPAN::Meta has been upgraded from version 2.120921 to 2.140640.
.IP \(bu 4
CPAN::Meta::Requirements has been upgraded from version 2.122 to 2.125.
.IP \(bu 4
CPAN::Meta::YAML has been upgraded from version 0.008 to 0.012.
.IP \(bu 4
Data::Dumper has been upgraded from version 2.145 to 2.151.
.IP \(bu 4
DB has been upgraded from version 1.04 to 1.07.
.IP \(bu 4
DB_File has been upgraded from version 1.827 to 1.831.
.IP \(bu 4
DBM_Filter has been upgraded from version 0.05 to 0.06.
.IP \(bu 4
deprecate has been upgraded from version 0.02 to 0.03.
.IP \(bu 4
Devel::Peek has been upgraded from version 1.11 to 1.16.
.IP \(bu 4
Devel::PPPort has been upgraded from version 3.20 to 3.21.
.IP \(bu 4
diagnostics has been upgraded from version 1.31 to 1.34.
.IP \(bu 4
Digest::MD5 has been upgraded from version 2.52 to 2.53.
.IP \(bu 4
Digest::SHA has been upgraded from version 5.84 to 5.88.
.IP \(bu 4
DynaLoader has been upgraded from version 1.18 to 1.25.
.IP \(bu 4
Encode has been upgraded from version 2.49 to 2.60.
.IP \(bu 4
encoding has been upgraded from version 2.6_01 to 2.12.
.IP \(bu 4
English has been upgraded from version 1.06 to 1.09.
.Sp
\&\f(CW$OLD_PERL_VERSION\fR was added as an alias of \f(CW$]\fR.
.IP \(bu 4
Errno has been upgraded from version 1.18 to 1.20_03.
.IP \(bu 4
Exporter has been upgraded from version 5.68 to 5.70.
.IP \(bu 4
ExtUtils::CBuilder has been upgraded from version 0.280210 to 0.280216.
.IP \(bu 4
ExtUtils::Command has been upgraded from version 1.17 to 1.18.
.IP \(bu 4
ExtUtils::Embed has been upgraded from version 1.30 to 1.32.
.IP \(bu 4
ExtUtils::Install has been upgraded from version 1.59 to 1.67.
.IP \(bu 4
ExtUtils::MakeMaker has been upgraded from version 6.66 to 6.98.
.IP \(bu 4
ExtUtils::Miniperl has been upgraded from version to 1.01.
.IP \(bu 4
ExtUtils::ParseXS has been upgraded from version 3.18 to 3.24.
.IP \(bu 4
ExtUtils::Typemaps has been upgraded from version 3.19 to 3.24.
.IP \(bu 4
ExtUtils::XSSymSet has been upgraded from version 1.2 to 1.3.
.IP \(bu 4
feature has been upgraded from version 1.32 to 1.36.
.IP \(bu 4
fields has been upgraded from version 2.16 to 2.17.
.IP \(bu 4
File::Basename has been upgraded from version 2.84 to 2.85.
.IP \(bu 4
File::Copy has been upgraded from version 2.26 to 2.29.
.IP \(bu 4
File::DosGlob has been upgraded from version 1.10 to 1.12.
.IP \(bu 4
File::Fetch has been upgraded from version 0.38 to 0.48.
.IP \(bu 4
File::Find has been upgraded from version 1.23 to 1.27.
.IP \(bu 4
File::Glob has been upgraded from version 1.20 to 1.23.
.IP \(bu 4
File::Spec has been upgraded from version 3.40 to 3.47.
.IP \(bu 4
File::Temp has been upgraded from version 0.23 to 0.2304.
.IP \(bu 4
FileCache has been upgraded from version 1.08 to 1.09.
.IP \(bu 4
Filter::Simple has been upgraded from version 0.89 to 0.91.
.IP \(bu 4
Filter::Util::Call has been upgraded from version 1.45 to 1.49.
.IP \(bu 4
Getopt::Long has been upgraded from version 2.39 to 2.42.
.IP \(bu 4
Getopt::Std has been upgraded from version 1.07 to 1.10.
.IP \(bu 4
Hash::Util::FieldHash has been upgraded from version 1.10 to 1.15.
.IP \(bu 4
HTTP::Tiny has been upgraded from version 0.025 to 0.043.
.IP \(bu 4
I18N::Langinfo has been upgraded from version 0.10 to 0.11.
.IP \(bu 4
I18N::LangTags has been upgraded from version 0.39 to 0.40.
.IP \(bu 4
if has been upgraded from version 0.0602 to 0.0603.
.IP \(bu 4
inc::latest has been upgraded from version 0.4003 to 0.4205.
NOTE: inc::latest is deprecated and may be removed from a future version of Perl.
.IP \(bu 4
integer has been upgraded from version 1.00 to 1.01.
.IP \(bu 4
IO has been upgraded from version 1.28 to 1.31.
.IP \(bu 4
IO::Compress::Gzip and friends have been upgraded from version 2.060 to
2.064.
.IP \(bu 4
IPC::Cmd has been upgraded from version 0.80 to 0.92.
.IP \(bu 4
IPC::Open3 has been upgraded from version 1.13 to 1.16.
.IP \(bu 4
IPC::SysV has been upgraded from version 2.03 to 2.04.
.IP \(bu 4
JSON::PP has been upgraded from version 2.27202 to 2.27203.
.IP \(bu 4
List::Util has been upgraded from version 1.27 to 1.38.
.IP \(bu 4
locale has been upgraded from version 1.02 to 1.03.
.IP \(bu 4
Locale::Codes has been upgraded from version 3.25 to 3.30.
.IP \(bu 4
Locale::Maketext has been upgraded from version 1.23 to 1.25.
.IP \(bu 4
Math::BigInt has been upgraded from version 1.9991 to 1.9993.
.IP \(bu 4
Math::BigInt::FastCalc has been upgraded from version 0.30 to 0.31.
.IP \(bu 4
Math::BigRat has been upgraded from version 0.2604 to 0.2606.
.IP \(bu 4
MIME::Base64 has been upgraded from version 3.13 to 3.14.
.IP \(bu 4
Module::Build has been upgraded from version 0.4003 to 0.4205.
NOTE: Module::Build is deprecated and may be removed from a future version of Perl.
.IP \(bu 4
Module::CoreList has been upgraded from version 2.89 to 3.10.
.IP \(bu 4
Module::Load has been upgraded from version 0.24 to 0.32.
.IP \(bu 4
Module::Load::Conditional has been upgraded from version 0.54 to 0.62.
.IP \(bu 4
Module::Metadata has been upgraded from version 1.000011 to 1.000019.
.IP \(bu 4
mro has been upgraded from version 1.11 to 1.16.
.IP \(bu 4
Net::Ping has been upgraded from version 2.41 to 2.43.
.IP \(bu 4
Opcode has been upgraded from version 1.25 to 1.27.
.IP \(bu 4
Package::Constants has been upgraded from version 0.02 to 0.04.
NOTE: Package::Constants is deprecated and may be removed from a future version of Perl.
.IP \(bu 4
Params::Check has been upgraded from version 0.36 to 0.38.
.IP \(bu 4
parent has been upgraded from version 0.225 to 0.228.
.IP \(bu 4
Parse::CPAN::Meta has been upgraded from version 1.4404 to 1.4414.
.IP \(bu 4
Perl::OSType has been upgraded from version 1.003 to 1.007.
.IP \(bu 4
perlfaq has been upgraded from version 5.0150042 to 5.0150044.
.IP \(bu 4
PerlIO has been upgraded from version 1.07 to 1.09.
.IP \(bu 4
PerlIO::encoding has been upgraded from version 0.16 to 0.18.
.IP \(bu 4
PerlIO::scalar has been upgraded from version 0.16 to 0.18.
.IP \(bu 4
PerlIO::via has been upgraded from version 0.12 to 0.14.
.IP \(bu 4
Pod::Escapes has been upgraded from version 1.04 to 1.06.
.IP \(bu 4
Pod::Functions has been upgraded from version 1.06 to 1.08.
.IP \(bu 4
Pod::Html has been upgraded from version 1.18 to 1.21.
.IP \(bu 4
Pod::Parser has been upgraded from version 1.60 to 1.62.
.IP \(bu 4
Pod::Perldoc has been upgraded from version 3.19 to 3.23.
.IP \(bu 4
Pod::Usage has been upgraded from version 1.61 to 1.63.
.IP \(bu 4
POSIX has been upgraded from version 1.32 to 1.38_03.
.IP \(bu 4
re has been upgraded from version 0.23 to 0.26.
.IP \(bu 4
Safe has been upgraded from version 2.35 to 2.37.
.IP \(bu 4
Scalar::Util has been upgraded from version 1.27 to 1.38.
.IP \(bu 4
SDBM_File has been upgraded from version 1.09 to 1.11.
.IP \(bu 4
Socket has been upgraded from version 2.009 to 2.013.
.IP \(bu 4
Storable has been upgraded from version 2.41 to 2.49.
.IP \(bu 4
strict has been upgraded from version 1.07 to 1.08.
.IP \(bu 4
subs has been upgraded from version 1.01 to 1.02.
.IP \(bu 4
Sys::Hostname has been upgraded from version 1.17 to 1.18.
.IP \(bu 4
Sys::Syslog has been upgraded from version 0.32 to 0.33.
.IP \(bu 4
Term::Cap has been upgraded from version 1.13 to 1.15.
.IP \(bu 4
Term::ReadLine has been upgraded from version 1.12 to 1.14.
.IP \(bu 4
Test::Harness has been upgraded from version 3.26 to 3.30.
.IP \(bu 4
Test::Simple has been upgraded from version 0.98 to 1.001002.
.IP \(bu 4
Text::ParseWords has been upgraded from version 3.28 to 3.29.
.IP \(bu 4
Text::Tabs has been upgraded from version 2012.0818 to 2013.0523.
.IP \(bu 4
Text::Wrap has been upgraded from version 2012.0818 to 2013.0523.
.IP \(bu 4
Thread has been upgraded from version 3.02 to 3.04.
.IP \(bu 4
Thread::Queue has been upgraded from version 3.02 to 3.05.
.IP \(bu 4
threads has been upgraded from version 1.86 to 1.93.
.IP \(bu 4
threads::shared has been upgraded from version 1.43 to 1.46.
.IP \(bu 4
Tie::Array has been upgraded from version 1.05 to 1.06.
.IP \(bu 4
Tie::File has been upgraded from version 0.99 to 1.00.
.IP \(bu 4
Tie::Hash has been upgraded from version 1.04 to 1.05.
.IP \(bu 4
Tie::Scalar has been upgraded from version 1.02 to 1.03.
.IP \(bu 4
Tie::StdHandle has been upgraded from version 4.3 to 4.4.
.IP \(bu 4
Time::HiRes has been upgraded from version 1.9725 to 1.9726.
.IP \(bu 4
Time::Piece has been upgraded from version 1.20_01 to 1.27.
.IP \(bu 4
Unicode::Collate has been upgraded from version 0.97 to 1.04.
.IP \(bu 4
Unicode::Normalize has been upgraded from version 1.16 to 1.17.
.IP \(bu 4
Unicode::UCD has been upgraded from version 0.51 to 0.57.
.IP \(bu 4
utf8 has been upgraded from version 1.10 to 1.13.
.IP \(bu 4
version has been upgraded from version 0.9902 to 0.9908.
.IP \(bu 4
vmsish has been upgraded from version 1.03 to 1.04.
.IP \(bu 4
warnings has been upgraded from version 1.18 to 1.23.
.IP \(bu 4
Win32 has been upgraded from version 0.47 to 0.49.
.IP \(bu 4
XS::Typemap has been upgraded from version 0.10 to 0.13.
.IP \(bu 4
XSLoader has been upgraded from version 0.16 to 0.17.
.SH Documentation
.IX Header "Documentation"
.SS "New Documentation"
.IX Subsection "New Documentation"
\fIperlrepository\fR
.IX Subsection "perlrepository"
.PP
This document was removed (actually, renamed perlgit and given a major
overhaul) in Perl v5.14, causing Perl documentation websites to show the now
out of date version in Perl v5.12 as the latest version. It has now been
restored in stub form, directing readers to current information.
.SS "Changes to Existing Documentation"
.IX Subsection "Changes to Existing Documentation"
\fIperldata\fR
.IX Subsection "perldata"
.IP \(bu 4
New sections have been added to document the new index/value array slice and
key/value hash slice syntax.
.PP
\fIperldebguts\fR
.IX Subsection "perldebguts"
.IP \(bu 4
The \f(CW\*(C`DB::goto\*(C'\fR and \f(CW\*(C`DB::lsub\*(C'\fR debugger subroutines are now documented. [perl
#77680]
.PP
\fIperlexperiment\fR
.IX Subsection "perlexperiment"
.IP \(bu 4
\&\f(CW\*(C`\es\*(C'\fR matching \f(CW\*(C`\ecK\*(C'\fR is marked experimental.
.IP \(bu 4
ithreads were accepted in v5.8.0 (but are discouraged as of v5.20.0).
.IP \(bu 4
Long doubles are not considered experimental.
.IP \(bu 4
Code in regular expressions, regular expression backtracking verbs,
and lvalue subroutines are no longer listed as experimental. (This
also affects perlre and perlsub.)
.PP
\fIperlfunc\fR
.IX Subsection "perlfunc"
.IP \(bu 4
\&\f(CW\*(C`chop\*(C'\fR and \f(CW\*(C`chomp\*(C'\fR now note that they can reset the hash iterator.
.IP \(bu 4
\&\f(CW\*(C`exec\*(C'\fR's handling of arguments is now more clearly documented.
.IP \(bu 4
\&\f(CW\*(C`eval EXPR\*(C'\fR now has caveats about expanding floating point numbers in some
locales.
.IP \(bu 4
\&\f(CW\*(C`goto EXPR\*(C'\fR is now documented to handle an expression that evaluates to a
code reference as if it was \f(CW\*(C`goto &$coderef\*(C'\fR. This behavior is at least ten
years old.
.IP \(bu 4
Since Perl v5.10, it has been possible for subroutines in \f(CW@INC\fR to return
a reference to a scalar holding initial source code to prepend to the file.
This is now documented.
.IP \(bu 4
The documentation of \f(CW\*(C`ref\*(C'\fR has been updated to recommend the use of
\&\f(CW\*(C`blessed\*(C'\fR, \f(CW\*(C`isa\*(C'\fR and \f(CW\*(C`reftype\*(C'\fR when dealing with references to blessed
objects.
.PP
\fIperlguts\fR
.IX Subsection "perlguts"
.IP \(bu 4
Numerous minor changes have been made to reflect changes made to the perl
internals in this release.
.IP \(bu 4
New sections on Read-Only Values and
Copy on Write have been added.
.PP
\fIperlhack\fR
.IX Subsection "perlhack"
.IP \(bu 4
The Super Quick Patch Guide section has
been updated.
.PP
\fIperlhacktips\fR
.IX Subsection "perlhacktips"
.IP \(bu 4
The documentation has been updated to include some more examples of \f(CW\*(C`gdb\*(C'\fR
usage.
.PP
\fIperllexwarn\fR
.IX Subsection "perllexwarn"
.IP \(bu 4
The perllexwarn documentation used to describe the hierarchy of warning
categories understood by the warnings pragma. That description has now
been moved to the warnings documentation itself, leaving perllexwarn
as a stub that points to it. This change consolidates all documentation for
lexical warnings in a single place.
.PP
\fIperllocale\fR
.IX Subsection "perllocale"
.IP \(bu 4
The documentation now mentions \fR\f(BIfc()\fR\fI\fR and \f(CW\*(C`\eF\*(C'\fR, and includes many
clarifications and corrections in general.
.PP
\fIperlop\fR
.IX Subsection "perlop"
.IP \(bu 4
The language design of Perl has always called for monomorphic operators.
This is now mentioned explicitly.
.PP
\fIperlopentut\fR
.IX Subsection "perlopentut"
.IP \(bu 4
The \f(CW\*(C`open\*(C'\fR tutorial has been completely rewritten by Tom Christiansen, and now
focuses on covering only the basics, rather than providing a comprehensive
reference to all things openable. This rewrite came as the result of a
vigorous discussion on perl5\-porters kicked off by a set of improvements
written by Alexander Hartmaier to the existing perlopentut. A "more than
you ever wanted to know about \f(CW\*(C`open\*(C'\fR" document may follow in subsequent
versions of perl.
.PP
\fIperlre\fR
.IX Subsection "perlre"
.IP \(bu 4
The fact that the regexp engine makes no effort to call (?{}) and (??{})
constructs any specified number of times (although it will basically DWIM
in case of a successful match) has been documented.
.IP \(bu 4
The \f(CW\*(C`/r\*(C'\fR modifier (for non-destructive substitution) is now documented. [perl
#119151]
.IP \(bu 4
The documentation for \f(CW\*(C`/x\*(C'\fR and \f(CW\*(C`(?# comment)\*(C'\fR has been expanded and clarified.
.PP
\fIperlreguts\fR
.IX Subsection "perlreguts"
.IP \(bu 4
The documentation has been updated in the light of recent changes to
\&\fIregcomp.c\fR.
.PP
\fIperlsub\fR
.IX Subsection "perlsub"
.IP \(bu 4
The need to predeclare recursive functions with prototypes in order for the
prototype to be honoured in the recursive call is now documented. [perl #2726]
.IP \(bu 4
A list of subroutine names used by the perl implementation is now included.
[perl #77680]
.PP
\fIperltrap\fR
.IX Subsection "perltrap"
.IP \(bu 4
There is now a JavaScript section.
.PP
\fIperlunicode\fR
.IX Subsection "perlunicode"
.IP \(bu 4
The documentation has been updated to reflect \f(CW\*(C`Bidi_Class\*(C'\fR changes in
Unicode 6.3.
.PP
\fIperlvar\fR
.IX Subsection "perlvar"
.IP \(bu 4
A new section explaining the performance issues of $`, $& and $', including
workarounds and changes in different versions of Perl, has been added.
.IP \(bu 4
Three English variable names which have long been documented but do not
actually exist have been removed from the documentation. These were
\&\f(CW$OLD_PERL_VERSION\fR, \f(CW$OFMT\fR, and \f(CW$ARRAY_BASE\fR.
.Sp
(Actually, \f(CW\*(C`OLD_PERL_VERSION\*(C'\fR \fIdoes\fR exist, starting with this revision, but
remained undocumented until perl 5.22.0.)
.PP
\fIperlxs\fR
.IX Subsection "perlxs"
.IP \(bu 4
Several problems in the \f(CW\*(C`MY_CXT\*(C'\fR example have been fixed.
.SH Diagnostics
.IX Header "Diagnostics"
The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see perldiag.
.SS "New Diagnostics"
.IX Subsection "New Diagnostics"
\fINew Errors\fR
.IX Subsection "New Errors"
.IP \(bu 4
delete argument is index/value array slice, use array slice
.Sp
(F) You used index/value array slice syntax (\f(CW%array[...]\fR) as the argument to
\&\f(CW\*(C`delete\*(C'\fR. You probably meant \f(CW@array[...]\fR with an @ symbol instead.
.IP \(bu 4
delete argument is key/value hash slice, use hash slice
.Sp
(F) You used key/value hash slice syntax (\f(CW%hash{...}\fR) as the argument to
\&\f(CW\*(C`delete\*(C'\fR. You probably meant \f(CW@hash{...}\fR with an @ symbol instead.
.IP \(bu 4
Magical list constants are not supported
.Sp
(F) You assigned a magical array to a stash element, and then tried to use the
subroutine from the same slot. You are asking Perl to do something it cannot
do, details subject to change between Perl versions.
.IP \(bu 4
Added Setting $/ to a \f(CW%s\fR reference is forbidden
.PP
\fINew Warnings\fR
.IX Subsection "New Warnings"
.IP \(bu 4
\&\f(CW%s\fR on reference is experimental:
.Sp
The "auto-deref" feature is experimental.
.Sp
Starting in v5.14.0, it was possible to use push, pop, keys, and other
built-in functions not only on aggregate types, but on references to
them. The feature was not deployed to its original intended
specification, and now may become redundant to postfix dereferencing.
It has always been categorized as an experimental feature, and in
v5.20.0 is carries a warning as such.
.Sp
Warnings will now be issued at compile time when these operations are
detected.
.Sp
.Vb 1
\& no if $] >= 5.01908, warnings => "experimental::autoderef";
.Ve
.Sp
Consider, though, replacing the use of these features, as they may
change behavior again before becoming stable.
.IP \(bu 4
A sequence of multiple spaces in a charnames alias definition is deprecated
.Sp
Trailing white-space in a charnames alias definition is deprecated
.Sp
These two deprecation warnings involving \f(CW\*(C`\eN{...}\*(C'\fR were incorrectly
implemented. They did not warn by default (now they do) and could not be
made fatal via \f(CW\*(C`use warnings FATAL => \*(Aqdeprecated\*(Aq\*(C'\fR (now they can).
.IP \(bu 4
Attribute prototype(%s) discards earlier prototype attribute in same sub
.Sp
(W misc) A sub was declared as \f(CW\*(C`sub foo : prototype(A) : prototype(B) {}\*(C'\fR, for
example. Since each sub can only have one prototype, the earlier
declaration(s) are discarded while the last one is applied.
.IP \(bu 4
Invalid \e0 character in \f(CW%s\fR for \f(CW%s:\fR \f(CW%s\fR\e0%s
.Sp
(W syscalls) Embedded \e0 characters in pathnames or other system call arguments
produce a warning as of 5.20. The parts after the \e0 were formerly ignored by
system calls.
.IP \(bu 4
Matched non-Unicode code point 0x%X against Unicode property; may not be portable.
.Sp
This replaces the message "Code point 0x%X is not Unicode, all \ep{} matches
fail; all \eP{} matches succeed".
.IP \(bu 4
Missing ']' in prototype for \f(CW%s\fR : \f(CW%s\fR
.Sp
(W illegalproto) A grouping was started with \f(CW\*(C`[\*(C'\fR but never closed with \f(CW\*(C`]\*(C'\fR.
.IP \(bu 4
Possible precedence issue with control flow operator
.Sp
(W syntax) There is a possible problem with the mixing of a control flow
operator (e.g. \f(CW\*(C`return\*(C'\fR) and a low-precedence operator like \f(CW\*(C`or\*(C'\fR. Consider:
.Sp
.Vb 1
\& sub { return $a or $b; }
.Ve
.Sp
This is parsed as:
.Sp
.Vb 1
\& sub { (return $a) or $b; }
.Ve
.Sp
Which is effectively just:
.Sp
.Vb 1
\& sub { return $a; }
.Ve
.Sp
Either use parentheses or the high-precedence variant of the operator.
.Sp
Note this may be also triggered for constructs like:
.Sp
.Vb 1
\& sub { 1 if die; }
.Ve
.IP \(bu 4
Postfix dereference is experimental
.Sp
(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:
.Sp
.Vb 6
\& no warnings "experimental::postderef";
\& use feature "postderef", "postderef_qq";
\& $ref\->$*;
\& $aref\->@*;
\& $aref\->@[@indices];
\& ... etc ...
.Ve
.IP \(bu 4
Prototype '%s' overridden by attribute 'prototype(%s)' in \f(CW%s\fR
.Sp
(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.
.IP \(bu 4
Scalar value @%s[%s] better written as $%s[%s]
.Sp
(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 \f(CW$foo[&bar]\fR always
behaves like a scalar, both in the value it returns and when evaluating its
argument, while \f(CW%foo[&bar]\fR 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 \f(CW&bar\fR returns) in addition to
the value.
.IP \(bu 4
Scalar value @%s{%s} better written as $%s{%s}
.Sp
(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 \f(CW$foo{&bar}\fR always
behaves like a scalar, both in the value it returns and when evaluating its
argument, while \f(CW@foo{&bar}\fR 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.
.IP \(bu 4
Setting $/ to a reference to \f(CW%s\fR as a form of slurp is deprecated, treating as undef
.IP \(bu 4
Unexpected exit \f(CW%u\fR
.Sp
(S) \fBexit()\fR was called or the script otherwise finished gracefully when
\&\f(CW\*(C`PERL_EXIT_WARN\*(C'\fR was set in \f(CW\*(C`PL_exit_flags\*(C'\fR.
.IP \(bu 4
Unexpected exit failure \f(CW%d\fR
.Sp
(S) An uncaught \fBdie()\fR was called when \f(CW\*(C`PERL_EXIT_WARN\*(C'\fR was set in
\&\f(CW\*(C`PL_exit_flags\*(C'\fR.
.IP \(bu 4
Use of literal control characters in variable names is deprecated
.Sp
(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 $\ecT, where \ecT is a control (like a \f(CW\*(C`SOH\*(C'\fR) in the
source code: ${"\ecT"} and $^T remain valid.
.IP \(bu 4
Useless use of greediness modifier
.Sp
This fixes [Perl #42957].
.SS "Changes to Existing Diagnostics"
.IX Subsection "Changes to Existing Diagnostics"
.IP \(bu 4
Warnings and errors from the regexp engine are now UTF\-8 clean.
.IP \(bu 4
The "Unknown switch condition" error message has some slight changes. This
error triggers when there is an unknown condition in a \f(CW\*(C`(?(foo))\*(C'\fR conditional.
The error message used to read:
.Sp
.Vb 1
\& Unknown switch condition (?(%s in regex;
.Ve
.Sp
But what \f(CW%s\fR could be was mostly up to luck. For \f(CW\*(C`(?(foobar))\*(C'\fR, you might have
seen "fo" or "f". For Unicode characters, you would generally get a corrupted
string. The message has been changed to read:
.Sp
.Vb 1
\& Unknown switch condition (?(...)) in regex;
.Ve
.Sp
Additionally, the \f(CW\*(Aq<\-\- HERE\*(Aq\fR marker in the error will now point to the
correct spot in the regex.
.IP \(bu 4
The "%s "\ex%X" does not map to Unicode" warning is now correctly listed as a
severe warning rather than as a fatal error.
.IP \(bu 4
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.
.IP \(bu 4
"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].
.IP \(bu 4
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.
.IP \(bu 4
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/
.Sp
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].
.IP \(bu 4
%%s[%s] in scalar context better written as $%s[%s]
.Sp
This warning now occurs for any \f(CW%array[$index]\fR or \f(CW%hash{key}\fR known to
be in scalar context at compile time. Previously it was worded "Scalar
value %%s[%s] better written as $%s[%s]".
.IP \(bu 4
Switch condition not recognized in regex; marked by <\-\- HERE in m/%s/:
.Sp
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.
.IP \(bu 4
The error messages for \f(CWmy($a?$b$c)\fR and \f(CWmy(do{})\fR now mention "conditional
expression" and "do block", respectively, instead of reading 'Can't declare
null operation in "my"'.
.IP \(bu 4
When \f(CW\*(C`use re "debug"\*(C'\fR executes a regex containing a backreference, the
debugging output now shows what string is being matched.
.IP \(bu 4
The now fatal error message \f(CW\*(C`Character following "\ec" must be ASCII\*(C'\fR has been
reworded as \f(CW\*(C`Character following "\ec" must be printable ASCII\*(C'\fR to emphasize
that in \f(CW\*(C`\ec\fR\f(CIX\fR\f(CW\*(C'\fR, \fIX\fR must be a \fIprintable (non-control)\fR ASCII character.
.SH "Utility Changes"
.IX Header "Utility Changes"
\fIa2p\fR
.IX Subsection "a2p"
.IP \(bu 4
A possible crash from an off-by-one error when trying to access before the
beginning of a buffer has been fixed. [perl #120244]
.PP
\fIbisect.pl\fR
.IX Subsection "bisect.pl"
.PP
The git bisection tool \fIPorting/bisect.pl\fR has had many enhancements.
.PP
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 \f(CW\*(C`git bisect\*(C'\fR easy to use.
.IP \(bu 4
Can optionally run the test case with a timeout.
.IP \(bu 4
Can now run in-place in a clean git checkout.
.IP \(bu 4
Can run the test case under \f(CW\*(C`valgrind\*(C'\fR.
.IP \(bu 4
Can apply user supplied patches and fixes to the source checkout before
building.
.IP \(bu 4
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.
.PP
\fIfind2perl\fR
.IX Subsection "find2perl"
.IP \(bu 4
find2perl now handles \f(CW\*(C`?\*(C'\fR wildcards correctly. [perl #113054]
.PP
\fIperlbug\fR
.IX Subsection "perlbug"
.IP \(bu 4
\&\fIperlbug\fR now has a \f(CW\*(C`\-p\*(C'\fR option for attaching patches with a bug report.
.IP \(bu 4
perlbug has been modified to supply the report template with CRLF line
endings on Windows.
[GH #13612]
.IP \(bu 4
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.
.SH "Configuration and Compilation"
.IX Header "Configuration and Compilation"
.IP \(bu 4
The \fIMakefile.PL\fR for SDBM_File now generates a better \fIMakefile\fR, 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.
.IP \(bu 4
\&\fIinstallperl\fR and \fIinstallman\fR's option handling has been refactored to use
Getopt::Long. Both are used by the \fIMakefile\fR \f(CW\*(C`install\*(C'\fR targets, and
are not installed, so these changes are only likely to affect custom
installation scripts.
.RS 4
.IP \(bu 4
Single letter options now also have long names.
.IP \(bu 4
Invalid options are now rejected.
.IP \(bu 4
Command line arguments that are not options are now rejected.
.IP \(bu 4
Each now has a \f(CW\*(C`\-\-help\*(C'\fR option to display the usage message.
.RE
.RS 4
.Sp
The behaviour for all valid documented invocations is unchanged.
.RE
.IP \(bu 4
Where possible, the build now avoids recursive invocations of \fImake\fR when
building pure-Perl extensions, without removing any parallelism from the
build. Currently around 80 extensions can be processed directly by the
\&\fImake_ext.pl\fR tool, meaning that 80 invocations of \fImake\fR and 160
invocations of \fIminiperl\fR are no longer made.
.IP \(bu 4
The build system now works correctly when compiling under GCC or Clang with
link-time optimization enabled (the \f(CW\*(C`\-flto\*(C'\fR option). [perl #113022]
.IP \(bu 4
Distinct library basenames with \f(CW\*(C`d_libname_unique\*(C'\fR.
.Sp
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.
.IP \(bu 4
\&\f(CW\*(C`sysroot\*(C'\fR option to indicate the logical root directory under gcc and clang.
.Sp
When building with this option set, both Configure and the compilers search
for all headers and libraries under this new sysroot, instead of /.
.Sp
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.
.IP \(bu 4
The cross-compilation model has been renovated.
There's several new options, and some backwards-incompatible changes:
.Sp
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 \f(CW\*(C`hostperl\*(C'\fR and
\&\f(CW\*(C`hostgenerate\*(C'\fR options to Configure.
.Sp
Additionally, if targeting an EBCDIC platform from an ASCII host,
or viceversa, you'll need to run Configure with \f(CW\*(C`\-Uhostgenerate\*(C'\fR, to
indicate that generate_uudmap should be run on the target.
.Sp
Finally, there's also a way of having Configure end early, right after
building the host binaries, by cross-compiling without specifying a
\&\f(CW\*(C`targethost\*(C'\fR.
.Sp
The incompatible changes include no longer using xconfig.h, xlib, or
Cross.pm, so canned config files and Makefiles will have to be updated.
.IP \(bu 4
Related to the above, there is now a way of specifying the location of sh
(or equivalent) on the target system: \f(CW\*(C`targetsh\*(C'\fR.
.Sp
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.
.IP \(bu 4
By default, \fBgcc\fR 4.9 does some optimizations that break perl. The \fB\-fwrapv\fR
option disables those optimizations (and probably others), so for \fBgcc\fR 4.3
and later (since the there might be similar problems lurking on older versions
too, but \fB\-fwrapv\fR was broken before 4.3, and the optimizations probably won't
go away), \fIConfigure\fR now adds \fB\-fwrapv\fR unless the user requests
\&\fB\-fno\-wrapv\fR, which disables \fB\-fwrapv\fR, or \fB\-fsanitize=undefined\fR, which
turns the overflows \fB\-fwrapv\fR ignores into runtime errors.
[GH #13690]
.SH Testing
.IX Header "Testing"
.IP \(bu 4
The \f(CW\*(C`test.valgrind\*(C'\fR 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]
.IP \(bu 4
Various tests in \fIt/porting/\fR are no longer skipped when the perl
\&\fI.git\fR directory is outside the perl tree and pointed to by
\&\f(CW$GIT_DIR\fR. [perl #120505]
.IP \(bu 4
The test suite no longer fails when the user's interactive shell maintains a
\&\f(CW$PWD\fR environment variable, but the \fI/bin/sh\fR used for running tests
doesn't.
.SH "Platform Support"
.IX Header "Platform Support"
.SS "New Platforms"
.IX Subsection "New Platforms"
.IP Android 4
.IX 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.
.IP Bitrig 4
.IX Item "Bitrig"
Compile support has been added for Bitrig, a fork of OpenBSD.
.IP FreeMiNT 4
.IX 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.
.IP Synology 4
.IX 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.
.SS "Discontinued Platforms"
.IX Subsection "Discontinued Platforms"
.ie n .IP """sfio""" 4
.el .IP \f(CWsfio\fR 4
.IX Item "sfio"
Code related to supporting the \f(CW\*(C`sfio\*(C'\fR I/O system has been removed.
.Sp
Perl 5.004 added support to use the native API of \f(CW\*(C`sfio\*(C'\fR, 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.
.IP "AT&T 3b1" 4
.IX 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.
.IP DG/UX 4
.IX 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.
.IP EBCDIC 4
.IX 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.
.SS "Platform-Specific Notes"
.IX Subsection "Platform-Specific Notes"
.IP Cygwin 4
.IX Item "Cygwin"
.RS 4
.PD 0
.IP \(bu 4
.PD
\&\fBrecv()\fR on a connected handle would populate the returned sender
address with whatever happened to be in the working buffer. \fBrecv()\fR
now uses a workaround similar to the Win32 \fBrecv()\fR wrapper and returns
an empty string when \fBrecvfrom\fR\|(2) doesn't modify the supplied address
length. [perl #118843]
.IP \(bu 4
Fixed a build error in cygwin.c on Cygwin 1.7.28.
.Sp
Tests now handle the errors that occur when \f(CW\*(C`cygserver\*(C'\fR isn't
running.
.RE
.RS 4
.RE
.IP GNU/Hurd 4
.IX Item "GNU/Hurd"
The BSD compatibility library \f(CW\*(C`libbsd\*(C'\fR is no longer required for builds.
.IP Linux 4
.IX Item "Linux"
The hints file now looks for \f(CW\*(C`libgdbm_compat\*(C'\fR only if \f(CW\*(C`libgdbm\*(C'\fR itself is
also wanted. The former is never useful without the latter, and in some
circumstances, including it could actually prevent building.
.IP "Mac OS" 4
.IX Item "Mac OS"
The build system now honors an \f(CW\*(C`ld\*(C'\fR setting supplied by the user running
\&\fIConfigure\fR.
.IP MidnightBSD 4
.IX Item "MidnightBSD"
\&\f(CW\*(C`objformat\*(C'\fR 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 \f(CW\*(C`a.out\*(C'\fR rather than \f(CW\*(C`elf\*(C'\fR. This has been now
been corrected.
.IP "Mixed-endian platforms" 4
.IX Item "Mixed-endian platforms"
The code supporting \f(CW\*(C`pack\*(C'\fR and \f(CW\*(C`unpack\*(C'\fR 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.
.IP VMS 4
.IX Item "VMS"
.RS 4
.PD 0
.IP \(bu 4
.PD
The \f(CW\*(C`PERL_ENV_TABLES\*(C'\fR feature to control the population of \f(CW%ENV\fR at perl
start-up was broken in Perl 5.16.0 but has now been fixed.
.IP \(bu 4
Skip access checks on remotes in \fBopendir()\fR. [perl #121002]
.IP \(bu 4
A check for glob metacharacters in a path returned by the
\&\f(CWglob()\fR operator has been replaced with a check for VMS
wildcard characters. This saves a significant number of unnecessary
\&\f(CWlstat()\fR calls such that some simple glob operations become
60\-80% faster.
.RE
.RS 4
.RE
.IP Win32 4
.IX Item "Win32"
.RS 4
.PD 0
.IP \(bu 4
.PD
\&\f(CW\*(C`rename\*(C'\fR and \f(CW\*(C`link\*(C'\fR on Win32 now set $! to ENOSPC and EDQUOT when
appropriate. [perl #119857]
.IP \(bu 4
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.
.Sp
The ALL_STATIC option has also been improved to include the Encode and Win32
extensions (for both VC++ and MinGW builds).
.IP \(bu 4
Support for building with Visual C++ 2013 has been added. There are currently
two possible test failures (see "Testing Perl on Windows" in perlwin32) which
will hopefully be resolved soon.
.IP \(bu 4
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 \fIcpan/CGI/t/url.t\fR.
.IP \(bu 4
Killing a process tree with "kill" in perlfunc and a negative signal, was broken
starting in 5.18.0. In this bug, \f(CW\*(C`kill\*(C'\fR always returned 0 for a negative
signal even for valid PIDs, and no processes were terminated. This has been
fixed [perl #121230].
.IP \(bu 4
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 \f(CWrequire()\fR
(for \fBminiperl.exe\fR only).
[GH #13566]
.IP \(bu 4
About 15 minutes of idle sleeping was removed from running \f(CW\*(C`make test\*(C'\fR 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.
[GH #13647]
.IP \(bu 4
On a perl built without pseudo-fork (pseudo-fork builds were not affected by
this bug), killing a process tree with \f(CWkill()\fR and a negative
signal resulted in \f(CWkill()\fR inverting the returned value. For example, if
\&\f(CWkill()\fR killed 1 process tree PID then it returned 0 instead of 1, and if
\&\f(CWkill()\fR 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.
[GH #13595]
.IP \(bu 4
When building a 64\-bit perl, an uninitialized memory read in \fBminiperl.exe\fR,
used during the build process, could lead to a 4GB \fBwperl.exe\fR being created.
This has now been fixed. (Note that \fBperl.exe\fR itself was unaffected, but
obviously \fBwperl.exe\fR would have been completely broken.)
[GH #13677]
.IP \(bu 4
Perl can now be built with \fBgcc\fR version 4.8.1 from .
This was previously broken due to an incorrect definition of \fBDllMain()\fR in one
of perl's source files. Earlier \fBgcc\fR versions were also affected when using
version 4 of the w32api package. Versions of \fBgcc\fR available from
were not affected.
[GH #13733]
.IP \(bu 4
The test harness now has no failures when perl is built on a FAT drive with the
Windows OS on an NTFS drive.
[GH #6348]
.IP \(bu 4
When cloning the context stack in \fBfork()\fR emulation, \fBPerl_cx_dup()\fR
would crash accessing parameter information for context stack entries
that included no parameters, as with \f(CW\*(C`&foo;\*(C'\fR.
[GH #13763]
.IP \(bu 4
Introduced by
[GH #12161] , a memory
leak on every call to \f(CW\*(C`system\*(C'\fR and backticks (\f(CW \`\` \fR), on most Win32 Perls
starting from 5.18.0 has been fixed. The memory leak only occurred if you
enabled pseudo-fork in your build of Win32 Perl, and were running that build on
Server 2003 R2 or newer OS. The leak does not appear on WinXP SP3.
[GH #13741]
.RE
.RS 4
.RE
.IP WinCE 4
.IX Item "WinCE"
.RS 4
.PD 0
.IP \(bu 4
.PD
The building of XS modules has largely been restored. Several still cannot
(yet) be built but it is now possible to build Perl on WinCE with only a couple
of further patches (to Socket and ExtUtils::MakeMaker), hopefully to be
incorporated soon.
.IP \(bu 4
Perl can now be built in one shot with no user intervention on WinCE by running
\&\f(CW\*(C`nmake \-f Makefile.ce all\*(C'\fR.
.Sp
Support for building with EVC (Embedded Visual C++) 4 has been restored. Perl
can also be built using Smart Devices for Visual C++ 2005 or 2008.
.RE
.RS 4
.RE
.SH "Internal Changes"
.IX Header "Internal Changes"
.IP \(bu 4
The internal representation has changed for the match variables \f(CW$1\fR, \f(CW$2\fR etc.,
$`, $&, $', ${^PREMATCH}, ${^MATCH} and ${^POSTMATCH}. It uses slightly less
memory, avoids string comparisons and numeric conversions during lookup, and
uses 23 fewer lines of C. This change should not affect any external code.
.IP \(bu 4
Arrays now use NULL internally to represent unused slots, instead of
&PL_sv_undef. &PL_sv_undef is no longer treated as a special value, so
av_store(av, 0, &PL_sv_undef) will cause element 0 of that array to hold a
read-only undefined scalar. \f(CW\*(C`$array[0] = anything\*(C'\fR will croak and
\&\f(CW\*(C`\e$array[0]\*(C'\fR will compare equal to \f(CW\*(C`\eundef\*(C'\fR.
.IP \(bu 4
The SV returned by \fBHeSVKEY_force()\fR now correctly reflects the UTF8ness of the
underlying hash key when that key is not stored as a SV. [perl #79074]
.IP \(bu 4
Certain rarely used functions and macros available to XS code are now
deprecated. These are:
\&\f(CW\*(C`utf8_to_uvuni_buf\*(C'\fR (use \f(CW\*(C`utf8_to_uvchr_buf\*(C'\fR instead),
\&\f(CW\*(C`valid_utf8_to_uvuni\*(C'\fR (use \f(CW\*(C`utf8_to_uvchr_buf\*(C'\fR instead),
\&\f(CW\*(C`NATIVE_TO_NEED\*(C'\fR (this did not work properly anyway),
and \f(CW\*(C`ASCII_TO_NEED\*(C'\fR (this did not work properly anyway).
.Sp
Starting in this release, almost never does application code need to
distinguish between the platform's character set and Latin1, on which the
lowest 256 characters of Unicode are based. New code should not use
\&\f(CW\*(C`utf8n_to_uvuni\*(C'\fR (use \f(CW\*(C`utf8_to_uvchr_buf\*(C'\fR instead),
nor
\&\f(CW\*(C`uvuni_to_utf8\*(C'\fR (use \f(CW\*(C`uvchr_to_utf8\*(C'\fR instead),
.IP \(bu 4
The Makefile shortcut targets for many rarely (or never) used testing and
profiling targets have been removed, or merged into the only other Makefile
target that uses them. Specifically, these targets are gone, along with
documentation that referenced them or explained how to use them:
.Sp
.Vb 10
\& check.third check.utf16 check.utf8 coretest minitest.prep
\& minitest.utf16 perl.config.dashg perl.config.dashpg
\& perl.config.gcov perl.gcov perl.gprof perl.gprof.config
\& perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix
\& perl.third perl.third.config perl.valgrind.config purecovperl
\& pureperl quantperl test.deparse test.taintwarn test.third
\& test.torture test.utf16 test.utf8 test_notty.deparse
\& test_notty.third test_notty.valgrind test_prep.third
\& test_prep.valgrind torturetest ucheck ucheck.third ucheck.utf16
\& ucheck.valgrind utest utest.third utest.utf16 utest.valgrind
.Ve
.Sp
It's still possible to run the relevant commands by "hand" \- no underlying
functionality has been removed.
.IP \(bu 4
It is now possible to keep Perl from initializing locale handling.
For the most part, Perl doesn't pay attention to locale. (See
perllocale.) Nonetheless, until now, on startup, it has always
initialized locale handling to the system default, just in case the
program being executed ends up using locales. (This is one of the first
things a locale-aware program should do, long before Perl knows if it
will actually be needed or not.) This works well except when Perl is
embedded in another application which wants a locale that isn't the
system default. Now, if the environment variable
\&\f(CW\*(C`PERL_SKIP_LOCALE_INIT\*(C'\fR is set at the time Perl is started, this
initialization step is skipped. Prior to this, on Windows platforms,
the only workaround for this deficiency was to use a hacked-up copy of
internal Perl code. Applications that need to use older Perls can
discover if the embedded Perl they are using needs the workaround by
testing that the C preprocessor symbol \f(CW\*(C`HAS_SKIP_LOCALE_INIT\*(C'\fR is not
defined. [RT #38193]
.IP \(bu 4
\&\f(CW\*(C`BmRARE\*(C'\fR and \f(CW\*(C`BmPREVIOUS\*(C'\fR have been removed. They were not used anywhere
and are not part of the API. For XS modules, they are now #defined as 0.
.IP \(bu 4
\&\f(CW\*(C`sv_force_normal\*(C'\fR, which usually croaks on read-only values, used to allow
read-only values to be modified at compile time. This has been changed to
croak on read-only values regardless. This change uncovered several core
bugs.
.IP \(bu 4
Perl's new copy-on-write mechanism (which is now enabled by default),
allows any \f(CW\*(C`SvPOK\*(C'\fR scalar to be automatically upgraded to a copy-on-write
scalar when copied. A reference count on the string buffer is stored in
the string buffer itself.
.Sp
For example:
.Sp
.Vb 10
\& $ perl \-MDevel::Peek \-e\*(Aq$a="abc"; $b = $a; Dump $a; Dump $b\*(Aq
\& SV = PV(0x260cd80) at 0x2620ad8
\& REFCNT = 1
\& FLAGS = (POK,IsCOW,pPOK)
\& PV = 0x2619bc0 "abc"\e0
\& CUR = 3
\& LEN = 16
\& COW_REFCNT = 1
\& SV = PV(0x260ce30) at 0x2620b20
\& REFCNT = 1
\& FLAGS = (POK,IsCOW,pPOK)
\& PV = 0x2619bc0 "abc"\e0
\& CUR = 3
\& LEN = 16
\& COW_REFCNT = 1
.Ve
.Sp
Note that both scalars share the same PV buffer and have a COW_REFCNT
greater than zero.
.Sp
This means that XS code which wishes to modify the \f(CWSvPVX()\fR buffer of an
SV should call \f(CWSvPV_force()\fR or similar first, to ensure a valid (and
unshared) buffer, and to call \f(CWSvSETMAGIC()\fR afterwards. This in fact has
always been the case (for example hash keys were already copy-on-write);
this change just spreads the COW behaviour to a wider variety of SVs.
.Sp
One important difference is that before 5.18.0, shared hash-key scalars
used to have the \f(CW\*(C`SvREADONLY\*(C'\fR flag set; this is no longer the case.
.Sp
This new behaviour can still be disabled by running \fIConfigure\fR with
\&\fB\-Accflags=\-DPERL_NO_COW\fR. This option will probably be removed in Perl
5.22.
.IP \(bu 4
\&\f(CW\*(C`PL_sawampersand\*(C'\fR is now a constant. The switch this variable provided
(to enable/disable the pre-match copy depending on whether \f(CW$&\fR had been
seen) has been removed and replaced with copy-on-write, eliminating a few
bugs.
.Sp
The previous behaviour can still be enabled by running \fIConfigure\fR with
\&\fB\-Accflags=\-DPERL_SAWAMPERSAND\fR.
.IP \(bu 4
The functions \f(CW\*(C`my_swap\*(C'\fR, \f(CW\*(C`my_htonl\*(C'\fR and \f(CW\*(C`my_ntohl\*(C'\fR have been removed.
It is unclear why these functions were ever marked as \fIA\fR, part of the
API. XS code can't call them directly, as it can't rely on them being
compiled. Unsurprisingly, no code on CPAN references them.
.IP \(bu 4
The signature of the \f(CWPerl_re_intuit_start()\fR regex function has changed;
the function pointer \f(CW\*(C`intuit\*(C'\fR in the regex engine plugin structure
has also changed accordingly. A new parameter, \f(CW\*(C`strbeg\*(C'\fR has been added;
this has the same meaning as the same-named parameter in
\&\f(CW\*(C`Perl_regexec_flags\*(C'\fR. Previously intuit would try to guess the start of
the string from the passed SV (if any), and would sometimes get it wrong
(e.g. with an overloaded SV).
.IP \(bu 4
The signature of the \f(CWPerl_regexec_flags()\fR regex function has
changed; the function pointer \f(CW\*(C`exec\*(C'\fR in the regex engine plugin
structure has also changed to match. The \f(CW\*(C`minend\*(C'\fR parameter now has
type \f(CW\*(C`SSize_t\*(C'\fR to better support 64\-bit systems.
.IP \(bu 4
XS code may use various macros to change the case of a character or code
point (for example \f(CWtoLOWER_utf8()\fR). Only a couple of these were
documented until now;
and now they should be used in preference to calling the underlying
functions. See "Character case changing" in perlapi.
.IP \(bu 4
The code dealt rather inconsistently with uids and gids. Some
places assumed that they could be safely stored in UVs, others
in IVs, others in ints. Four new macros are introduced:
\&\fBSvUID()\fR, \fBsv_setuid()\fR, \fBSvGID()\fR, and \fBsv_setgid()\fR
.IP \(bu 4
\&\f(CW\*(C`sv_pos_b2u_flags\*(C'\fR has been added to the API. It is similar to \f(CW\*(C`sv_pos_b2u\*(C'\fR,
but supports long strings on 64\-bit platforms.
.IP \(bu 4
\&\f(CW\*(C`PL_exit_flags\*(C'\fR can now be used by perl embedders or other XS code to have
perl \f(CW\*(C`warn\*(C'\fR or \f(CW\*(C`abort\*(C'\fR on an attempted exit. [perl #52000]
.IP \(bu 4
Compiling with \f(CW\*(C`\-Accflags=\-PERL_BOOL_AS_CHAR\*(C'\fR now allows C99 and C++
compilers to emulate the aliasing of \f(CW\*(C`bool\*(C'\fR to \f(CW\*(C`char\*(C'\fR that perl does for
C89 compilers. [perl #120314]
.IP \(bu 4
The \f(CW\*(C`sv\*(C'\fR argument in "sv_2pv_flags" in perlapi, "sv_2iv_flags" in perlapi,
"sv_2uv_flags" in perlapi, and "sv_2nv_flags" in perlapi and their older wrappers
sv_2pv, sv_2iv, sv_2uv, sv_2nv, is now non-NULL. Passing NULL now will crash.
When the non-NULL marker was introduced en masse in 5.9.3 the functions
were marked non-NULL, but since the creation of the SV API in 5.0 alpha 2, if
NULL was passed, the functions returned 0 or false-type values. The code that
supports \f(CW\*(C`sv\*(C'\fR argument being non-NULL dates to 5.0 alpha 2 directly, and
indirectly to Perl 1.0 (pre 5.0 api). The lack of documentation that the
functions accepted a NULL \f(CW\*(C`sv\*(C'\fR was corrected in 5.11.0 and between 5.11.0
and 5.19.5 the functions were marked NULLOK. As an optimization the NULLOK code
has now been removed, and the functions became non-NULL marked again, because
core getter-type macros never pass NULL to these functions and would crash
before ever passing NULL.
.Sp
The only way a NULL \f(CW\*(C`sv\*(C'\fR can be passed to sv_2*v* functions is if XS code
directly calls sv_2*v*. This is unlikely as XS code uses Sv*V* macros to get
the underlying value out of the SV. One possible situation which leads to
a NULL \f(CW\*(C`sv\*(C'\fR being passed to sv_2*v* functions, is if XS code defines its own
getter type Sv*V* macros, which check for NULL \fBbefore\fR dereferencing and
checking the SV's flags through public API Sv*OK* macros or directly using
private API \f(CW\*(C`SvFLAGS\*(C'\fR, and if \f(CW\*(C`sv\*(C'\fR is NULL, then calling the sv_2*v functions
with a NULL literal or passing the \f(CW\*(C`sv\*(C'\fR containing a NULL value.
.IP \(bu 4
newATTRSUB is now a macro
.Sp
The public API newATTRSUB was previously a macro to the private
function Perl_newATTRSUB. Function Perl_newATTRSUB has been removed. newATTRSUB
is now macro to a different internal function.
.IP \(bu 4
Changes in warnings raised by \f(CWutf8n_to_uvchr()\fR
.Sp
This bottom level function decodes the first character of a UTF\-8 string
into a code point. It is accessible to \f(CW\*(C`XS\*(C'\fR level code, but it's
discouraged from using it directly. There are higher level functions
that call this that should be used instead, such as
"utf8_to_uvchr_buf" in perlapi. For completeness though, this documents
some changes to it. Now, tests for malformations are done before any
tests for other potential issues. One of those issues involves code
points so large that they have never appeared in any official standard
(the current standard has scaled back the highest acceptable code point
from earlier versions). It is possible (though not done in CPAN) to
warn and/or forbid these code points, while accepting smaller code
points that are still above the legal Unicode maximum. The warning
message for this now includes the code point if representable on the
machine. Previously it always displayed raw bytes, which is what it
still does for non-representable code points.
.IP \(bu 4
Regexp engine changes that affect the pluggable regex engine interface
.Sp
Many flags that used to be exposed via regexp.h and used to populate the
extflags member of struct regexp have been removed. These fields were
technically private to Perl's own regexp engine and should not have been
exposed there in the first place.
.Sp
The affected flags are:
.Sp
.Vb 8
\& RXf_NOSCAN
\& RXf_CANY_SEEN
\& RXf_GPOS_SEEN
\& RXf_GPOS_FLOAT
\& RXf_ANCH_BOL
\& RXf_ANCH_MBOL
\& RXf_ANCH_SBOL
\& RXf_ANCH_GPOS
.Ve
.Sp
As well as the follow flag masks:
.Sp
.Vb 2
\& RXf_ANCH_SINGLE
\& RXf_ANCH
.Ve
.Sp
All have been renamed to PREGf_ equivalents and moved to regcomp.h.
.Sp
The behavior previously achieved by setting one or more of the RXf_ANCH_
flags (via the RXf_ANCH mask) have now been replaced by a *single* flag bit
in extflags:
.Sp
.Vb 1
\& RXf_IS_ANCHORED
.Ve
.Sp
pluggable regex engines which previously used to set these flags should
now set this flag ALONE.
.IP \(bu 4
The Perl core now consistently uses \f(CWav_tindex()\fR ("the top index of an
array") as a more clearly-named synonym for \f(CWav_len()\fR.
.IP \(bu 4
The obscure interpreter variable \f(CW\*(C`PL_timesbuf\*(C'\fR is expected to be removed
early in the 5.21.x development series, so that Perl 5.22.0 will not provide
it to XS authors. While the variable still exists in 5.20.0, we hope that
this advance warning of the deprecation will help anyone who is using that
variable.
.SH "Selected Bug Fixes"
.IX Header "Selected Bug Fixes"
.SS "Regular Expressions"
.IX Subsection "Regular Expressions"
.IP \(bu 4
Fixed a small number of regexp constructions that could either fail to
match or crash perl when the string being matched against was
allocated above the 2GB line on 32\-bit systems. [RT #118175]
.IP \(bu 4
Various memory leaks involving the parsing of the \f(CW\*(C`(?[...])\*(C'\fR regular
expression construct have been fixed.
.IP \(bu 4
\&\f(CW\*(C`(?[...])\*(C'\fR now allows interpolation of precompiled patterns consisting of
\&\f(CW\*(C`(?[...])\*(C'\fR with bracketed character classes inside (\f(CW\*(C`$pat =
qr/(?[\ [a]\ ])/; /(?[\ $pat\ ])/\*(C'\fR). Formerly, the brackets would
confuse the regular expression parser.
.IP \(bu 4
The "Quantifier unexpected on zero-length expression" warning message could
appear twice starting in Perl v5.10 for a regular expression also
containing alternations (e.g., "a|b") triggering the trie optimisation.
.IP \(bu 4
Perl v5.18 inadvertently introduced a bug whereby interpolating mixed up\-
and down-graded UTF\-8 strings in a regex could result in malformed UTF\-8
in the pattern: specifically if a downgraded character in the range
\&\f(CW\*(C`\ex80..\exff\*(C'\fR followed a UTF\-8 string, e.g.
.Sp
.Vb 3
\& utf8::upgrade( my $u = "\ex{e5}");
\& utf8::downgrade(my $d = "\ex{e5}");
\& /$u$d/
.Ve
.Sp
[RT #118297]
.IP \(bu 4
In regular expressions containing multiple code blocks, the values of
\&\f(CW$1\fR, \f(CW$2\fR, etc., set by nested regular expression calls would leak from
one block to the next. Now these variables always refer to the outer
regular expression at the start of an embedded block [perl #117917].
.IP \(bu 4
\&\f(CW\*(C`/$qr/p\*(C'\fR was broken in Perl 5.18.0; the \f(CW\*(C`/p\*(C'\fR flag was ignored. This has been
fixed. [perl #118213]
.IP \(bu 4
Starting in Perl 5.18.0, a construct like \f(CW\*(C`/[#](?{})/x\*(C'\fR would have its \f(CW\*(C`#\*(C'\fR
incorrectly interpreted as a comment. The code block would be skipped,
unparsed. This has been corrected.
.IP \(bu 4
Starting in Perl 5.001, a regular expression like \f(CW\*(C`/[#$a]/x\*(C'\fR or \f(CW\*(C`/[#]$a/x\*(C'\fR
would have its \f(CW\*(C`#\*(C'\fR incorrectly interpreted as a comment, so the variable would
not interpolate. This has been corrected. [perl #45667]
.IP \(bu 4
Perl 5.18.0 inadvertently made dereferenced regular expressions
(\f(CW\*(C`${\ qr//\ }\*(C'\fR) false as booleans. This has been fixed.
.IP \(bu 4
The use of \f(CW\*(C`\eG\*(C'\fR in regular expressions, where it's not at the start of the
pattern, is now slightly less buggy (although it is still somewhat
problematic).
.IP \(bu 4
Where a regular expression included code blocks (\f(CW\*(C`/(?{...})/\*(C'\fR), and where the
use of constant overloading triggered a re-compilation of the code block, the
second compilation didn't see its outer lexical scope. This was a regression
in Perl 5.18.0.
.IP \(bu 4
The string position set by \f(CW\*(C`pos\*(C'\fR could shift if the string changed
representation internally to or from utf8. This could happen, e.g., with
references to objects with string overloading.
.IP \(bu 4
Taking references to the return values of two \f(CW\*(C`pos\*(C'\fR calls with the same
argument, and then assigning a reference to one and \f(CW\*(C`undef\*(C'\fR to the other,
could result in assertion failures or memory leaks.
.IP \(bu 4
Elements of @\- and @+ now update correctly when they refer to non-existent
captures. Previously, a referenced element (\f(CW\*(C`$ref = \e$\-[1]\*(C'\fR) could refer to
the wrong match after subsequent matches.
.IP \(bu 4
The code that parses regex backrefs (or ambiguous backref/octals) such as \e123
did a simple \fBatoi()\fR, which could wrap round to negative values on long digit
strings and cause segmentation faults. This has now been fixed. [perl
#119505]
.IP \(bu 4
Assigning another typeglob to \f(CW\*(C`*^R\*(C'\fR no longer makes the regular expression
engine crash.
.IP \(bu 4
The \f(CW\*(C`\eN\*(C'\fR regular expression escape, when used without the curly braces (to
mean \f(CW\*(C`[^\en]\*(C'\fR), was ignoring a following \f(CW\*(C`*\*(C'\fR if followed by whitespace
under /x. It had been this way since \f(CW\*(C`\eN\*(C'\fR to mean \f(CW\*(C`[^\en]\*(C'\fR was introduced
in 5.12.0.
.IP \(bu 4
\&\f(CW\*(C`s///\*(C'\fR, \f(CW\*(C`tr///\*(C'\fR and \f(CW\*(C`y///\*(C'\fR now work when a wide character is used as the
delimiter. [perl #120463]
.IP \(bu 4
Some cases of unterminated (?...) sequences in regular expressions (e.g.,
\&\f(CW\*(C`/(?\*(C'\fR) have been fixed to produce the proper error message instead of
"panic: memory wrap". Other cases (e.g., \f(CW\*(C`/(?(/\*(C'\fR) have yet to be fixed.
.IP \(bu 4
When a reference to a reference to an overloaded object was returned from
a regular expression \f(CW\*(C`(??{...})\*(C'\fR code block, an incorrect implicit
dereference could take place if the inner reference had been returned by
a code block previously.
.IP \(bu 4
A tied variable returned from \f(CW\*(C`(??{...})\*(C'\fR sees the inner values of match
variables (i.e., the \f(CW$1\fR etc. from any matches inside the block) in its
FETCH method. This was not the case if a reference to an overloaded object
was the last thing assigned to the tied variable. Instead, the match
variables referred to the outer pattern during the FETCH call.
.IP \(bu 4
Fix unexpected tainting via regexp using locale. Previously, under certain
conditions, the use of character classes could cause tainting when it
shouldn't. Some character classes are locale-dependent, but before this
patch, sometimes tainting was happening even for character classes that
don't depend on the locale. [perl #120675]
.IP \(bu 4
Under certain conditions, Perl would throw an error if in a lookbehind
assertion in a regexp, the assertion referred to a named subpattern,
complaining the lookbehind was variable when it wasn't. This has been
fixed. [perl #120600], [perl #120618]. The current fix may be improved
on in the future.
.IP \(bu 4
\&\f(CW$^R\fR wasn't available outside of the regular expression that
initialized it. [perl #121070]
.IP \(bu 4
A large set of fixes and refactoring for \fBre_intuit_start()\fR was merged,
the highlights are:
.RS 4
.IP \(bu 4
Fixed a panic when compiling the regular expression
\&\f(CW\*(C`/\ex{100}[xy]\ex{100}{2}/\*(C'\fR.
.IP \(bu 4
Fixed a performance regression when performing a global pattern match
against a UTF\-8 string. [perl #120692]
.IP \(bu 4
Fixed another performance issue where matching a regular expression
like \f(CW\*(C`/ab.{1,2}x/\*(C'\fR against a long UTF\-8 string would unnecessarily
calculate byte offsets for a large portion of the string. [perl
#120692]
.RE
.RS 4
.RE
.IP \(bu 4
Fixed an alignment error when compiling regular expressions when built
with GCC on HP-UX 64\-bit.
.IP \(bu 4
On 64\-bit platforms \f(CW\*(C`pos\*(C'\fR can now be set to a value higher than 2**31\-1.
[perl #72766]
.SS "Perl 5 Debugger and \-d"
.IX Subsection "Perl 5 Debugger and -d"
.IP \(bu 4
The debugger's \f(CW\*(C`man\*(C'\fR command been fixed. It was broken in the v5.18.0
release. The \f(CW\*(C`man\*(C'\fR command is aliased to the names \f(CW\*(C`doc\*(C'\fR and \f(CW\*(C`perldoc\*(C'\fR \-
all now work again.
.IP \(bu 4
\&\f(CW@_\fR is now correctly visible in the debugger, fixing a regression
introduced in v5.18.0's debugger. [RT #118169]
.IP \(bu 4
Under copy-on-write builds (the default as of 5.20.0) \f(CW\*(C`${\*(Aq_<\-e\*(Aq}[0]\*(C'\fR
no longer gets mangled. This is the first line of input saved for the
debugger's use for one-liners [perl #118627].
.IP \(bu 4
On non-threaded builds, setting \f(CW\*(C`${"_getline\*(C'\fR) used to stringify
the typeglob and then look it up again. Combined with changes in Perl
5.18.0, this allowed \f(CW\*(C`*foo\->bar\*(C'\fR to call methods on the "foo" package
(like \f(CW\*(C`foo\->bar\*(C'\fR). In some cases it could cause the method to be
called on the wrong handle. Now a typeglob argument is treated as a
handle (just like \f(CW\*(C`(\e*foo)\->bar\*(C'\fR), or, if its IO slot is empty, an
error is raised.
.IP \(bu 4
Assigning a vstring to a tied variable or to a subroutine argument aliased
to a nonexistent hash or array element now works, without flattening the
vstring into a regular string.
.IP \(bu 4
\&\f(CW\*(C`pos\*(C'\fR, \f(CW\*(C`tie\*(C'\fR, \f(CW\*(C`tied\*(C'\fR and \f(CW\*(C`untie\*(C'\fR did not work
properly on subroutine arguments aliased to nonexistent
hash and array elements [perl #77814, #27010].
.IP \(bu 4
The \f(CW\*(C`=>\*(C'\fR fat arrow operator can now quote built-in keywords even if it
occurs on the next line, making it consistent with how it treats other
barewords.
.IP \(bu 4
Autovivifying a subroutine stub via \f(CW\*(C`\e&$glob\*(C'\fR started causing crashes in Perl
5.18.0 if the \f(CW$glob\fR was merely a copy of a real glob, i.e., a scalar that had
had a glob assigned to it. This has been fixed. [perl #119051]
.IP \(bu 4
Perl used to leak an implementation detail when it came to referencing the
return values of certain operators. \f(CW\*(C`for ($a+$b) { warn \e$_; warn \e$_ }\*(C'\fR used
to display two different memory addresses, because the \f(CW\*(C`\e\*(C'\fR operator was
copying the variable. Under threaded builds, it would also happen for
constants (\f(CW\*(C`for(1) { ... }\*(C'\fR). This has been fixed. [perl #21979, #78194,
#89188, #109746, #114838, #115388]
.IP \(bu 4
The range operator \f(CW\*(C`..\*(C'\fR was returning the same modifiable scalars with each
call, unless it was the only thing in a \f(CW\*(C`foreach\*(C'\fR loop header. This meant
that changes to values within the list returned would be visible the next time
the operator was executed. [perl #3105]
.IP \(bu 4
Constant folding and subroutine inlining no longer cause operations that would
normally return new modifiable scalars to return read-only values instead.
.IP \(bu 4
Closures of the form \f(CW\*(C`sub () { $some_variable }\*(C'\fR are no longer inlined,
causing changes to the variable to be ignored by callers of the subroutine.
[perl #79908]
.IP \(bu 4
Return values of certain operators such as \f(CW\*(C`ref\*(C'\fR would sometimes be shared
between recursive calls to the same subroutine, causing the inner call to
modify the value returned by \f(CW\*(C`ref\*(C'\fR in the outer call. This has been fixed.
.IP \(bu 4
\&\f(CW\*(C`_\|_PACKAGE_\|_\*(C'\fR and constants returning a package name or hash key are now
consistently read-only. In various previous Perl releases, they have become
mutable under certain circumstances.
.IP \(bu 4
Enabling "used once" warnings no longer causes crashes on stash circularities
created at compile time (\f(CW\*(C`*Foo::Bar::Foo:: = *Foo::\*(C'\fR).
.IP \(bu 4
Undef constants used in hash keys (\f(CW\*(C`use constant u => undef; $h{+u}\*(C'\fR) no
longer produce "uninitialized" warnings at compile time.
.IP \(bu 4
Modifying a substitution target inside the substitution replacement no longer
causes crashes.
.IP \(bu 4
The first statement inside a string eval used to use the wrong pragma setting
sometimes during constant folding. \f(CW\*(C`eval \*(Aquc chr 0xe0\*(Aq\*(C'\fR would randomly choose
between Unicode, byte, and locale semantics. This has been fixed.
.IP \(bu 4
The handling of return values of \f(CW@INC\fR filters (subroutines returned by
subroutines in \f(CW@INC\fR) has been fixed in various ways. Previously tied variables
were mishandled, and setting \f(CW$_\fR to a reference or typeglob could result in
crashes.
.IP \(bu 4
The \f(CW\*(C`SvPVbyte\*(C'\fR XS function has been fixed to work with tied scalars returning
something other than a string. It used to return utf8 in those cases where
\&\f(CW\*(C`SvPV\*(C'\fR would.
.IP \(bu 4
Perl 5.18.0 inadvertently made \f(CW\*(C`\-\-\*(C'\fR and \f(CW\*(C`++\*(C'\fR crash on dereferenced regular
expressions, and stopped \f(CW\*(C`++\*(C'\fR from flattening vstrings.
.IP \(bu 4
\&\f(CW\*(C`bless\*(C'\fR no longer dies with "Can't bless non-reference value" if its first
argument is a tied reference.
.IP \(bu 4
\&\f(CW\*(C`reset\*(C'\fR with an argument no longer skips copy-on-write scalars, regular
expressions, typeglob copies, and vstrings. Also, when encountering those or
read-only values, it no longer skips any array or hash with the same name.
.IP \(bu 4
\&\f(CW\*(C`reset\*(C'\fR with an argument now skips scalars aliased to typeglobs
(\f(CW\*(C`for $z (*foo) { reset "z" }\*(C'\fR). Previously it would corrupt memory or crash.
.IP \(bu 4
\&\f(CW\*(C`ucfirst\*(C'\fR and \f(CW\*(C`lcfirst\*(C'\fR were not respecting the bytes pragma. This was a
regression from Perl 5.12. [perl #117355]
.IP \(bu 4
Changes to \f(CW\*(C`UNIVERSAL::DESTROY\*(C'\fR now update DESTROY caches in all classes,
instead of causing classes that have already had objects destroyed to continue
using the old sub. This was a regression in Perl 5.18. [perl #114864]
.IP \(bu 4
All known false-positive occurrences of the deprecation warning "Useless use of
\&'\e'; doesn't escape metacharacter '%c'", added in Perl 5.18.0, have been
removed. [perl #119101]
.IP \(bu 4
The value of $^E is now saved across signal handlers on Windows. [perl #85104]
.IP \(bu 4
A lexical filehandle (as in \f(CW\*(C`open my $fh...\*(C'\fR) is usually given a name based on
the current package and the name of the variable, e.g. "main::$fh". Under
recursion, the filehandle was losing the "$fh" part of the name. This has been
fixed.
.IP \(bu 4
Uninitialized values returned by XSUBs are no longer exempt from uninitialized
warnings. [perl #118693]
.IP \(bu 4
\&\f(CW\*(C`elsif ("")\*(C'\fR no longer erroneously produces a warning about void context.
[perl #118753]
.IP \(bu 4
Passing \f(CW\*(C`undef\*(C'\fR to a subroutine now causes \f(CW@_\fR to contain the same read-only
undefined scalar that \f(CW\*(C`undef\*(C'\fR returns. Furthermore, \f(CW\*(C`exists $_[0]\*(C'\fR will now
return true if \f(CW\*(C`undef\*(C'\fR was the first argument. [perl #7508, #109726]
.IP \(bu 4
Passing a non-existent array element to a subroutine does not usually
autovivify it unless the subroutine modifies its argument. This did not work
correctly with negative indices and with non-existent elements within the
array. The element would be vivified immediately. The delayed vivification
has been extended to work with those. [perl #118691]
.IP \(bu 4
Assigning references or globs to the scalar returned by $#foo after the \f(CW@foo\fR
array has been freed no longer causes assertion failures on debugging builds
and memory leaks on regular builds.
.IP \(bu 4
On 64\-bit platforms, large ranges like 1..1000000000000 no longer crash, but
eat up all your memory instead. [perl #119161]
.IP \(bu 4
\&\f(CW\*(C`_\|_DATA_\|_\*(C'\fR now puts the \f(CW\*(C`DATA\*(C'\fR handle in the right package, even if the
current package has been renamed through glob assignment.
.IP \(bu 4
When \f(CW\*(C`die\*(C'\fR, \f(CW\*(C`last\*(C'\fR, \f(CW\*(C`next\*(C'\fR, \f(CW\*(C`redo\*(C'\fR, \f(CW\*(C`goto\*(C'\fR and \f(CW\*(C`exit\*(C'\fR unwind the scope,
it is possible for \f(CW\*(C`DESTROY\*(C'\fR recursively to call a subroutine or format that
is currently being exited. It that case, sometimes the lexical variables
inside the sub would start out having values from the outer call, instead of
being undefined as they should. This has been fixed. [perl #119311]
.IP \(bu 4
${^MPEN} is no longer treated as a synonym for ${^MATCH}.
.IP \(bu 4
Perl now tries a little harder to return the correct line number in
\&\f(CW\*(C`(caller)[2]\*(C'\fR. [perl #115768]
.IP \(bu 4
Line numbers inside multiline quote-like operators are now reported correctly.
[perl #3643]
.IP \(bu 4
\&\f(CW\*(C`#line\*(C'\fR directives inside code embedded in quote-like operators are now
respected.
.IP \(bu 4
Line numbers are now correct inside the second here-doc when two here-doc
markers occur on the same line.
.IP \(bu 4
An optimization in Perl 5.18 made incorrect assumptions causing a bad
interaction with the Devel::CallParser CPAN module. If the module was
loaded then lexical variables declared in separate statements following a
\&\f(CWmy(...)\fR list might fail to be cleared on scope exit.
.IP \(bu 4
\&\f(CW&xsub\fR and \f(CW\*(C`goto &xsub\*(C'\fR calls now allow the called subroutine to autovivify
elements of \f(CW@_\fR.
.IP \(bu 4
\&\f(CW&xsub\fR and \f(CW\*(C`goto &xsub\*(C'\fR no longer crash if *_ has been undefined and has no
ARRAY entry (i.e. \f(CW@_\fR does not exist).
.IP \(bu 4
\&\f(CW&xsub\fR and \f(CW\*(C`goto &xsub\*(C'\fR now work with tied \f(CW@_\fR.
.IP \(bu 4
Overlong identifiers no longer cause a buffer overflow (and a crash). They
started doing so in Perl 5.18.
.IP \(bu 4
The warning "Scalar value \f(CW@hash\fR{foo} better written as \f(CW$hash\fR{foo}" now produces
far fewer false positives. In particular, \f(CW@hash{+function_returning_a_list}\fR
and \f(CW@hash{ qw "foo bar baz" }\fR no longer warn. The same applies to array
slices. [perl #28380, #114024]
.IP \(bu 4
\&\f(CW\*(C`$! = EINVAL; waitpid(0, WNOHANG);\*(C'\fR no longer goes into an internal infinite
loop. [perl #85228]
.IP \(bu 4
A possible segmentation fault in filehandle duplication has been fixed.
.IP \(bu 4
A subroutine in \f(CW@INC\fR can return a reference to a scalar containing the initial
contents of the file. However, that scalar was freed prematurely if not
referenced elsewhere, giving random results.
.IP \(bu 4
\&\f(CW\*(C`last\*(C'\fR no longer returns values that the same statement has accumulated so
far, fixing amongst other things the long-standing bug that \f(CW\*(C`push @a, last\*(C'\fR
would try to return the \f(CW@a\fR, copying it like a scalar in the process and
resulting in the error, "Bizarre copy of ARRAY in last." [perl #3112]
.IP \(bu 4
In some cases, closing file handles opened to pipe to or from a process, which
had been duplicated into a standard handle, would call perl's internal waitpid
wrapper with a pid of zero. With the fix for [perl #85228] this zero pid was
passed to \f(CW\*(C`waitpid\*(C'\fR, possibly blocking the process. This wait for process
zero no longer occurs. [perl #119893]
.IP \(bu 4
\&\f(CW\*(C`select\*(C'\fR used to ignore magic on the fourth (timeout) argument, leading to
effects such as \f(CW\*(C`select\*(C'\fR blocking indefinitely rather than the expected sleep
time. This has now been fixed. [perl #120102]
.IP \(bu 4
The class name in \f(CW\*(C`for my class $foo\*(C'\fR is now parsed correctly. In the case of
the second character of the class name being followed by a digit (e.g. 'a1b')
this used to give the error "Missing $ on loop variable". [perl #120112]
.IP \(bu 4
Perl 5.18.0 accidentally disallowed \f(CW\*(C`\-bareword\*(C'\fR under \f(CW\*(C`use strict\*(C'\fR and
\&\f(CW\*(C`use integer\*(C'\fR. This has been fixed. [perl #120288]
.IP \(bu 4
\&\f(CW\*(C`\-a\*(C'\fR at the start of a line (or a hyphen with any single letter that is
not a filetest operator) no longer produces an erroneous 'Use of "\-a"
without parentheses is ambiguous' warning. [perl #120288]
.IP \(bu 4
Lvalue context is now properly propagated into bare blocks and \f(CW\*(C`if\*(C'\fR and
\&\f(CW\*(C`else\*(C'\fR blocks in lvalue subroutines. Previously, arrays and hashes would
sometimes incorrectly be flattened when returned in lvalue list context, or
"Bizarre copy" errors could occur. [perl #119797]
.IP \(bu 4
Lvalue context is now propagated to the branches of \f(CW\*(C`||\*(C'\fR and \f(CW\*(C`&&\*(C'\fR (and
their alphabetic equivalents, \f(CW\*(C`or\*(C'\fR and \f(CW\*(C`and\*(C'\fR). This means
\&\f(CW\*(C`foreach (pos $x || pos $y) {...}\*(C'\fR now allows \f(CW\*(C`pos\*(C'\fR to be modified
through \f(CW$_\fR.
.IP \(bu 4
\&\f(CW\*(C`stat\*(C'\fR and \f(CW\*(C`readline\*(C'\fR remember the last handle used; the former
for the special \f(CW\*(C`_\*(C'\fR filehandle, the latter for \f(CW\*(C`${^LAST_FH}\*(C'\fR.
\&\f(CW\*(C`eval "*foo if 0"\*(C'\fR where *foo was the last handle passed to \f(CW\*(C`stat\*(C'\fR
or \f(CW\*(C`readline\*(C'\fR could cause that handle to be forgotten if the
handle were not opened yet. This has been fixed.
.IP \(bu 4
Various cases of \f(CW\*(C`delete $::{a}\*(C'\fR, \f(CW\*(C`delete $::{ENV}\*(C'\fR etc. causing a crash
have been fixed. [perl #54044]
.IP \(bu 4
Setting \f(CW$!\fR to EACCESS before calling \f(CW\*(C`require\*(C'\fR could affect
\&\f(CW\*(C`require\*(C'\fR's behaviour. This has been fixed.
.IP \(bu 4
The "Can't use \e1 to mean \f(CW$1\fR in expression" warning message now only occurs
on the right-hand (replacement) part of a substitution. Formerly it could
happen in code embedded in the left-hand side, or in any other quote-like
operator.
.IP \(bu 4
Blessing into a reference (\f(CW\*(C`bless $thisref, $thatref\*(C'\fR) has long been
disallowed, but magical scalars for the second like \f(CW$/\fR and those tied
were exempt. They no longer are. [perl #119809]
.IP \(bu 4
Blessing into a reference was accidentally allowed in 5.18 if the class
argument were a blessed reference with stale method caches (i.e., whose
class had had subs defined since the last method call). They are
disallowed once more, as in 5.16.
.IP \(bu 4
\&\f(CW\*(C`$x\->{key}\*(C'\fR where \f(CW$x\fR was declared as \f(CW\*(C`my Class $x\*(C'\fR no longer crashes
if a Class::FIELDS subroutine stub has been declared.
.IP \(bu 4
\&\f(CW@$obj{\*(Aqkey\*(Aq}\fR and \f(CW\*(C`${$obj}{key}\*(C'\fR used to be exempt from compile-time
field checking ("No such class field"; see fields) but no longer are.
.IP \(bu 4
A nonexistent array element with a large index passed to a subroutine that
ties the array and then tries to access the element no longer results in a
crash.
.IP \(bu 4
Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
array indices crash when the current package is a tied array class.
.IP \(bu 4
Declaring a \f(CW\*(C`require\*(C'\fR, \f(CW\*(C`glob\*(C'\fR, or \f(CW\*(C`do\*(C'\fR subroutine stub in the
CORE::GLOBAL:: package no longer makes compilation of calls to the
corresponding functions crash.
.IP \(bu 4
Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
but has now been fixed.
.IP \(bu 4
When \f(CW\`...\`\fR or \f(CW\*(C`qx/.../\*(C'\fR calls a \f(CW\*(C`readpipe\*(C'\fR override, double-quotish
interpolation now happens, as is the case when there is no override.
Previously, the presence of an override would make these quote-like
operators act like \f(CW\*(C`q{}\*(C'\fR, suppressing interpolation. [perl #115330]
.IP \(bu 4
\&\f(CW\*(C`<<<\`...\`\*(C'\fR here-docs (with backticks as the delimiters) now call
\&\f(CW\*(C`readpipe\*(C'\fR overrides. [perl #119827]
.IP \(bu 4
\&\f(CW&CORE::exit()\fR and \f(CW&CORE::die()\fR now respect vmsish hints.
.IP \(bu 4
Undefining a glob that triggers a DESTROY method that undefines the same
glob is now safe. It used to produce "Attempt to free unreferenced glob
pointer" warnings and leak memory.
.IP \(bu 4
If subroutine redefinition (\f(CW\*(C`eval \*(Aqsub foo{}\*(Aq\*(C'\fR or \f(CW\*(C`newXS\*(C'\fR for XS code)
triggers a DESTROY method on the sub that is being redefined, and that
method assigns a subroutine to the same slot (\f(CW\*(C`*foo = sub {}\*(C'\fR), \f(CW$_[0]\fR
is no longer left pointing to a freed scalar. Now DESTROY is delayed until
the new subroutine has been installed.
.IP \(bu 4
On Windows, perl no longer calls \fBCloseHandle()\fR on a socket handle. This makes
debugging easier on Windows by removing certain irrelevant bad handle
exceptions. It also fixes a race condition that made socket functions randomly
fail in a Perl process with multiple OS threads, and possible test failures in
\&\fIdist/IO/t/cachepropagate\-tcp.t\fR. [perl #120091/118059]
.IP \(bu 4
Formats involving UTF\-8 encoded strings, or strange vars like ties,
overloads, or stringified refs (and in recent
perls, pure NOK vars) would generally do the wrong thing in formats
when the var is treated as a string and repeatedly chopped, as in
\&\f(CW\*(C`^<<<~~\*(C'\fR and similar. This has now been resolved.
[perl #33832/45325/113868/119847/119849/119851]
.IP \(bu 4
\&\f(CW\*(C`semctl(..., SETVAL, ...)\*(C'\fR would set the semaphore to the top
32\-bits of the supplied integer instead of the bottom 32\-bits on
64\-bit big-endian systems. [perl #120635]
.IP \(bu 4
\&\f(CWreaddir()\fR now only sets \f(CW$!\fR on error. \f(CW$!\fR is no longer set
to \f(CW\*(C`EBADF\*(C'\fR when then terminating \f(CW\*(C`undef\*(C'\fR is read from the directory
unless the system call sets \f(CW$!\fR. [perl #118651]
.IP \(bu 4
\&\f(CW&CORE::glob\fR no longer causes an intermittent crash due to perl's stack
getting corrupted. [perl #119993]
.IP \(bu 4
\&\f(CW\*(C`open\*(C'\fR with layers that load modules (e.g., "<:encoding(utf8)") no longer
runs the risk of crashing due to stack corruption.
.IP \(bu 4
Perl 5.18 broke autoloading via \f(CW\*(C`\->SUPER::foo\*(C'\fR method calls by looking
up AUTOLOAD from the current package rather than the current package's
superclass. This has been fixed. [perl #120694]
.IP \(bu 4
A longstanding bug causing \f(CW\*(C`do {} until CONSTANT\*(C'\fR, where the constant
holds a true value, to read unallocated memory has been resolved. This
would usually happen after a syntax error. In past versions of Perl it has
crashed intermittently. [perl #72406]
.IP \(bu 4
Fix HP-UX \f(CW$!\fR failure. HP-UX \fBstrerror()\fR returns an empty string for an
unknown error code. This caused an assertion to fail under DEBUGGING
builds. Now instead, the returned string for \f(CW"$!"\fR contains text
indicating the code is for an unknown error.
.IP \(bu 4
Individually-tied elements of \f(CW@INC\fR (as in \f(CW\*(C`tie $INC[0]...\*(C'\fR) are now
handled correctly. Formerly, whether a sub returned by such a tied element
would be treated as a sub depended on whether a FETCH had occurred
previously.
.IP \(bu 4
\&\f(CW\*(C`getc\*(C'\fR on a byte-sized handle after the same \f(CW\*(C`getc\*(C'\fR operator had been
used on a utf8 handle used to treat the bytes as utf8, resulting in erratic
behavior (e.g., malformed UTF\-8 warnings).
.IP \(bu 4
An initial \f(CW\*(C`{\*(C'\fR at the beginning of a format argument line was always
interpreted as the beginning of a block prior to v5.18. In Perl v5.18, it
started being treated as an ambiguous token. The parser would guess
whether it was supposed to be an anonymous hash constructor or a block
based on the contents. Now the previous behaviour has been restored.
[perl #119973]
.IP \(bu 4
In Perl v5.18 \f(CW\*(C`undef *_; goto &sub\*(C'\fR and \f(CW\*(C`local *_; goto &sub\*(C'\fR started
crashing. This has been fixed. [perl #119949]
.IP \(bu 4
Backticks (\f(CW \`\` \fR or \f(CW\*(C` qx// \*(C'\fR) combined with multiple threads on
Win32 could result in output sent to stdout on one thread being
captured by backticks of an external command in another thread.
.Sp
This could occur for pseudo-forked processes too, as Win32's
pseudo-fork is implemented in terms of threads. [perl #77672]
.IP \(bu 4
\&\f(CW\*(C`open $fh, ">+", undef\*(C'\fR no longer leaks memory when TMPDIR is set
but points to a directory a temporary file cannot be created in. [perl
#120951]
.IP \(bu 4
\&\f(CW\*(C` for ( $h{k} || \*(Aq\*(Aq ) \*(C'\fR no longer auto-vivifies \f(CW$h{k}\fR. [perl
#120374]
.IP \(bu 4
On Windows machines, Perl now emulates the POSIX use of the environment
for locale initialization. Previously, the environment was ignored.
See "ENVIRONMENT" in perllocale.
.IP \(bu 4
Fixed a crash when destroying a self-referencing GLOB. [perl #121242]
.SH "Known Problems"
.IX Header "Known Problems"
.IP \(bu 4
IO::Socket is known to fail tests on AIX 5.3. There is
a patch in the request
tracker, #120835, which may be applied to future releases.
.IP \(bu 4
The following modules are known to have test failures with this version of
Perl. Patches have been submitted, so there will hopefully be new releases
soon:
.RS 4
.IP \(bu 4
Data::Structure::Util version 0.15
.IP \(bu 4
HTML::StripScripts version 1.05
.IP \(bu 4
List::Gather version 0.08.
.RE
.RS 4
.RE
.SH Obituary
.IX Header "Obituary"
Diana Rosa, 27, of Rio de Janeiro, went to her long rest on May 10,
2014, along with the plush camel she kept hanging on her computer screen
all the time. She was a passionate Perl hacker who loved the language and its
community, and who never missed a Rio.pm event. She was a true artist, an
enthusiast about writing code, singing arias and graffiting walls. We'll never
forget you.
.PP
Greg McCarroll died on August 28, 2013.
.PP
Greg was well known for many good reasons. He was one of the organisers of
the first YAPC::Europe, which concluded with an unscheduled auction where he
frantically tried to raise extra money to avoid the conference making a
loss. It was Greg who mistakenly arrived for a london.pm meeting a week
late; some years later he was the one who sold the choice of official
meeting date at a YAPC::Europe auction, and eventually as glorious leader of
london.pm he got to inherit the irreverent confusion that he had created.
.PP
Always helpful, friendly and cheerfully optimistic, you will be missed, but
never forgotten.
.SH Acknowledgements
.IX Header "Acknowledgements"
Perl 5.20.0 represents approximately 12 months of development since Perl 5.18.0
and contains approximately 470,000 lines of changes across 2,900 files from 124
authors.
.PP
Excluding auto-generated files, documentation and release tools, there were
approximately 280,000 lines of changes to 1,800 .pm, .t, .c and .h files.
.PP
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.20.0:
.PP
Aaron Crane, Abhijit Menon-Sen, Abigail, Abir Viqar, Alan Haggai Alavi, Alan
Hourihane, Alexander Voronov, Alexandr Ciornii, Andy Dougherty, Anno Siegel,
Aristotle Pagaltzis, Arthur Axel 'fREW' Schmidt, Brad Gilbert, Brendan Byrd,
Brian Childs, Brian Fraser, Brian Gottreu, Chris 'BinGOs' Williams, Christian
Millour, Colin Kuskie, Craig A. Berry, Dabrien 'Dabe' Murphy, Dagfinn Ilmari
Mannsåker, Daniel Dragan, Darin McBride, David Golden, David Leadbeater, David
Mitchell, David Nicol, David Steinbrunner, Dennis Kaarsemaker, Dominic
Hargreaves, Ed Avis, Eric Brine, Evan Zacks, Father Chrysostomos, Florian
Ragwitz, François Perrad, Gavin Shelley, Gideon Israel Dsouza, Gisle Aas,
Graham Knop, H.Merijn Brand, Hauke D, Heiko Eissfeldt, Hiroo Hayashi, Hojung
Youn, James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Jess Robinson, Jesse
Luehrs, Johan Vromans, John Gardiner Myers, John Goodyear, John P. Linderman,
John Peacock, kafka, Kang-min Liu, Karen Etheridge, Karl Williamson, Keedi Kim,
Kent Fredric, kevin dawson, Kevin Falcone, Kevin Ryde, Leon Timmermans, Lukas
Mai, Marc Simpson, Marcel Grünauer, Marco Peereboom, Marcus Holland-Moritz,
Mark Jason Dominus, Martin McGrath, Matthew Horsfall, Max Maischein, Mike
Doherty, Moritz Lenz, Nathan Glenn, Nathan Trapuzzano, Neil Bowers, Neil
Williams, Nicholas Clark, Niels Thykier, Niko Tyni, Olivier Mengué, Owain G.
Ainsworth, Paul Green, Paul Johnson, Peter John Acklam, Peter Martini, Peter
Rabbitson, Petr Písař, Philip Boulain, Philip Guenther, Piotr Roszatycki,
Rafael Garcia-Suarez, Reini Urban, Reuben Thomas, Ricardo Signes, Ruslan
Zakirov, Sergey Alekseev, Shirakata Kentaro, Shlomi Fish, Slaven Rezic,
Smylers, Steffen Müller, Steve Hay, Sullivan Beck, Thomas Sibley, Tobias
Leich, Toby Inkster, Tokuhiro Matsuno, Tom Christiansen, Tom Hukins, Tony Cook,
Victor Efimov, Viktor Turskyi, Vladimir Timofeev, YAMASHINA Hio, Yves Orton,
Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason.
.PP
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.
.PP
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.
.PP
For a more complete list of all of Perl's historical contributors, please see
the \fIAUTHORS\fR file in the Perl source distribution.
.SH "Reporting Bugs"
.IX Header "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.
.PP
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 \f(CW\*(C`perl \-V\*(C'\fR,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
.PP
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.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
The \fIChanges\fR file for an explanation of how to view exhaustive details on
what changed.
.PP
The \fIINSTALL\fR file for how to build Perl.
.PP
The \fIREADME\fR file for general stuff.
.PP
The \fIArtistic\fR and \fICopying\fR files for copyright information.