| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "PERL5200DELTA 1" |
| 58 |
.TH PERL5200DELTA 1 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide" |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
perl5200delta \- what is new for perl v5.20.0 |
| 65 |
.SH DESCRIPTION |
| 66 |
.IX Header "DESCRIPTION" |
| 67 |
This document describes differences between the 5.18.0 release and the |
| 68 |
5.20.0 release. |
| 69 |
.PP |
| 70 |
If you are upgrading from an earlier release such as 5.16.0, first read |
| 71 |
perl5180delta, which describes differences between 5.16.0 and 5.18.0. |
| 72 |
.SH "Core Enhancements" |
| 73 |
.IX Header "Core Enhancements" |
| 74 |
.SS "Experimental Subroutine signatures" |
| 75 |
.IX Subsection "Experimental Subroutine signatures" |
| 76 |
Declarative syntax to unwrap argument list into lexical variables. |
| 77 |
\&\f(CW\*(C`sub foo ($a,$b) {...}\*(C'\fR checks the number of arguments and puts the |
| 78 |
arguments into lexical variables. Signatures are not equivalent to |
| 79 |
the existing idiom of \f(CW\*(C`sub foo { my($a,$b) = @_; ... }\*(C'\fR. Signatures |
| 80 |
are only available by enabling a non-default feature, and generate |
| 81 |
warnings about being experimental. The syntactic clash with |
| 82 |
prototypes is managed by disabling the short prototype syntax when |
| 83 |
signatures are enabled. |
| 84 |
.PP |
| 85 |
See "Signatures" in perlsub for details. |
| 86 |
.ie n .SS """sub""s now take a ""prototype"" attribute" |
| 87 |
.el .SS "\f(CWsub\fPs now take a \f(CWprototype\fP attribute" |
| 88 |
.IX Subsection "subs now take a prototype attribute" |
| 89 |
When declaring or defining a \f(CW\*(C`sub\*(C'\fR, the prototype can now be specified inside |
| 90 |
of a \f(CW\*(C`prototype\*(C'\fR attribute instead of in parens following the name. |
| 91 |
.PP |
| 92 |
For example, \f(CW\*(C`sub foo($$){}\*(C'\fR could be rewritten as |
| 93 |
\&\f(CW\*(C`sub foo : prototype($$){}\*(C'\fR. |
| 94 |
.SS "More consistent prototype parsing" |
| 95 |
.IX Subsection "More consistent prototype parsing" |
| 96 |
Multiple semicolons in subroutine prototypes have long been tolerated and |
| 97 |
treated as a single semicolon. There was one case where this did not |
| 98 |
happen. A subroutine whose prototype begins with "*" or ";*" can affect |
| 99 |
whether a bareword is considered a method name or sub call. This now |
| 100 |
applies also to ";;;*". |
| 101 |
.PP |
| 102 |
Whitespace has long been allowed inside subroutine prototypes, so |
| 103 |
\&\f(CW\*(C`sub( $ $ )\*(C'\fR is equivalent to \f(CWsub($$)\fR, but until now it was stripped |
| 104 |
when the subroutine was parsed. Hence, whitespace was \fInot\fR allowed in |
| 105 |
prototypes set by \f(CW\*(C`Scalar::Util::set_prototype\*(C'\fR. Now it is permitted, |
| 106 |
and the parser no longer strips whitespace. This means |
| 107 |
\&\f(CW\*(C`prototype &mysub\*(C'\fR returns the original prototype, whitespace and all. |
| 108 |
.ie n .SS """rand"" now uses a consistent random number generator" |
| 109 |
.el .SS "\f(CWrand\fP now uses a consistent random number generator" |
| 110 |
.IX Subsection "rand now uses a consistent random number generator" |
| 111 |
Previously perl would use a platform specific random number generator, varying |
| 112 |
between the libc \fBrand()\fR, \fBrandom()\fR or \fBdrand48()\fR. |
| 113 |
.PP |
| 114 |
This meant that the quality of perl's random numbers would vary from platform |
| 115 |
to platform, from the 15 bits of \fBrand()\fR on Windows to 48\-bits on POSIX |
| 116 |
platforms such as Linux with \fBdrand48()\fR. |
| 117 |
.PP |
| 118 |
Perl now uses its own internal \fBdrand48()\fR implementation on all platforms. This |
| 119 |
does not make perl's \f(CW\*(C`rand\*(C'\fR cryptographically secure. [perl #115928] |
| 120 |
.SS "New slice syntax" |
| 121 |
.IX Subsection "New slice syntax" |
| 122 |
The new \f(CW%hash{...}\fR and \f(CW%array[...]\fR syntax returns a list of key/value (or |
| 123 |
index/value) pairs. See "Key/Value Hash Slices" in perldata. |
| 124 |
.SS "Experimental Postfix Dereferencing" |
| 125 |
.IX Subsection "Experimental Postfix Dereferencing" |
| 126 |
When the \f(CW\*(C`postderef\*(C'\fR feature is in effect, the following syntactical |
| 127 |
equivalencies are set up: |
| 128 |
.PP |
| 129 |
.Vb 5 |
| 130 |
\& $sref\->$*; # same as ${ $sref } # interpolates |
| 131 |
\& $aref\->@*; # same as @{ $aref } # interpolates |
| 132 |
\& $href\->%*; # same as %{ $href } |
| 133 |
\& $cref\->&*; # same as &{ $cref } |
| 134 |
\& $gref\->**; # same as *{ $gref } |
| 135 |
\& |
| 136 |
\& $aref\->$#*; # same as $#{ $aref } |
| 137 |
\& |
| 138 |
\& $gref\->*{ $slot }; # same as *{ $gref }{ $slot } |
| 139 |
\& |
| 140 |
\& $aref\->@[ ... ]; # same as @$aref[ ... ] # interpolates |
| 141 |
\& $href\->@{ ... }; # same as @$href{ ... } # interpolates |
| 142 |
\& $aref\->%[ ... ]; # same as %$aref[ ... ] |
| 143 |
\& $href\->%{ ... }; # same as %$href{ ... } |
| 144 |
.Ve |
| 145 |
.PP |
| 146 |
Those marked as interpolating only interpolate if the associated |
| 147 |
\&\f(CW\*(C`postderef_qq\*(C'\fR feature is also enabled. This feature is \fBexperimental\fR and |
| 148 |
will trigger \f(CW\*(C`experimental::postderef\*(C'\fR\-category warnings when used, unless |
| 149 |
they are suppressed. |
| 150 |
.PP |
| 151 |
For more information, consult the Postfix Dereference Syntax section of |
| 152 |
perlref. |
| 153 |
.SS "Unicode 6.3 now supported" |
| 154 |
.IX Subsection "Unicode 6.3 now supported" |
| 155 |
Perl now supports and is shipped with Unicode 6.3 (though Perl may be |
| 156 |
recompiled with any previous Unicode release as well). A detailed list of |
| 157 |
Unicode 6.3 changes is at <http://www.unicode.org/versions/Unicode6.3.0/>. |
| 158 |
.ie n .SS "New ""\ep{Unicode}"" regular expression pattern property" |
| 159 |
.el .SS "New \f(CW\ep{Unicode}\fP regular expression pattern property" |
| 160 |
.IX Subsection "New p{Unicode} regular expression pattern property" |
| 161 |
This is a synonym for \f(CW\*(C`\ep{Any}\*(C'\fR and matches the set of Unicode-defined |
| 162 |
code points 0 \- 0x10FFFF. |
| 163 |
.SS "Better 64\-bit support" |
| 164 |
.IX Subsection "Better 64-bit support" |
| 165 |
On 64\-bit platforms, the internal array functions now use 64\-bit offsets, |
| 166 |
allowing Perl arrays to hold more than 2**31 elements, if you have the memory |
| 167 |
available. |
| 168 |
.PP |
| 169 |
The regular expression engine now supports strings longer than 2**31 |
| 170 |
characters. [perl #112790, #116907] |
| 171 |
.PP |
| 172 |
The functions PerlIO_get_bufsiz, PerlIO_get_cnt, PerlIO_set_cnt and |
| 173 |
PerlIO_set_ptrcnt now have SSize_t, rather than int, return values and |
| 174 |
parameters. |
| 175 |
.ie n .SS """use\ locale"" now works on UTF\-8 locales" |
| 176 |
.el .SS "\f(CWuse\ locale\fP now works on UTF\-8 locales" |
| 177 |
.IX Subsection "use locale now works on UTF-8 locales" |
| 178 |
Until this release, only single-byte locales, such as the ISO 8859 |
| 179 |
series were supported. Now, the increasingly common multi-byte UTF\-8 |
| 180 |
locales are also supported. A UTF\-8 locale is one in which the |
| 181 |
character set is Unicode and the encoding is UTF\-8. The POSIX |
| 182 |
\&\f(CW\*(C`LC_CTYPE\*(C'\fR category operations (case changing (like \f(CWlc()\fR, \f(CW"\eU"\fR), |
| 183 |
and character classification (\f(CW\*(C`\ew\*(C'\fR, \f(CW\*(C`\eD\*(C'\fR, \f(CW\*(C`qr/[[:punct:]]/\*(C'\fR)) under |
| 184 |
such a locale work just as if not under locale, but instead as if under |
| 185 |
\&\f(CW\*(C`use\ feature\ \*(Aqunicode_strings\*(Aq\*(C'\fR, except taint rules are followed. |
| 186 |
Sorting remains by code point order in this release. [perl #56820]. |
| 187 |
.ie n .SS """use\ locale"" now compiles on systems without locale ability" |
| 188 |
.el .SS "\f(CWuse\ locale\fP now compiles on systems without locale ability" |
| 189 |
.IX Subsection "use locale now compiles on systems without locale ability" |
| 190 |
Previously doing this caused the program to not compile. Within its |
| 191 |
scope the program behaves as if in the "C" locale. Thus programs |
| 192 |
written for platforms that support locales can run on locale-less |
| 193 |
platforms without change. Attempts to change the locale away from the |
| 194 |
"C" locale will, of course, fail. |
| 195 |
.SS "More locale initialization fallback options" |
| 196 |
.IX Subsection "More locale initialization fallback options" |
| 197 |
If there was an error with locales during Perl start-up, it immediately |
| 198 |
gave up and tried to use the \f(CW"C"\fR locale. Now it first tries using |
| 199 |
other locales given by the environment variables, as detailed in |
| 200 |
"ENVIRONMENT" in perllocale. For example, if \f(CW\*(C`LC_ALL\*(C'\fR and \f(CW\*(C`LANG\*(C'\fR are |
| 201 |
both set, and using the \f(CW\*(C`LC_ALL\*(C'\fR locale fails, Perl will now try the |
| 202 |
\&\f(CW\*(C`LANG\*(C'\fR locale, and only if that fails, will it fall back to \f(CW"C"\fR. On |
| 203 |
Windows machines, Perl will try, ahead of using \f(CW"C"\fR, the system |
| 204 |
default locale if all the locales given by environment variables fail. |
| 205 |
.ie n .SS """\-DL"" runtime option now added for tracing locale setting" |
| 206 |
.el .SS "\f(CW\-DL\fP runtime option now added for tracing locale setting" |
| 207 |
.IX Subsection "-DL runtime option now added for tracing locale setting" |
| 208 |
This is designed for Perl core developers to aid in field debugging bugs |
| 209 |
regarding locales. |
| 210 |
.SS "\fB\-F\fP now implies \fB\-a\fP and \fB\-a\fP implies \fB\-n\fP" |
| 211 |
.IX Subsection "-F now implies -a and -a implies -n" |
| 212 |
Previously \fB\-F\fR without \fB\-a\fR was a no-op, and \fB\-a\fR without \fB\-n\fR or \fB\-p\fR |
| 213 |
was a no-op, with this change, if you supply \fB\-F\fR then both \fB\-a\fR and \fB\-n\fR |
| 214 |
are implied and if you supply \fB\-a\fR then \fB\-n\fR is implied. |
| 215 |
.PP |
| 216 |
You can still use \fB\-p\fR for its extra behaviour. [perl #116190] |
| 217 |
.ie n .SS "$a and $b warnings exemption" |
| 218 |
.el .SS "\f(CW$a\fP and \f(CW$b\fP warnings exemption" |
| 219 |
.IX Subsection "$a and $b warnings exemption" |
| 220 |
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 |
| 221 |
once" warnings, even where \f(CW\*(C`sort\*(C'\fR is not used. This makes it easier for |
| 222 |
CPAN modules to provide functions using \f(CW$a\fR and \f(CW$b\fR for similar purposes. |
| 223 |
[perl #120462] |
| 224 |
.SH Security |
| 225 |
.IX Header "Security" |
| 226 |
.SS "Avoid possible read of \fBfree()\fPd memory during parsing" |
| 227 |
.IX Subsection "Avoid possible read of free()d memory during parsing" |
| 228 |
It was possible that \fBfree()\fRd memory could be read during parsing in the unusual |
| 229 |
circumstance of the Perl program ending with a heredoc and the last line of the |
| 230 |
file on disk having no terminating newline character. This has now been fixed. |
| 231 |
.SH "Incompatible Changes" |
| 232 |
.IX Header "Incompatible Changes" |
| 233 |
.ie n .SS """do"" can no longer be used to call subroutines" |
| 234 |
.el .SS "\f(CWdo\fP can no longer be used to call subroutines" |
| 235 |
.IX Subsection "do can no longer be used to call subroutines" |
| 236 |
The \f(CW\*(C`do SUBROUTINE(LIST)\*(C'\fR form has resulted in a deprecation warning |
| 237 |
since Perl v5.0.0, and is now a syntax error. |
| 238 |
.SS "Quote-like escape changes" |
| 239 |
.IX Subsection "Quote-like escape changes" |
| 240 |
The character after \f(CW\*(C`\ec\*(C'\fR in a double-quoted string ("..." or qq(...)) |
| 241 |
or regular expression must now be a printable character and may not be |
| 242 |
\&\f(CW\*(C`{\*(C'\fR. |
| 243 |
.PP |
| 244 |
A literal \f(CW\*(C`{\*(C'\fR after \f(CW\*(C`\eB\*(C'\fR or \f(CW\*(C`\eb\*(C'\fR is now fatal. |
| 245 |
.PP |
| 246 |
These were deprecated in perl v5.14.0. |
| 247 |
.SS "Tainting happens under more circumstances; now conforms to documentation" |
| 248 |
.IX Subsection "Tainting happens under more circumstances; now conforms to documentation" |
| 249 |
This affects regular expression matching and changing the case of a |
| 250 |
string (\f(CW\*(C`lc\*(C'\fR, \f(CW"\eU"\fR, \fIetc\fR.) within the scope of \f(CW\*(C`use locale\*(C'\fR. |
| 251 |
The result is now tainted based on the operation, no matter what the |
| 252 |
contents of the string were, as the documentation (perlsec, |
| 253 |
"SECURITY" in perllocale) indicates it should. Previously, for the case |
| 254 |
change operation, if the string contained no characters whose case |
| 255 |
change could be affected by the locale, the result would not be tainted. |
| 256 |
For example, the result of \f(CWuc()\fR on an empty string or one containing |
| 257 |
only above\-Latin1 code points is now tainted, and wasn't before. This |
| 258 |
leads to more consistent tainting results. Regular expression patterns |
| 259 |
taint their non-binary results (like \f(CW$&\fR, \f(CW$2\fR) if and only if the |
| 260 |
pattern contains elements whose matching depends on the current |
| 261 |
(potentially tainted) locale. Like the case changing functions, the |
| 262 |
actual contents of the string being matched now do not matter, whereas |
| 263 |
formerly it did. For example, if the pattern contains a \f(CW\*(C`\ew\*(C'\fR, the |
| 264 |
results will be tainted even if the match did not have to use that |
| 265 |
portion of the pattern to succeed or fail, because what a \f(CW\*(C`\ew\*(C'\fR matches |
| 266 |
depends on locale. However, for example, a \f(CW\*(C`.\*(C'\fR in a pattern will not |
| 267 |
enable tainting, because the dot matches any single character, and what |
| 268 |
the current locale is doesn't change in any way what matches and what |
| 269 |
doesn't. |
| 270 |
.ie n .SS """\ep{}"", ""\eP{}"" matching has changed for non-Unicode code points." |
| 271 |
.el .SS "\f(CW\ep{}\fP, \f(CW\eP{}\fP matching has changed for non-Unicode code points." |
| 272 |
.IX Subsection "p{}, P{} matching has changed for non-Unicode code points." |
| 273 |
\&\f(CW\*(C`\ep{}\*(C'\fR and \f(CW\*(C`\eP{}\*(C'\fR are defined by Unicode only on Unicode-defined code |
| 274 |
points (\f(CW\*(C`U+0000\*(C'\fR through \f(CW\*(C`U+10FFFF\*(C'\fR). Their behavior on matching |
| 275 |
these legal Unicode code points is unchanged, but there are changes for |
| 276 |
code points \f(CW0x110000\fR and above. Previously, Perl treated the result |
| 277 |
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 |
| 278 |
translates into "false". For \f(CW\*(C`\eP{}\*(C'\fR, this was then complemented into |
| 279 |
"true". A warning was supposed to be raised when this happened. |
| 280 |
However, various optimizations could prevent the warning, and the |
| 281 |
results were often counter-intuitive, with both a match and its seeming |
| 282 |
complement being false. Now all non-Unicode code points are treated as |
| 283 |
typical unassigned Unicode code points. This generally is more |
| 284 |
Do-What-I-Mean. A warning is raised only if the results are arguably |
| 285 |
different from a strict Unicode approach, and from what Perl used to do. |
| 286 |
Code that needs to be strictly Unicode compliant can make this warning |
| 287 |
fatal, and then Perl always raises the warning. |
| 288 |
.PP |
| 289 |
Details are in "Beyond Unicode code points" in perlunicode. |
| 290 |
.ie n .SS """\ep{All}"" has been expanded to match all possible code points" |
| 291 |
.el .SS "\f(CW\ep{All}\fP has been expanded to match all possible code points" |
| 292 |
.IX Subsection "p{All} has been expanded to match all possible code points" |
| 293 |
The Perl-defined regular expression pattern element \f(CW\*(C`\ep{All}\*(C'\fR, unused |
| 294 |
on CPAN, used to match just the Unicode code points; now it matches all |
| 295 |
possible code points; that is, it is equivalent to \f(CW\*(C`qr/./s\*(C'\fR. Thus |
| 296 |
\&\f(CW\*(C`\ep{All}\*(C'\fR is no longer synonymous with \f(CW\*(C`\ep{Any}\*(C'\fR, which continues to |
| 297 |
match just the Unicode code points, as Unicode says it should. |
| 298 |
.SS "Data::Dumper's output may change" |
| 299 |
.IX Subsection "Data::Dumper's output may change" |
| 300 |
Depending on the data structures dumped and the settings set for |
| 301 |
Data::Dumper, the dumped output may have changed from previous |
| 302 |
versions. |
| 303 |
.PP |
| 304 |
If you have tests that depend on the exact output of Data::Dumper, |
| 305 |
they may fail. |
| 306 |
.PP |
| 307 |
To avoid this problem in your code, test against the data structure |
| 308 |
from evaluating the dumped structure, instead of the dump itself. |
| 309 |
.ie n .SS "Locale decimal point character no longer leaks outside of ""use\ locale"" scope" |
| 310 |
.el .SS "Locale decimal point character no longer leaks outside of \f(CWuse\ locale\fP scope" |
| 311 |
.IX Subsection "Locale decimal point character no longer leaks outside of use locale scope" |
| 312 |
This is actually a bug fix, but some code has come to rely on the bug |
| 313 |
being present, so this change is listed here. The current locale that |
| 314 |
the program is running under is not supposed to be visible to Perl code |
| 315 |
except within the scope of a \f(CW\*(C`use\ locale\*(C'\fR. However, until now under |
| 316 |
certain circumstances, the character used for a decimal point (often a |
| 317 |
comma) leaked outside the scope. If your code is affected by this |
| 318 |
change, simply add a \f(CW\*(C`use\ locale\*(C'\fR. |
| 319 |
.SS "Assignments of Windows sockets error codes to $! now prefer \fIerrno.h\fP values over \fBWSAGetLastError()\fP values" |
| 320 |
.IX Subsection "Assignments of Windows sockets error codes to $! now prefer errno.h values over WSAGetLastError() values" |
| 321 |
In previous versions of Perl, Windows sockets error codes as returned by |
| 322 |
\&\fBWSAGetLastError()\fR were assigned to $!, and some constants such as ECONNABORTED, |
| 323 |
not in \fIerrno.h\fR in VC++ (or the various Windows ports of gcc) were defined to |
| 324 |
corresponding WSAE* values to allow $! to be tested against the E* constants |
| 325 |
exported by Errno and POSIX. |
| 326 |
.PP |
| 327 |
This worked well until VC++ 2010 and later, which introduced new E* constants |
| 328 |
with values > 100 into \fIerrno.h\fR, including some being (re)defined by perl |
| 329 |
to WSAE* values. That caused problems when linking XS code against other |
| 330 |
libraries which used the original definitions of \fIerrno.h\fR constants. |
| 331 |
.PP |
| 332 |
To avoid this incompatibility, perl now maps WSAE* error codes to E* values |
| 333 |
where possible, and assigns those values to $!. The E* constants exported by |
| 334 |
Errno and POSIX are updated to match so that testing $! against them, |
| 335 |
wherever previously possible, will continue to work as expected, and all E* |
| 336 |
constants found in \fIerrno.h\fR are now exported from those modules with their |
| 337 |
original \fIerrno.h\fR values. |
| 338 |
.PP |
| 339 |
In order to avoid breakage in existing Perl code which assigns WSAE* values to |
| 340 |
$!, perl now intercepts the assignment and performs the same mapping to E* |
| 341 |
values as it uses internally when assigning to $! itself. |
| 342 |
.PP |
| 343 |
However, one backwards-incompatibility remains: existing Perl code which |
| 344 |
compares $! against the numeric values of the WSAE* error codes that were |
| 345 |
previously assigned to $! will now be broken in those cases where a |
| 346 |
corresponding E* value has been assigned instead. This is only an issue for |
| 347 |
those E* values < 100, which were always exported from Errno and |
| 348 |
POSIX with their original \fIerrno.h\fR values, and therefore could not be used |
| 349 |
for WSAE* error code tests (e.g. WSAEINVAL is 10022, but the corresponding |
| 350 |
EINVAL is 22). (E* values > 100, if present, were redefined to WSAE* |
| 351 |
values anyway, so compatibility can be achieved by using the E* constants, |
| 352 |
which will work both before and after this change, albeit using different |
| 353 |
numeric values under the hood.) |
| 354 |
.ie n .SS "Functions ""PerlIO_vsprintf"" and ""PerlIO_sprintf"" have been removed" |
| 355 |
.el .SS "Functions \f(CWPerlIO_vsprintf\fP and \f(CWPerlIO_sprintf\fP have been removed" |
| 356 |
.IX Subsection "Functions PerlIO_vsprintf and PerlIO_sprintf have been removed" |
| 357 |
These two functions, undocumented, unused in CPAN, and problematic, have been |
| 358 |
removed. |
| 359 |
.SH Deprecations |
| 360 |
.IX Header "Deprecations" |
| 361 |
.ie n .SS "The ""/\eC/"" character class" |
| 362 |
.el .SS "The \f(CW/\eC/\fP character class" |
| 363 |
.IX Subsection "The /C/ character class" |
| 364 |
The \f(CW\*(C`/\eC/\*(C'\fR regular expression character class is deprecated. From perl |
| 365 |
5.22 onwards it will generate a warning, and from perl 5.24 onwards it |
| 366 |
will be a regular expression compiler error. If you need to examine the |
| 367 |
individual bytes that make up a UTF8\-encoded character, then use |
| 368 |
\&\f(CWutf8::encode()\fR on the string (or a copy) first. |
| 369 |
.SS "Literal control characters in variable names" |
| 370 |
.IX Subsection "Literal control characters in variable names" |
| 371 |
This deprecation affects things like $\ecT, where \ecT is a literal control (such |
| 372 |
as a \f(CW\*(C`NAK\*(C'\fR or \f(CW\*(C`NEGATIVE ACKNOWLEDGE\*(C'\fR character) in |
| 373 |
the source code. Surprisingly, it appears that originally this was intended as |
| 374 |
the canonical way of accessing variables like $^T, with the caret form only |
| 375 |
being added as an alternative. |
| 376 |
.PP |
| 377 |
The literal control form is being deprecated for two main reasons. It has what |
| 378 |
are likely unfixable bugs, such as $\ecI not working as an alias for $^I, and |
| 379 |
their usage not being portable to non-ASCII platforms: While $^T will work |
| 380 |
everywhere, \ecT is whitespace in EBCDIC. [perl #119123] |
| 381 |
.ie n .SS "References to non-integers and non-positive integers in $/" |
| 382 |
.el .SS "References to non-integers and non-positive integers in \f(CW$/\fP" |
| 383 |
.IX Subsection "References to non-integers and non-positive integers in $/" |
| 384 |
Setting \f(CW$/\fR to a reference to zero or a reference to a negative integer is |
| 385 |
now deprecated, and will behave \fBexactly\fR as though it was set to \f(CW\*(C`undef\*(C'\fR. |
| 386 |
If you want slurp behavior set \f(CW$/\fR to \f(CW\*(C`undef\*(C'\fR explicitly. |
| 387 |
.PP |
| 388 |
Setting \f(CW$/\fR to a reference to a non integer is now forbidden and will |
| 389 |
throw an error. Perl has never documented what would happen in this |
| 390 |
context and while it used to behave the same as setting \f(CW$/\fR to |
| 391 |
the address of the references in future it may behave differently, so we |
| 392 |
have forbidden this usage. |
| 393 |
.SS "Character matching routines in POSIX" |
| 394 |
.IX Subsection "Character matching routines in POSIX" |
| 395 |
Use of any of these functions in the \f(CW\*(C`POSIX\*(C'\fR module is now deprecated: |
| 396 |
\&\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, |
| 397 |
\&\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 |
| 398 |
functions are buggy and don't work on UTF\-8 encoded strings. See their |
| 399 |
entries in POSIX for more information. |
| 400 |
.PP |
| 401 |
A warning is raised on the first call to any of them from each place in |
| 402 |
the code that they are called. (Hence a repeated statement in a loop |
| 403 |
will raise just the one warning.) |
| 404 |
.SS "Interpreter-based threads are now \fIdiscouraged\fP" |
| 405 |
.IX Subsection "Interpreter-based threads are now discouraged" |
| 406 |
The "interpreter-based threads" provided by Perl are not the fast, lightweight |
| 407 |
system for multitasking that one might expect or hope for. Threads are |
| 408 |
implemented in a way that make them easy to misuse. Few people know how to |
| 409 |
use them correctly or will be able to provide help. |
| 410 |
.PP |
| 411 |
The use of interpreter-based threads in perl is officially |
| 412 |
discouraged. |
| 413 |
.SS "Module removals" |
| 414 |
.IX Subsection "Module removals" |
| 415 |
The following modules will be removed from the core distribution in a |
| 416 |
future release, and will at that time need to be installed from CPAN. |
| 417 |
Distributions on CPAN which require these modules will need to list them as |
| 418 |
prerequisites. |
| 419 |
.PP |
| 420 |
The core versions of these modules will now issue \f(CW"deprecated"\fR\-category |
| 421 |
warnings to alert you to this fact. To silence these deprecation warnings, |
| 422 |
install the modules in question from CPAN. |
| 423 |
.PP |
| 424 |
Note that the planned removal of these modules from core does not reflect a |
| 425 |
judgement about the quality of the code and should not be taken as a suggestion |
| 426 |
that their use be halted. Their disinclusion from core primarily hinges on |
| 427 |
their necessity to bootstrapping a fully functional, CPAN-capable Perl |
| 428 |
installation, not on concerns over their design. |
| 429 |
.IP "CGI and its associated CGI:: packages" 4 |
| 430 |
.IX Item "CGI and its associated CGI:: packages" |
| 431 |
.PD 0 |
| 432 |
.IP inc::latest 4 |
| 433 |
.IX Item "inc::latest" |
| 434 |
.IP Package::Constants 4 |
| 435 |
.IX Item "Package::Constants" |
| 436 |
.IP "Module::Build and its associated Module::Build:: packages" 4 |
| 437 |
.IX Item "Module::Build and its associated Module::Build:: packages" |
| 438 |
.PD |
| 439 |
.SS "Utility removals" |
| 440 |
.IX Subsection "Utility removals" |
| 441 |
The following utilities will be removed from the core distribution in a |
| 442 |
future release, and will at that time need to be installed from CPAN. |
| 443 |
.IP find2perl 4 |
| 444 |
.IX Item "find2perl" |
| 445 |
.PD 0 |
| 446 |
.IP s2p 4 |
| 447 |
.IX Item "s2p" |
| 448 |
.IP a2p 4 |
| 449 |
.IX Item "a2p" |
| 450 |
.PD |
| 451 |
.SH "Performance Enhancements" |
| 452 |
.IX Header "Performance Enhancements" |
| 453 |
.IP \(bu 4 |
| 454 |
Perl has a new copy-on-write mechanism that avoids the need to copy the |
| 455 |
internal string buffer when assigning from one scalar to another. This |
| 456 |
makes copying large strings appear much faster. Modifying one of the two |
| 457 |
(or more) strings after an assignment will force a copy internally. This |
| 458 |
makes it unnecessary to pass strings by reference for efficiency. |
| 459 |
.Sp |
| 460 |
This feature was already available in 5.18.0, but wasn't enabled by |
| 461 |
default. It is the default now, and so you no longer need build perl with |
| 462 |
the \fIConfigure\fR argument: |
| 463 |
.Sp |
| 464 |
.Vb 1 |
| 465 |
\& \-Accflags=\-DPERL_NEW_COPY_ON_WRITE |
| 466 |
.Ve |
| 467 |
.Sp |
| 468 |
It can be disabled (for now) in a perl build with: |
| 469 |
.Sp |
| 470 |
.Vb 1 |
| 471 |
\& \-Accflags=\-DPERL_NO_COW |
| 472 |
.Ve |
| 473 |
.Sp |
| 474 |
On some operating systems Perl can be compiled in such a way that any |
| 475 |
attempt to modify string buffers shared by multiple SVs will crash. This |
| 476 |
way XS authors can test that their modules handle copy-on-write scalars |
| 477 |
correctly. See "Copy on Write" in perlguts for detail. |
| 478 |
.IP \(bu 4 |
| 479 |
Perl has an optimizer for regular expression patterns. It analyzes the pattern |
| 480 |
to find things such as the minimum length a string has to be to match, etc. It |
| 481 |
now better handles code points that are above the Latin1 range. |
| 482 |
.IP \(bu 4 |
| 483 |
Executing a regex that contains the \f(CW\*(C`^\*(C'\fR anchor (or its variant under the |
| 484 |
\&\f(CW\*(C`/m\*(C'\fR flag) has been made much faster in several situations. |
| 485 |
.IP \(bu 4 |
| 486 |
Precomputed hash values are now used in more places during method lookup. |
| 487 |
.IP \(bu 4 |
| 488 |
Constant hash key lookups (\f(CW$hash{key}\fR as opposed to \f(CW$hash{$key}\fR) have |
| 489 |
long had the internal hash value computed at compile time, to speed up |
| 490 |
lookup. This optimisation has only now been applied to hash slices as |
| 491 |
well. |
| 492 |
.IP \(bu 4 |
| 493 |
Combined \f(CW\*(C`and\*(C'\fR and \f(CW\*(C`or\*(C'\fR operators in void context, like those |
| 494 |
generated for \f(CW\*(C`unless ($a && $b)\*(C'\fR and \f(CW\*(C`if ($a || b)\*(C'\fR now |
| 495 |
short circuit directly to the end of the statement. [perl #120128] |
| 496 |
.IP \(bu 4 |
| 497 |
In certain situations, when \f(CW\*(C`return\*(C'\fR is the last statement in a subroutine's |
| 498 |
main scope, it will be optimized out. This means code like: |
| 499 |
.Sp |
| 500 |
.Vb 1 |
| 501 |
\& sub baz { return $cat; } |
| 502 |
.Ve |
| 503 |
.Sp |
| 504 |
will now behave like: |
| 505 |
.Sp |
| 506 |
.Vb 1 |
| 507 |
\& sub baz { $cat; } |
| 508 |
.Ve |
| 509 |
.Sp |
| 510 |
which is notably faster. |
| 511 |
.Sp |
| 512 |
[perl #120765] |
| 513 |
.IP \(bu 4 |
| 514 |
Code like: |
| 515 |
.Sp |
| 516 |
.Vb 2 |
| 517 |
\& my $x; # or @x, %x |
| 518 |
\& my $y; |
| 519 |
.Ve |
| 520 |
.Sp |
| 521 |
is now optimized to: |
| 522 |
.Sp |
| 523 |
.Vb 1 |
| 524 |
\& my ($x, $y); |
| 525 |
.Ve |
| 526 |
.Sp |
| 527 |
In combination with the padrange optimization introduced in |
| 528 |
v5.18.0, this means longer uninitialized my |
| 529 |
variable statements are also optimized, so: |
| 530 |
.Sp |
| 531 |
.Vb 1 |
| 532 |
\& my $x; my @y; my %z; |
| 533 |
.Ve |
| 534 |
.Sp |
| 535 |
becomes: |
| 536 |
.Sp |
| 537 |
.Vb 1 |
| 538 |
\& my ($x, @y, %z); |
| 539 |
.Ve |
| 540 |
.Sp |
| 541 |
[perl #121077] |
| 542 |
.IP \(bu 4 |
| 543 |
The creation of certain sorts of lists, including array and hash slices, is now |
| 544 |
faster. |
| 545 |
.IP \(bu 4 |
| 546 |
The optimisation for arrays indexed with a small constant integer is now |
| 547 |
applied for integers in the range \-128..127, rather than 0..255. This should |
| 548 |
speed up Perl code using expressions like \f(CW$x[\-1]\fR, at the expense of |
| 549 |
(presumably much rarer) code using expressions like \f(CW$x[200]\fR. |
| 550 |
.IP \(bu 4 |
| 551 |
The first iteration over a large hash (using \f(CW\*(C`keys\*(C'\fR or \f(CW\*(C`each\*(C'\fR) is now |
| 552 |
faster. This is achieved by preallocating the hash's internal iterator |
| 553 |
state, rather than lazily creating it when the hash is first iterated. (For |
| 554 |
small hashes, the iterator is still created only when first needed. The |
| 555 |
assumption is that small hashes are more likely to be used as objects, and |
| 556 |
therefore never allocated. For large hashes, that's less likely to be true, |
| 557 |
and the cost of allocating the iterator is swamped by the cost of allocating |
| 558 |
space for the hash itself.) |
| 559 |
.IP \(bu 4 |
| 560 |
When doing a global regex match on a string that came from the \f(CW\*(C`readline\*(C'\fR |
| 561 |
or \f(CW\*(C`<>\*(C'\fR operator, the data is no longer copied unnecessarily. |
| 562 |
[perl #121259] |
| 563 |
.IP \(bu 4 |
| 564 |
Dereferencing (as in \f(CW\*(C`$obj\->[0]\*(C'\fR or \f(CW\*(C`$obj\->{k}\*(C'\fR) is now faster |
| 565 |
when \f(CW$obj\fR is an instance of a class that has overloaded methods, but |
| 566 |
doesn't overload any of the dereferencing methods \f(CW\*(C`@{}\*(C'\fR, \f(CW\*(C`%{}\*(C'\fR, and so on. |
| 567 |
.IP \(bu 4 |
| 568 |
Perl's optimiser no longer skips optimising code that follows certain |
| 569 |
\&\f(CW\*(C`eval {}\*(C'\fR expressions (including those with an apparent infinite loop). |
| 570 |
.IP \(bu 4 |
| 571 |
The implementation now does a better job of avoiding meaningless work at |
| 572 |
runtime. Internal effect-free "null" operations (created as a side-effect of |
| 573 |
parsing Perl programs) are normally deleted during compilation. That |
| 574 |
deletion is now applied in some situations that weren't previously handled. |
| 575 |
.IP \(bu 4 |
| 576 |
Perl now does less disk I/O when dealing with Unicode properties that cover |
| 577 |
up to three ranges of consecutive code points. |
| 578 |
.SH "Modules and Pragmata" |
| 579 |
.IX Header "Modules and Pragmata" |
| 580 |
.SS "New Modules and Pragmata" |
| 581 |
.IX Subsection "New Modules and Pragmata" |
| 582 |
.IP \(bu 4 |
| 583 |
experimental 0.007 has been added to the Perl core. |
| 584 |
.IP \(bu 4 |
| 585 |
IO::Socket::IP 0.29 has been added to the Perl core. |
| 586 |
.SS "Updated Modules and Pragmata" |
| 587 |
.IX Subsection "Updated Modules and Pragmata" |
| 588 |
.IP \(bu 4 |
| 589 |
Archive::Tar has been upgraded from version 1.90 to 1.96. |
| 590 |
.IP \(bu 4 |
| 591 |
arybase has been upgraded from version 0.06 to 0.07. |
| 592 |
.IP \(bu 4 |
| 593 |
Attribute::Handlers has been upgraded from version 0.94 to 0.96. |
| 594 |
.IP \(bu 4 |
| 595 |
attributes has been upgraded from version 0.21 to 0.22. |
| 596 |
.IP \(bu 4 |
| 597 |
autodie has been upgraded from version 2.13 to 2.23. |
| 598 |
.IP \(bu 4 |
| 599 |
AutoLoader has been upgraded from version 5.73 to 5.74. |
| 600 |
.IP \(bu 4 |
| 601 |
autouse has been upgraded from version 1.07 to 1.08. |
| 602 |
.IP \(bu 4 |
| 603 |
B has been upgraded from version 1.42 to 1.48. |
| 604 |
.IP \(bu 4 |
| 605 |
B::Concise has been upgraded from version 0.95 to 0.992. |
| 606 |
.IP \(bu 4 |
| 607 |
B::Debug has been upgraded from version 1.18 to 1.19. |
| 608 |
.IP \(bu 4 |
| 609 |
B::Deparse has been upgraded from version 1.20 to 1.26. |
| 610 |
.IP \(bu 4 |
| 611 |
base has been upgraded from version 2.18 to 2.22. |
| 612 |
.IP \(bu 4 |
| 613 |
Benchmark has been upgraded from version 1.15 to 1.18. |
| 614 |
.IP \(bu 4 |
| 615 |
bignum has been upgraded from version 0.33 to 0.37. |
| 616 |
.IP \(bu 4 |
| 617 |
Carp has been upgraded from version 1.29 to 1.3301. |
| 618 |
.IP \(bu 4 |
| 619 |
CGI has been upgraded from version 3.63 to 3.65. |
| 620 |
NOTE: CGI is deprecated and may be removed from a future version of Perl. |
| 621 |
.IP \(bu 4 |
| 622 |
charnames has been upgraded from version 1.36 to 1.40. |
| 623 |
.IP \(bu 4 |
| 624 |
Class::Struct has been upgraded from version 0.64 to 0.65. |
| 625 |
.IP \(bu 4 |
| 626 |
Compress::Raw::Bzip2 has been upgraded from version 2.060 to 2.064. |
| 627 |
.IP \(bu 4 |
| 628 |
Compress::Raw::Zlib has been upgraded from version 2.060 to 2.065. |
| 629 |
.IP \(bu 4 |
| 630 |
Config::Perl::V has been upgraded from version 0.17 to 0.20. |
| 631 |
.IP \(bu 4 |
| 632 |
constant has been upgraded from version 1.27 to 1.31. |
| 633 |
.IP \(bu 4 |
| 634 |
CPAN has been upgraded from version 2.00 to 2.05. |
| 635 |
.IP \(bu 4 |
| 636 |
CPAN::Meta has been upgraded from version 2.120921 to 2.140640. |
| 637 |
.IP \(bu 4 |
| 638 |
CPAN::Meta::Requirements has been upgraded from version 2.122 to 2.125. |
| 639 |
.IP \(bu 4 |
| 640 |
CPAN::Meta::YAML has been upgraded from version 0.008 to 0.012. |
| 641 |
.IP \(bu 4 |
| 642 |
Data::Dumper has been upgraded from version 2.145 to 2.151. |
| 643 |
.IP \(bu 4 |
| 644 |
DB has been upgraded from version 1.04 to 1.07. |
| 645 |
.IP \(bu 4 |
| 646 |
DB_File has been upgraded from version 1.827 to 1.831. |
| 647 |
.IP \(bu 4 |
| 648 |
DBM_Filter has been upgraded from version 0.05 to 0.06. |
| 649 |
.IP \(bu 4 |
| 650 |
deprecate has been upgraded from version 0.02 to 0.03. |
| 651 |
.IP \(bu 4 |
| 652 |
Devel::Peek has been upgraded from version 1.11 to 1.16. |
| 653 |
.IP \(bu 4 |
| 654 |
Devel::PPPort has been upgraded from version 3.20 to 3.21. |
| 655 |
.IP \(bu 4 |
| 656 |
diagnostics has been upgraded from version 1.31 to 1.34. |
| 657 |
.IP \(bu 4 |
| 658 |
Digest::MD5 has been upgraded from version 2.52 to 2.53. |
| 659 |
.IP \(bu 4 |
| 660 |
Digest::SHA has been upgraded from version 5.84 to 5.88. |
| 661 |
.IP \(bu 4 |
| 662 |
DynaLoader has been upgraded from version 1.18 to 1.25. |
| 663 |
.IP \(bu 4 |
| 664 |
Encode has been upgraded from version 2.49 to 2.60. |
| 665 |
.IP \(bu 4 |
| 666 |
encoding has been upgraded from version 2.6_01 to 2.12. |
| 667 |
.IP \(bu 4 |
| 668 |
English has been upgraded from version 1.06 to 1.09. |
| 669 |
.Sp |
| 670 |
\&\f(CW$OLD_PERL_VERSION\fR was added as an alias of \f(CW$]\fR. |
| 671 |
.IP \(bu 4 |
| 672 |
Errno has been upgraded from version 1.18 to 1.20_03. |
| 673 |
.IP \(bu 4 |
| 674 |
Exporter has been upgraded from version 5.68 to 5.70. |
| 675 |
.IP \(bu 4 |
| 676 |
ExtUtils::CBuilder has been upgraded from version 0.280210 to 0.280216. |
| 677 |
.IP \(bu 4 |
| 678 |
ExtUtils::Command has been upgraded from version 1.17 to 1.18. |
| 679 |
.IP \(bu 4 |
| 680 |
ExtUtils::Embed has been upgraded from version 1.30 to 1.32. |
| 681 |
.IP \(bu 4 |
| 682 |
ExtUtils::Install has been upgraded from version 1.59 to 1.67. |
| 683 |
.IP \(bu 4 |
| 684 |
ExtUtils::MakeMaker has been upgraded from version 6.66 to 6.98. |
| 685 |
.IP \(bu 4 |
| 686 |
ExtUtils::Miniperl has been upgraded from version to 1.01. |
| 687 |
.IP \(bu 4 |
| 688 |
ExtUtils::ParseXS has been upgraded from version 3.18 to 3.24. |
| 689 |
.IP \(bu 4 |
| 690 |
ExtUtils::Typemaps has been upgraded from version 3.19 to 3.24. |
| 691 |
.IP \(bu 4 |
| 692 |
ExtUtils::XSSymSet has been upgraded from version 1.2 to 1.3. |
| 693 |
.IP \(bu 4 |
| 694 |
feature has been upgraded from version 1.32 to 1.36. |
| 695 |
.IP \(bu 4 |
| 696 |
fields has been upgraded from version 2.16 to 2.17. |
| 697 |
.IP \(bu 4 |
| 698 |
File::Basename has been upgraded from version 2.84 to 2.85. |
| 699 |
.IP \(bu 4 |
| 700 |
File::Copy has been upgraded from version 2.26 to 2.29. |
| 701 |
.IP \(bu 4 |
| 702 |
File::DosGlob has been upgraded from version 1.10 to 1.12. |
| 703 |
.IP \(bu 4 |
| 704 |
File::Fetch has been upgraded from version 0.38 to 0.48. |
| 705 |
.IP \(bu 4 |
| 706 |
File::Find has been upgraded from version 1.23 to 1.27. |
| 707 |
.IP \(bu 4 |
| 708 |
File::Glob has been upgraded from version 1.20 to 1.23. |
| 709 |
.IP \(bu 4 |
| 710 |
File::Spec has been upgraded from version 3.40 to 3.47. |
| 711 |
.IP \(bu 4 |
| 712 |
File::Temp has been upgraded from version 0.23 to 0.2304. |
| 713 |
.IP \(bu 4 |
| 714 |
FileCache has been upgraded from version 1.08 to 1.09. |
| 715 |
.IP \(bu 4 |
| 716 |
Filter::Simple has been upgraded from version 0.89 to 0.91. |
| 717 |
.IP \(bu 4 |
| 718 |
Filter::Util::Call has been upgraded from version 1.45 to 1.49. |
| 719 |
.IP \(bu 4 |
| 720 |
Getopt::Long has been upgraded from version 2.39 to 2.42. |
| 721 |
.IP \(bu 4 |
| 722 |
Getopt::Std has been upgraded from version 1.07 to 1.10. |
| 723 |
.IP \(bu 4 |
| 724 |
Hash::Util::FieldHash has been upgraded from version 1.10 to 1.15. |
| 725 |
.IP \(bu 4 |
| 726 |
HTTP::Tiny has been upgraded from version 0.025 to 0.043. |
| 727 |
.IP \(bu 4 |
| 728 |
I18N::Langinfo has been upgraded from version 0.10 to 0.11. |
| 729 |
.IP \(bu 4 |
| 730 |
I18N::LangTags has been upgraded from version 0.39 to 0.40. |
| 731 |
.IP \(bu 4 |
| 732 |
if has been upgraded from version 0.0602 to 0.0603. |
| 733 |
.IP \(bu 4 |
| 734 |
inc::latest has been upgraded from version 0.4003 to 0.4205. |
| 735 |
NOTE: inc::latest is deprecated and may be removed from a future version of Perl. |
| 736 |
.IP \(bu 4 |
| 737 |
integer has been upgraded from version 1.00 to 1.01. |
| 738 |
.IP \(bu 4 |
| 739 |
IO has been upgraded from version 1.28 to 1.31. |
| 740 |
.IP \(bu 4 |
| 741 |
IO::Compress::Gzip and friends have been upgraded from version 2.060 to |
| 742 |
2.064. |
| 743 |
.IP \(bu 4 |
| 744 |
IPC::Cmd has been upgraded from version 0.80 to 0.92. |
| 745 |
.IP \(bu 4 |
| 746 |
IPC::Open3 has been upgraded from version 1.13 to 1.16. |
| 747 |
.IP \(bu 4 |
| 748 |
IPC::SysV has been upgraded from version 2.03 to 2.04. |
| 749 |
.IP \(bu 4 |
| 750 |
JSON::PP has been upgraded from version 2.27202 to 2.27203. |
| 751 |
.IP \(bu 4 |
| 752 |
List::Util has been upgraded from version 1.27 to 1.38. |
| 753 |
.IP \(bu 4 |
| 754 |
locale has been upgraded from version 1.02 to 1.03. |
| 755 |
.IP \(bu 4 |
| 756 |
Locale::Codes has been upgraded from version 3.25 to 3.30. |
| 757 |
.IP \(bu 4 |
| 758 |
Locale::Maketext has been upgraded from version 1.23 to 1.25. |
| 759 |
.IP \(bu 4 |
| 760 |
Math::BigInt has been upgraded from version 1.9991 to 1.9993. |
| 761 |
.IP \(bu 4 |
| 762 |
Math::BigInt::FastCalc has been upgraded from version 0.30 to 0.31. |
| 763 |
.IP \(bu 4 |
| 764 |
Math::BigRat has been upgraded from version 0.2604 to 0.2606. |
| 765 |
.IP \(bu 4 |
| 766 |
MIME::Base64 has been upgraded from version 3.13 to 3.14. |
| 767 |
.IP \(bu 4 |
| 768 |
Module::Build has been upgraded from version 0.4003 to 0.4205. |
| 769 |
NOTE: Module::Build is deprecated and may be removed from a future version of Perl. |
| 770 |
.IP \(bu 4 |
| 771 |
Module::CoreList has been upgraded from version 2.89 to 3.10. |
| 772 |
.IP \(bu 4 |
| 773 |
Module::Load has been upgraded from version 0.24 to 0.32. |
| 774 |
.IP \(bu 4 |
| 775 |
Module::Load::Conditional has been upgraded from version 0.54 to 0.62. |
| 776 |
.IP \(bu 4 |
| 777 |
Module::Metadata has been upgraded from version 1.000011 to 1.000019. |
| 778 |
.IP \(bu 4 |
| 779 |
mro has been upgraded from version 1.11 to 1.16. |
| 780 |
.IP \(bu 4 |
| 781 |
Net::Ping has been upgraded from version 2.41 to 2.43. |
| 782 |
.IP \(bu 4 |
| 783 |
Opcode has been upgraded from version 1.25 to 1.27. |
| 784 |
.IP \(bu 4 |
| 785 |
Package::Constants has been upgraded from version 0.02 to 0.04. |
| 786 |
NOTE: Package::Constants is deprecated and may be removed from a future version of Perl. |
| 787 |
.IP \(bu 4 |
| 788 |
Params::Check has been upgraded from version 0.36 to 0.38. |
| 789 |
.IP \(bu 4 |
| 790 |
parent has been upgraded from version 0.225 to 0.228. |
| 791 |
.IP \(bu 4 |
| 792 |
Parse::CPAN::Meta has been upgraded from version 1.4404 to 1.4414. |
| 793 |
.IP \(bu 4 |
| 794 |
Perl::OSType has been upgraded from version 1.003 to 1.007. |
| 795 |
.IP \(bu 4 |
| 796 |
perlfaq has been upgraded from version 5.0150042 to 5.0150044. |
| 797 |
.IP \(bu 4 |
| 798 |
PerlIO has been upgraded from version 1.07 to 1.09. |
| 799 |
.IP \(bu 4 |
| 800 |
PerlIO::encoding has been upgraded from version 0.16 to 0.18. |
| 801 |
.IP \(bu 4 |
| 802 |
PerlIO::scalar has been upgraded from version 0.16 to 0.18. |
| 803 |
.IP \(bu 4 |
| 804 |
PerlIO::via has been upgraded from version 0.12 to 0.14. |
| 805 |
.IP \(bu 4 |
| 806 |
Pod::Escapes has been upgraded from version 1.04 to 1.06. |
| 807 |
.IP \(bu 4 |
| 808 |
Pod::Functions has been upgraded from version 1.06 to 1.08. |
| 809 |
.IP \(bu 4 |
| 810 |
Pod::Html has been upgraded from version 1.18 to 1.21. |
| 811 |
.IP \(bu 4 |
| 812 |
Pod::Parser has been upgraded from version 1.60 to 1.62. |
| 813 |
.IP \(bu 4 |
| 814 |
Pod::Perldoc has been upgraded from version 3.19 to 3.23. |
| 815 |
.IP \(bu 4 |
| 816 |
Pod::Usage has been upgraded from version 1.61 to 1.63. |
| 817 |
.IP \(bu 4 |
| 818 |
POSIX has been upgraded from version 1.32 to 1.38_03. |
| 819 |
.IP \(bu 4 |
| 820 |
re has been upgraded from version 0.23 to 0.26. |
| 821 |
.IP \(bu 4 |
| 822 |
Safe has been upgraded from version 2.35 to 2.37. |
| 823 |
.IP \(bu 4 |
| 824 |
Scalar::Util has been upgraded from version 1.27 to 1.38. |
| 825 |
.IP \(bu 4 |
| 826 |
SDBM_File has been upgraded from version 1.09 to 1.11. |
| 827 |
.IP \(bu 4 |
| 828 |
Socket has been upgraded from version 2.009 to 2.013. |
| 829 |
.IP \(bu 4 |
| 830 |
Storable has been upgraded from version 2.41 to 2.49. |
| 831 |
.IP \(bu 4 |
| 832 |
strict has been upgraded from version 1.07 to 1.08. |
| 833 |
.IP \(bu 4 |
| 834 |
subs has been upgraded from version 1.01 to 1.02. |
| 835 |
.IP \(bu 4 |
| 836 |
Sys::Hostname has been upgraded from version 1.17 to 1.18. |
| 837 |
.IP \(bu 4 |
| 838 |
Sys::Syslog has been upgraded from version 0.32 to 0.33. |
| 839 |
.IP \(bu 4 |
| 840 |
Term::Cap has been upgraded from version 1.13 to 1.15. |
| 841 |
.IP \(bu 4 |
| 842 |
Term::ReadLine has been upgraded from version 1.12 to 1.14. |
| 843 |
.IP \(bu 4 |
| 844 |
Test::Harness has been upgraded from version 3.26 to 3.30. |
| 845 |
.IP \(bu 4 |
| 846 |
Test::Simple has been upgraded from version 0.98 to 1.001002. |
| 847 |
.IP \(bu 4 |
| 848 |
Text::ParseWords has been upgraded from version 3.28 to 3.29. |
| 849 |
.IP \(bu 4 |
| 850 |
Text::Tabs has been upgraded from version 2012.0818 to 2013.0523. |
| 851 |
.IP \(bu 4 |
| 852 |
Text::Wrap has been upgraded from version 2012.0818 to 2013.0523. |
| 853 |
.IP \(bu 4 |
| 854 |
Thread has been upgraded from version 3.02 to 3.04. |
| 855 |
.IP \(bu 4 |
| 856 |
Thread::Queue has been upgraded from version 3.02 to 3.05. |
| 857 |
.IP \(bu 4 |
| 858 |
threads has been upgraded from version 1.86 to 1.93. |
| 859 |
.IP \(bu 4 |
| 860 |
threads::shared has been upgraded from version 1.43 to 1.46. |
| 861 |
.IP \(bu 4 |
| 862 |
Tie::Array has been upgraded from version 1.05 to 1.06. |
| 863 |
.IP \(bu 4 |
| 864 |
Tie::File has been upgraded from version 0.99 to 1.00. |
| 865 |
.IP \(bu 4 |
| 866 |
Tie::Hash has been upgraded from version 1.04 to 1.05. |
| 867 |
.IP \(bu 4 |
| 868 |
Tie::Scalar has been upgraded from version 1.02 to 1.03. |
| 869 |
.IP \(bu 4 |
| 870 |
Tie::StdHandle has been upgraded from version 4.3 to 4.4. |
| 871 |
.IP \(bu 4 |
| 872 |
Time::HiRes has been upgraded from version 1.9725 to 1.9726. |
| 873 |
.IP \(bu 4 |
| 874 |
Time::Piece has been upgraded from version 1.20_01 to 1.27. |
| 875 |
.IP \(bu 4 |
| 876 |
Unicode::Collate has been upgraded from version 0.97 to 1.04. |
| 877 |
.IP \(bu 4 |
| 878 |
Unicode::Normalize has been upgraded from version 1.16 to 1.17. |
| 879 |
.IP \(bu 4 |
| 880 |
Unicode::UCD has been upgraded from version 0.51 to 0.57. |
| 881 |
.IP \(bu 4 |
| 882 |
utf8 has been upgraded from version 1.10 to 1.13. |
| 883 |
.IP \(bu 4 |
| 884 |
version has been upgraded from version 0.9902 to 0.9908. |
| 885 |
.IP \(bu 4 |
| 886 |
vmsish has been upgraded from version 1.03 to 1.04. |
| 887 |
.IP \(bu 4 |
| 888 |
warnings has been upgraded from version 1.18 to 1.23. |
| 889 |
.IP \(bu 4 |
| 890 |
Win32 has been upgraded from version 0.47 to 0.49. |
| 891 |
.IP \(bu 4 |
| 892 |
XS::Typemap has been upgraded from version 0.10 to 0.13. |
| 893 |
.IP \(bu 4 |
| 894 |
XSLoader has been upgraded from version 0.16 to 0.17. |
| 895 |
.SH Documentation |
| 896 |
.IX Header "Documentation" |
| 897 |
.SS "New Documentation" |
| 898 |
.IX Subsection "New Documentation" |
| 899 |
\fIperlrepository\fR |
| 900 |
.IX Subsection "perlrepository" |
| 901 |
.PP |
| 902 |
This document was removed (actually, renamed perlgit and given a major |
| 903 |
overhaul) in Perl v5.14, causing Perl documentation websites to show the now |
| 904 |
out of date version in Perl v5.12 as the latest version. It has now been |
| 905 |
restored in stub form, directing readers to current information. |
| 906 |
.SS "Changes to Existing Documentation" |
| 907 |
.IX Subsection "Changes to Existing Documentation" |
| 908 |
\fIperldata\fR |
| 909 |
.IX Subsection "perldata" |
| 910 |
.IP \(bu 4 |
| 911 |
New sections have been added to document the new index/value array slice and |
| 912 |
key/value hash slice syntax. |
| 913 |
.PP |
| 914 |
\fIperldebguts\fR |
| 915 |
.IX Subsection "perldebguts" |
| 916 |
.IP \(bu 4 |
| 917 |
The \f(CW\*(C`DB::goto\*(C'\fR and \f(CW\*(C`DB::lsub\*(C'\fR debugger subroutines are now documented. [perl |
| 918 |
#77680] |
| 919 |
.PP |
| 920 |
\fIperlexperiment\fR |
| 921 |
.IX Subsection "perlexperiment" |
| 922 |
.IP \(bu 4 |
| 923 |
\&\f(CW\*(C`\es\*(C'\fR matching \f(CW\*(C`\ecK\*(C'\fR is marked experimental. |
| 924 |
.IP \(bu 4 |
| 925 |
ithreads were accepted in v5.8.0 (but are discouraged as of v5.20.0). |
| 926 |
.IP \(bu 4 |
| 927 |
Long doubles are not considered experimental. |
| 928 |
.IP \(bu 4 |
| 929 |
Code in regular expressions, regular expression backtracking verbs, |
| 930 |
and lvalue subroutines are no longer listed as experimental. (This |
| 931 |
also affects perlre and perlsub.) |
| 932 |
.PP |
| 933 |
\fIperlfunc\fR |
| 934 |
.IX Subsection "perlfunc" |
| 935 |
.IP \(bu 4 |
| 936 |
\&\f(CW\*(C`chop\*(C'\fR and \f(CW\*(C`chomp\*(C'\fR now note that they can reset the hash iterator. |
| 937 |
.IP \(bu 4 |
| 938 |
\&\f(CW\*(C`exec\*(C'\fR's handling of arguments is now more clearly documented. |
| 939 |
.IP \(bu 4 |
| 940 |
\&\f(CW\*(C`eval EXPR\*(C'\fR now has caveats about expanding floating point numbers in some |
| 941 |
locales. |
| 942 |
.IP \(bu 4 |
| 943 |
\&\f(CW\*(C`goto EXPR\*(C'\fR is now documented to handle an expression that evaluates to a |
| 944 |
code reference as if it was \f(CW\*(C`goto &$coderef\*(C'\fR. This behavior is at least ten |
| 945 |
years old. |
| 946 |
.IP \(bu 4 |
| 947 |
Since Perl v5.10, it has been possible for subroutines in \f(CW@INC\fR to return |
| 948 |
a reference to a scalar holding initial source code to prepend to the file. |
| 949 |
This is now documented. |
| 950 |
.IP \(bu 4 |
| 951 |
The documentation of \f(CW\*(C`ref\*(C'\fR has been updated to recommend the use of |
| 952 |
\&\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 |
| 953 |
objects. |
| 954 |
.PP |
| 955 |
\fIperlguts\fR |
| 956 |
.IX Subsection "perlguts" |
| 957 |
.IP \(bu 4 |
| 958 |
Numerous minor changes have been made to reflect changes made to the perl |
| 959 |
internals in this release. |
| 960 |
.IP \(bu 4 |
| 961 |
New sections on Read-Only Values and |
| 962 |
Copy on Write have been added. |
| 963 |
.PP |
| 964 |
\fIperlhack\fR |
| 965 |
.IX Subsection "perlhack" |
| 966 |
.IP \(bu 4 |
| 967 |
The Super Quick Patch Guide section has |
| 968 |
been updated. |
| 969 |
.PP |
| 970 |
\fIperlhacktips\fR |
| 971 |
.IX Subsection "perlhacktips" |
| 972 |
.IP \(bu 4 |
| 973 |
The documentation has been updated to include some more examples of \f(CW\*(C`gdb\*(C'\fR |
| 974 |
usage. |
| 975 |
.PP |
| 976 |
\fIperllexwarn\fR |
| 977 |
.IX Subsection "perllexwarn" |
| 978 |
.IP \(bu 4 |
| 979 |
The perllexwarn documentation used to describe the hierarchy of warning |
| 980 |
categories understood by the warnings pragma. That description has now |
| 981 |
been moved to the warnings documentation itself, leaving perllexwarn |
| 982 |
as a stub that points to it. This change consolidates all documentation for |
| 983 |
lexical warnings in a single place. |
| 984 |
.PP |
| 985 |
\fIperllocale\fR |
| 986 |
.IX Subsection "perllocale" |
| 987 |
.IP \(bu 4 |
| 988 |
The documentation now mentions \fR\f(BIfc()\fR\fI\fR and \f(CW\*(C`\eF\*(C'\fR, and includes many |
| 989 |
clarifications and corrections in general. |
| 990 |
.PP |
| 991 |
\fIperlop\fR |
| 992 |
.IX Subsection "perlop" |
| 993 |
.IP \(bu 4 |
| 994 |
The language design of Perl has always called for monomorphic operators. |
| 995 |
This is now mentioned explicitly. |
| 996 |
.PP |
| 997 |
\fIperlopentut\fR |
| 998 |
.IX Subsection "perlopentut" |
| 999 |
.IP \(bu 4 |
| 1000 |
The \f(CW\*(C`open\*(C'\fR tutorial has been completely rewritten by Tom Christiansen, and now |
| 1001 |
focuses on covering only the basics, rather than providing a comprehensive |
| 1002 |
reference to all things openable. This rewrite came as the result of a |
| 1003 |
vigorous discussion on perl5\-porters kicked off by a set of improvements |
| 1004 |
written by Alexander Hartmaier to the existing perlopentut. A "more than |
| 1005 |
you ever wanted to know about \f(CW\*(C`open\*(C'\fR" document may follow in subsequent |
| 1006 |
versions of perl. |
| 1007 |
.PP |
| 1008 |
\fIperlre\fR |
| 1009 |
.IX Subsection "perlre" |
| 1010 |
.IP \(bu 4 |
| 1011 |
The fact that the regexp engine makes no effort to call (?{}) and (??{}) |
| 1012 |
constructs any specified number of times (although it will basically DWIM |
| 1013 |
in case of a successful match) has been documented. |
| 1014 |
.IP \(bu 4 |
| 1015 |
The \f(CW\*(C`/r\*(C'\fR modifier (for non-destructive substitution) is now documented. [perl |
| 1016 |
#119151] |
| 1017 |
.IP \(bu 4 |
| 1018 |
The documentation for \f(CW\*(C`/x\*(C'\fR and \f(CW\*(C`(?# comment)\*(C'\fR has been expanded and clarified. |
| 1019 |
.PP |
| 1020 |
\fIperlreguts\fR |
| 1021 |
.IX Subsection "perlreguts" |
| 1022 |
.IP \(bu 4 |
| 1023 |
The documentation has been updated in the light of recent changes to |
| 1024 |
\&\fIregcomp.c\fR. |
| 1025 |
.PP |
| 1026 |
\fIperlsub\fR |
| 1027 |
.IX Subsection "perlsub" |
| 1028 |
.IP \(bu 4 |
| 1029 |
The need to predeclare recursive functions with prototypes in order for the |
| 1030 |
prototype to be honoured in the recursive call is now documented. [perl #2726] |
| 1031 |
.IP \(bu 4 |
| 1032 |
A list of subroutine names used by the perl implementation is now included. |
| 1033 |
[perl #77680] |
| 1034 |
.PP |
| 1035 |
\fIperltrap\fR |
| 1036 |
.IX Subsection "perltrap" |
| 1037 |
.IP \(bu 4 |
| 1038 |
There is now a JavaScript section. |
| 1039 |
.PP |
| 1040 |
\fIperlunicode\fR |
| 1041 |
.IX Subsection "perlunicode" |
| 1042 |
.IP \(bu 4 |
| 1043 |
The documentation has been updated to reflect \f(CW\*(C`Bidi_Class\*(C'\fR changes in |
| 1044 |
Unicode 6.3. |
| 1045 |
.PP |
| 1046 |
\fIperlvar\fR |
| 1047 |
.IX Subsection "perlvar" |
| 1048 |
.IP \(bu 4 |
| 1049 |
A new section explaining the performance issues of $`, $& and $', including |
| 1050 |
workarounds and changes in different versions of Perl, has been added. |
| 1051 |
.IP \(bu 4 |
| 1052 |
Three English variable names which have long been documented but do not |
| 1053 |
actually exist have been removed from the documentation. These were |
| 1054 |
\&\f(CW$OLD_PERL_VERSION\fR, \f(CW$OFMT\fR, and \f(CW$ARRAY_BASE\fR. |
| 1055 |
.Sp |
| 1056 |
(Actually, \f(CW\*(C`OLD_PERL_VERSION\*(C'\fR \fIdoes\fR exist, starting with this revision, but |
| 1057 |
remained undocumented until perl 5.22.0.) |
| 1058 |
.PP |
| 1059 |
\fIperlxs\fR |
| 1060 |
.IX Subsection "perlxs" |
| 1061 |
.IP \(bu 4 |
| 1062 |
Several problems in the \f(CW\*(C`MY_CXT\*(C'\fR example have been fixed. |
| 1063 |
.SH Diagnostics |
| 1064 |
.IX Header "Diagnostics" |
| 1065 |
The following additions or changes have been made to diagnostic output, |
| 1066 |
including warnings and fatal error messages. For the complete list of |
| 1067 |
diagnostic messages, see perldiag. |
| 1068 |
.SS "New Diagnostics" |
| 1069 |
.IX Subsection "New Diagnostics" |
| 1070 |
\fINew Errors\fR |
| 1071 |
.IX Subsection "New Errors" |
| 1072 |
.IP \(bu 4 |
| 1073 |
delete argument is index/value array slice, use array slice |
| 1074 |
.Sp |
| 1075 |
(F) You used index/value array slice syntax (\f(CW%array[...]\fR) as the argument to |
| 1076 |
\&\f(CW\*(C`delete\*(C'\fR. You probably meant \f(CW@array[...]\fR with an @ symbol instead. |
| 1077 |
.IP \(bu 4 |
| 1078 |
delete argument is key/value hash slice, use hash slice |
| 1079 |
.Sp |
| 1080 |
(F) You used key/value hash slice syntax (\f(CW%hash{...}\fR) as the argument to |
| 1081 |
\&\f(CW\*(C`delete\*(C'\fR. You probably meant \f(CW@hash{...}\fR with an @ symbol instead. |
| 1082 |
.IP \(bu 4 |
| 1083 |
Magical list constants are not supported |
| 1084 |
.Sp |
| 1085 |
(F) You assigned a magical array to a stash element, and then tried to use the |
| 1086 |
subroutine from the same slot. You are asking Perl to do something it cannot |
| 1087 |
do, details subject to change between Perl versions. |
| 1088 |
.IP \(bu 4 |
| 1089 |
Added Setting $/ to a \f(CW%s\fR reference is forbidden |
| 1090 |
.PP |
| 1091 |
\fINew Warnings\fR |
| 1092 |
.IX Subsection "New Warnings" |
| 1093 |
.IP \(bu 4 |
| 1094 |
\&\f(CW%s\fR on reference is experimental: |
| 1095 |
.Sp |
| 1096 |
The "auto-deref" feature is experimental. |
| 1097 |
.Sp |
| 1098 |
Starting in v5.14.0, it was possible to use push, pop, keys, and other |
| 1099 |
built-in functions not only on aggregate types, but on references to |
| 1100 |
them. The feature was not deployed to its original intended |
| 1101 |
specification, and now may become redundant to postfix dereferencing. |
| 1102 |
It has always been categorized as an experimental feature, and in |
| 1103 |
v5.20.0 is carries a warning as such. |
| 1104 |
.Sp |
| 1105 |
Warnings will now be issued at compile time when these operations are |
| 1106 |
detected. |
| 1107 |
.Sp |
| 1108 |
.Vb 1 |
| 1109 |
\& no if $] >= 5.01908, warnings => "experimental::autoderef"; |
| 1110 |
.Ve |
| 1111 |
.Sp |
| 1112 |
Consider, though, replacing the use of these features, as they may |
| 1113 |
change behavior again before becoming stable. |
| 1114 |
.IP \(bu 4 |
| 1115 |
A sequence of multiple spaces in a charnames alias definition is deprecated |
| 1116 |
.Sp |
| 1117 |
Trailing white-space in a charnames alias definition is deprecated |
| 1118 |
.Sp |
| 1119 |
These two deprecation warnings involving \f(CW\*(C`\eN{...}\*(C'\fR were incorrectly |
| 1120 |
implemented. They did not warn by default (now they do) and could not be |
| 1121 |
made fatal via \f(CW\*(C`use warnings FATAL => \*(Aqdeprecated\*(Aq\*(C'\fR (now they can). |
| 1122 |
.IP \(bu 4 |
| 1123 |
Attribute prototype(%s) discards earlier prototype attribute in same sub |
| 1124 |
.Sp |
| 1125 |
(W misc) A sub was declared as \f(CW\*(C`sub foo : prototype(A) : prototype(B) {}\*(C'\fR, for |
| 1126 |
example. Since each sub can only have one prototype, the earlier |
| 1127 |
declaration(s) are discarded while the last one is applied. |
| 1128 |
.IP \(bu 4 |
| 1129 |
Invalid \e0 character in \f(CW%s\fR for \f(CW%s:\fR \f(CW%s\fR\e0%s |
| 1130 |
.Sp |
| 1131 |
(W syscalls) Embedded \e0 characters in pathnames or other system call arguments |
| 1132 |
produce a warning as of 5.20. The parts after the \e0 were formerly ignored by |
| 1133 |
system calls. |
| 1134 |
.IP \(bu 4 |
| 1135 |
Matched non-Unicode code point 0x%X against Unicode property; may not be portable. |
| 1136 |
.Sp |
| 1137 |
This replaces the message "Code point 0x%X is not Unicode, all \ep{} matches |
| 1138 |
fail; all \eP{} matches succeed". |
| 1139 |
.IP \(bu 4 |
| 1140 |
Missing ']' in prototype for \f(CW%s\fR : \f(CW%s\fR |
| 1141 |
.Sp |
| 1142 |
(W illegalproto) A grouping was started with \f(CW\*(C`[\*(C'\fR but never closed with \f(CW\*(C`]\*(C'\fR. |
| 1143 |
.IP \(bu 4 |
| 1144 |
Possible precedence issue with control flow operator |
| 1145 |
.Sp |
| 1146 |
(W syntax) There is a possible problem with the mixing of a control flow |
| 1147 |
operator (e.g. \f(CW\*(C`return\*(C'\fR) and a low-precedence operator like \f(CW\*(C`or\*(C'\fR. Consider: |
| 1148 |
.Sp |
| 1149 |
.Vb 1 |
| 1150 |
\& sub { return $a or $b; } |
| 1151 |
.Ve |
| 1152 |
.Sp |
| 1153 |
This is parsed as: |
| 1154 |
.Sp |
| 1155 |
.Vb 1 |
| 1156 |
\& sub { (return $a) or $b; } |
| 1157 |
.Ve |
| 1158 |
.Sp |
| 1159 |
Which is effectively just: |
| 1160 |
.Sp |
| 1161 |
.Vb 1 |
| 1162 |
\& sub { return $a; } |
| 1163 |
.Ve |
| 1164 |
.Sp |
| 1165 |
Either use parentheses or the high-precedence variant of the operator. |
| 1166 |
.Sp |
| 1167 |
Note this may be also triggered for constructs like: |
| 1168 |
.Sp |
| 1169 |
.Vb 1 |
| 1170 |
\& sub { 1 if die; } |
| 1171 |
.Ve |
| 1172 |
.IP \(bu 4 |
| 1173 |
Postfix dereference is experimental |
| 1174 |
.Sp |
| 1175 |
(S experimental::postderef) This warning is emitted if you use the experimental |
| 1176 |
postfix dereference syntax. Simply suppress the warning if you want to use the |
| 1177 |
feature, but know that in doing so you are taking the risk of using an |
| 1178 |
experimental feature which may change or be removed in a future Perl version: |
| 1179 |
.Sp |
| 1180 |
.Vb 6 |
| 1181 |
\& no warnings "experimental::postderef"; |
| 1182 |
\& use feature "postderef", "postderef_qq"; |
| 1183 |
\& $ref\->$*; |
| 1184 |
\& $aref\->@*; |
| 1185 |
\& $aref\->@[@indices]; |
| 1186 |
\& ... etc ... |
| 1187 |
.Ve |
| 1188 |
.IP \(bu 4 |
| 1189 |
Prototype '%s' overridden by attribute 'prototype(%s)' in \f(CW%s\fR |
| 1190 |
.Sp |
| 1191 |
(W prototype) A prototype was declared in both the parentheses after the sub |
| 1192 |
name and via the prototype attribute. The prototype in parentheses is useless, |
| 1193 |
since it will be replaced by the prototype from the attribute before it's ever |
| 1194 |
used. |
| 1195 |
.IP \(bu 4 |
| 1196 |
Scalar value @%s[%s] better written as $%s[%s] |
| 1197 |
.Sp |
| 1198 |
(W syntax) In scalar context, you've used an array index/value slice (indicated |
| 1199 |
by %) to select a single element of an array. Generally it's better to ask for |
| 1200 |
a scalar value (indicated by $). The difference is that \f(CW$foo[&bar]\fR always |
| 1201 |
behaves like a scalar, both in the value it returns and when evaluating its |
| 1202 |
argument, while \f(CW%foo[&bar]\fR provides a list context to its subscript, which |
| 1203 |
can do weird things if you're expecting only one subscript. When called in |
| 1204 |
list context, it also returns the index (what \f(CW&bar\fR returns) in addition to |
| 1205 |
the value. |
| 1206 |
.IP \(bu 4 |
| 1207 |
Scalar value @%s{%s} better written as $%s{%s} |
| 1208 |
.Sp |
| 1209 |
(W syntax) In scalar context, you've used a hash key/value slice (indicated by |
| 1210 |
%) to select a single element of a hash. Generally it's better to ask for a |
| 1211 |
scalar value (indicated by $). The difference is that \f(CW$foo{&bar}\fR always |
| 1212 |
behaves like a scalar, both in the value it returns and when evaluating its |
| 1213 |
argument, while \f(CW@foo{&bar}\fR and provides a list context to its subscript, |
| 1214 |
which can do weird things if you're expecting only one subscript. When called |
| 1215 |
in list context, it also returns the key in addition to the value. |
| 1216 |
.IP \(bu 4 |
| 1217 |
Setting $/ to a reference to \f(CW%s\fR as a form of slurp is deprecated, treating as undef |
| 1218 |
.IP \(bu 4 |
| 1219 |
Unexpected exit \f(CW%u\fR |
| 1220 |
.Sp |
| 1221 |
(S) \fBexit()\fR was called or the script otherwise finished gracefully when |
| 1222 |
\&\f(CW\*(C`PERL_EXIT_WARN\*(C'\fR was set in \f(CW\*(C`PL_exit_flags\*(C'\fR. |
| 1223 |
.IP \(bu 4 |
| 1224 |
Unexpected exit failure \f(CW%d\fR |
| 1225 |
.Sp |
| 1226 |
(S) An uncaught \fBdie()\fR was called when \f(CW\*(C`PERL_EXIT_WARN\*(C'\fR was set in |
| 1227 |
\&\f(CW\*(C`PL_exit_flags\*(C'\fR. |
| 1228 |
.IP \(bu 4 |
| 1229 |
Use of literal control characters in variable names is deprecated |
| 1230 |
.Sp |
| 1231 |
(D deprecated) Using literal control characters in the source to refer to the |
| 1232 |
^FOO variables, like $^X and ${^GLOBAL_PHASE} is now deprecated. This only |
| 1233 |
affects code like $\ecT, where \ecT is a control (like a \f(CW\*(C`SOH\*(C'\fR) in the |
| 1234 |
source code: ${"\ecT"} and $^T remain valid. |
| 1235 |
.IP \(bu 4 |
| 1236 |
Useless use of greediness modifier |
| 1237 |
.Sp |
| 1238 |
This fixes [Perl #42957]. |
| 1239 |
.SS "Changes to Existing Diagnostics" |
| 1240 |
.IX Subsection "Changes to Existing Diagnostics" |
| 1241 |
.IP \(bu 4 |
| 1242 |
Warnings and errors from the regexp engine are now UTF\-8 clean. |
| 1243 |
.IP \(bu 4 |
| 1244 |
The "Unknown switch condition" error message has some slight changes. This |
| 1245 |
error triggers when there is an unknown condition in a \f(CW\*(C`(?(foo))\*(C'\fR conditional. |
| 1246 |
The error message used to read: |
| 1247 |
.Sp |
| 1248 |
.Vb 1 |
| 1249 |
\& Unknown switch condition (?(%s in regex; |
| 1250 |
.Ve |
| 1251 |
.Sp |
| 1252 |
But what \f(CW%s\fR could be was mostly up to luck. For \f(CW\*(C`(?(foobar))\*(C'\fR, you might have |
| 1253 |
seen "fo" or "f". For Unicode characters, you would generally get a corrupted |
| 1254 |
string. The message has been changed to read: |
| 1255 |
.Sp |
| 1256 |
.Vb 1 |
| 1257 |
\& Unknown switch condition (?(...)) in regex; |
| 1258 |
.Ve |
| 1259 |
.Sp |
| 1260 |
Additionally, the \f(CW\*(Aq<\-\- HERE\*(Aq\fR marker in the error will now point to the |
| 1261 |
correct spot in the regex. |
| 1262 |
.IP \(bu 4 |
| 1263 |
The "%s "\ex%X" does not map to Unicode" warning is now correctly listed as a |
| 1264 |
severe warning rather than as a fatal error. |
| 1265 |
.IP \(bu 4 |
| 1266 |
Under rare circumstances, one could get a "Can't coerce readonly REF to |
| 1267 |
string" instead of the customary "Modification of a read-only value". This |
| 1268 |
alternate error message has been removed. |
| 1269 |
.IP \(bu 4 |
| 1270 |
"Ambiguous use of * resolved as operator *": This and similar warnings |
| 1271 |
about "%" and "&" used to occur in some circumstances where there was no |
| 1272 |
operator of the type cited, so the warning was completely wrong. This has |
| 1273 |
been fixed [perl #117535, #76910]. |
| 1274 |
.IP \(bu 4 |
| 1275 |
Warnings about malformed subroutine prototypes are now more consistent in |
| 1276 |
how the prototypes are rendered. Some of these warnings would truncate |
| 1277 |
prototypes containing nulls. In other cases one warning would suppress |
| 1278 |
another. The warning about illegal characters in prototypes no longer says |
| 1279 |
"after '_'" if the bad character came before the underscore. |
| 1280 |
.IP \(bu 4 |
| 1281 |
Perl folding rules are not up-to-date for 0x%X; please use the perlbug |
| 1282 |
utility to report; in regex; marked by <\-\- HERE in |
| 1283 |
m/%s/ |
| 1284 |
.Sp |
| 1285 |
This message is now only in the regexp category, and not in the deprecated |
| 1286 |
category. It is still a default (i.e., severe) warning [perl #89648]. |
| 1287 |
.IP \(bu 4 |
| 1288 |
%%s[%s] in scalar context better written as $%s[%s] |
| 1289 |
.Sp |
| 1290 |
This warning now occurs for any \f(CW%array[$index]\fR or \f(CW%hash{key}\fR known to |
| 1291 |
be in scalar context at compile time. Previously it was worded "Scalar |
| 1292 |
value %%s[%s] better written as $%s[%s]". |
| 1293 |
.IP \(bu 4 |
| 1294 |
Switch condition not recognized in regex; marked by <\-\- HERE in m/%s/: |
| 1295 |
.Sp |
| 1296 |
The description for this diagnostic has been extended to cover all cases where the warning may occur. |
| 1297 |
Issues with the positioning of the arrow indicator have also been resolved. |
| 1298 |
.IP \(bu 4 |
| 1299 |
The error messages for \f(CWmy($a?$b$c)\fR and \f(CWmy(do{})\fR now mention "conditional |
| 1300 |
expression" and "do block", respectively, instead of reading 'Can't declare |
| 1301 |
null operation in "my"'. |
| 1302 |
.IP \(bu 4 |
| 1303 |
When \f(CW\*(C`use re "debug"\*(C'\fR executes a regex containing a backreference, the |
| 1304 |
debugging output now shows what string is being matched. |
| 1305 |
.IP \(bu 4 |
| 1306 |
The now fatal error message \f(CW\*(C`Character following "\ec" must be ASCII\*(C'\fR has been |
| 1307 |
reworded as \f(CW\*(C`Character following "\ec" must be printable ASCII\*(C'\fR to emphasize |
| 1308 |
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. |
| 1309 |
.SH "Utility Changes" |
| 1310 |
.IX Header "Utility Changes" |
| 1311 |
\fIa2p\fR |
| 1312 |
.IX Subsection "a2p" |
| 1313 |
.IP \(bu 4 |
| 1314 |
A possible crash from an off-by-one error when trying to access before the |
| 1315 |
beginning of a buffer has been fixed. [perl #120244] |
| 1316 |
.PP |
| 1317 |
\fIbisect.pl\fR |
| 1318 |
.IX Subsection "bisect.pl" |
| 1319 |
.PP |
| 1320 |
The git bisection tool \fIPorting/bisect.pl\fR has had many enhancements. |
| 1321 |
.PP |
| 1322 |
It is provided as part of the source distribution but not installed because |
| 1323 |
it is not self-contained as it relies on being run from within a git |
| 1324 |
checkout. Note also that it makes no attempt to fix tests, correct runtime |
| 1325 |
bugs or make something useful to install \- its purpose is to make minimal |
| 1326 |
changes to get any historical revision of interest to build and run as close |
| 1327 |
as possible to "as-was", and thereby make \f(CW\*(C`git bisect\*(C'\fR easy to use. |
| 1328 |
.IP \(bu 4 |
| 1329 |
Can optionally run the test case with a timeout. |
| 1330 |
.IP \(bu 4 |
| 1331 |
Can now run in-place in a clean git checkout. |
| 1332 |
.IP \(bu 4 |
| 1333 |
Can run the test case under \f(CW\*(C`valgrind\*(C'\fR. |
| 1334 |
.IP \(bu 4 |
| 1335 |
Can apply user supplied patches and fixes to the source checkout before |
| 1336 |
building. |
| 1337 |
.IP \(bu 4 |
| 1338 |
Now has fixups to enable building several more historical ranges of bleadperl, |
| 1339 |
which can be useful for pinpointing the origins of bugs or behaviour changes. |
| 1340 |
.PP |
| 1341 |
\fIfind2perl\fR |
| 1342 |
.IX Subsection "find2perl" |
| 1343 |
.IP \(bu 4 |
| 1344 |
find2perl now handles \f(CW\*(C`?\*(C'\fR wildcards correctly. [perl #113054] |
| 1345 |
.PP |
| 1346 |
\fIperlbug\fR |
| 1347 |
.IX Subsection "perlbug" |
| 1348 |
.IP \(bu 4 |
| 1349 |
\&\fIperlbug\fR now has a \f(CW\*(C`\-p\*(C'\fR option for attaching patches with a bug report. |
| 1350 |
.IP \(bu 4 |
| 1351 |
perlbug has been modified to supply the report template with CRLF line |
| 1352 |
endings on Windows. |
| 1353 |
[GH #13612] <https://github.com/Perl/perl5/issues/13612> |
| 1354 |
.IP \(bu 4 |
| 1355 |
perlbug now makes as few assumptions as possible about the encoding of the |
| 1356 |
report. This will likely change in the future to assume UTF\-8 by default but |
| 1357 |
allow a user override. |
| 1358 |
.SH "Configuration and Compilation" |
| 1359 |
.IX Header "Configuration and Compilation" |
| 1360 |
.IP \(bu 4 |
| 1361 |
The \fIMakefile.PL\fR for SDBM_File now generates a better \fIMakefile\fR, which |
| 1362 |
avoids a race condition during parallel makes, which could cause the build to |
| 1363 |
fail. This is the last known parallel make problem (on *nix platforms), and |
| 1364 |
therefore we believe that a parallel make should now always be error free. |
| 1365 |
.IP \(bu 4 |
| 1366 |
\&\fIinstallperl\fR and \fIinstallman\fR's option handling has been refactored to use |
| 1367 |
Getopt::Long. Both are used by the \fIMakefile\fR \f(CW\*(C`install\*(C'\fR targets, and |
| 1368 |
are not installed, so these changes are only likely to affect custom |
| 1369 |
installation scripts. |
| 1370 |
.RS 4 |
| 1371 |
.IP \(bu 4 |
| 1372 |
Single letter options now also have long names. |
| 1373 |
.IP \(bu 4 |
| 1374 |
Invalid options are now rejected. |
| 1375 |
.IP \(bu 4 |
| 1376 |
Command line arguments that are not options are now rejected. |
| 1377 |
.IP \(bu 4 |
| 1378 |
Each now has a \f(CW\*(C`\-\-help\*(C'\fR option to display the usage message. |
| 1379 |
.RE |
| 1380 |
.RS 4 |
| 1381 |
.Sp |
| 1382 |
The behaviour for all valid documented invocations is unchanged. |
| 1383 |
.RE |
| 1384 |
.IP \(bu 4 |
| 1385 |
Where possible, the build now avoids recursive invocations of \fImake\fR when |
| 1386 |
building pure-Perl extensions, without removing any parallelism from the |
| 1387 |
build. Currently around 80 extensions can be processed directly by the |
| 1388 |
\&\fImake_ext.pl\fR tool, meaning that 80 invocations of \fImake\fR and 160 |
| 1389 |
invocations of \fIminiperl\fR are no longer made. |
| 1390 |
.IP \(bu 4 |
| 1391 |
The build system now works correctly when compiling under GCC or Clang with |
| 1392 |
link-time optimization enabled (the \f(CW\*(C`\-flto\*(C'\fR option). [perl #113022] |
| 1393 |
.IP \(bu 4 |
| 1394 |
Distinct library basenames with \f(CW\*(C`d_libname_unique\*(C'\fR. |
| 1395 |
.Sp |
| 1396 |
When compiling perl with this option, the library files for XS modules are |
| 1397 |
named something "unique" \-\- for example, Hash/Util/Util.so becomes |
| 1398 |
Hash/Util/PL_Hash_\|_Util.so. This behavior is similar to what currently |
| 1399 |
happens on VMS, and serves as groundwork for the Android port. |
| 1400 |
.IP \(bu 4 |
| 1401 |
\&\f(CW\*(C`sysroot\*(C'\fR option to indicate the logical root directory under gcc and clang. |
| 1402 |
.Sp |
| 1403 |
When building with this option set, both Configure and the compilers search |
| 1404 |
for all headers and libraries under this new sysroot, instead of /. |
| 1405 |
.Sp |
| 1406 |
This is a huge time saver if cross-compiling, but can also help |
| 1407 |
on native builds if your toolchain's files have non-standard locations. |
| 1408 |
.IP \(bu 4 |
| 1409 |
The cross-compilation model has been renovated. |
| 1410 |
There's several new options, and some backwards-incompatible changes: |
| 1411 |
.Sp |
| 1412 |
We now build binaries for miniperl and generate_uudmap to be used on the host, |
| 1413 |
rather than running every miniperl call on the target; this means that, short |
| 1414 |
of 'make test', we no longer need access to the target system once Configure is |
| 1415 |
done. You can provide already-built binaries through the \f(CW\*(C`hostperl\*(C'\fR and |
| 1416 |
\&\f(CW\*(C`hostgenerate\*(C'\fR options to Configure. |
| 1417 |
.Sp |
| 1418 |
Additionally, if targeting an EBCDIC platform from an ASCII host, |
| 1419 |
or viceversa, you'll need to run Configure with \f(CW\*(C`\-Uhostgenerate\*(C'\fR, to |
| 1420 |
indicate that generate_uudmap should be run on the target. |
| 1421 |
.Sp |
| 1422 |
Finally, there's also a way of having Configure end early, right after |
| 1423 |
building the host binaries, by cross-compiling without specifying a |
| 1424 |
\&\f(CW\*(C`targethost\*(C'\fR. |
| 1425 |
.Sp |
| 1426 |
The incompatible changes include no longer using xconfig.h, xlib, or |
| 1427 |
Cross.pm, so canned config files and Makefiles will have to be updated. |
| 1428 |
.IP \(bu 4 |
| 1429 |
Related to the above, there is now a way of specifying the location of sh |
| 1430 |
(or equivalent) on the target system: \f(CW\*(C`targetsh\*(C'\fR. |
| 1431 |
.Sp |
| 1432 |
For example, Android has its sh in /system/bin/sh, so if cross-compiling |
| 1433 |
from a more normal Unixy system with sh in /bin/sh, "targetsh" would end |
| 1434 |
up as /system/bin/sh, and "sh" as /bin/sh. |
| 1435 |
.IP \(bu 4 |
| 1436 |
By default, \fBgcc\fR 4.9 does some optimizations that break perl. The \fB\-fwrapv\fR |
| 1437 |
option disables those optimizations (and probably others), so for \fBgcc\fR 4.3 |
| 1438 |
and later (since the there might be similar problems lurking on older versions |
| 1439 |
too, but \fB\-fwrapv\fR was broken before 4.3, and the optimizations probably won't |
| 1440 |
go away), \fIConfigure\fR now adds \fB\-fwrapv\fR unless the user requests |
| 1441 |
\&\fB\-fno\-wrapv\fR, which disables \fB\-fwrapv\fR, or \fB\-fsanitize=undefined\fR, which |
| 1442 |
turns the overflows \fB\-fwrapv\fR ignores into runtime errors. |
| 1443 |
[GH #13690] <https://github.com/Perl/perl5/issues/13690> |
| 1444 |
.SH Testing |
| 1445 |
.IX Header "Testing" |
| 1446 |
.IP \(bu 4 |
| 1447 |
The \f(CW\*(C`test.valgrind\*(C'\fR make target now allows tests to be run in parallel. |
| 1448 |
This target allows Perl's test suite to be run under Valgrind, which detects |
| 1449 |
certain sorts of C programming errors, though at significant cost in running |
| 1450 |
time. On suitable hardware, allowing parallel execution claws back a lot of |
| 1451 |
that additional cost. [perl #121431] |
| 1452 |
.IP \(bu 4 |
| 1453 |
Various tests in \fIt/porting/\fR are no longer skipped when the perl |
| 1454 |
\&\fI.git\fR directory is outside the perl tree and pointed to by |
| 1455 |
\&\f(CW$GIT_DIR\fR. [perl #120505] |
| 1456 |
.IP \(bu 4 |
| 1457 |
The test suite no longer fails when the user's interactive shell maintains a |
| 1458 |
\&\f(CW$PWD\fR environment variable, but the \fI/bin/sh\fR used for running tests |
| 1459 |
doesn't. |
| 1460 |
.SH "Platform Support" |
| 1461 |
.IX Header "Platform Support" |
| 1462 |
.SS "New Platforms" |
| 1463 |
.IX Subsection "New Platforms" |
| 1464 |
.IP Android 4 |
| 1465 |
.IX Item "Android" |
| 1466 |
Perl can now be built for Android, either natively or through |
| 1467 |
cross-compilation, for all three currently available architectures (ARM, |
| 1468 |
MIPS, and x86), on a wide range of versions. |
| 1469 |
.IP Bitrig 4 |
| 1470 |
.IX Item "Bitrig" |
| 1471 |
Compile support has been added for Bitrig, a fork of OpenBSD. |
| 1472 |
.IP FreeMiNT 4 |
| 1473 |
.IX Item "FreeMiNT" |
| 1474 |
Support has been added for FreeMiNT, a free open-source OS for the Atari ST |
| 1475 |
system and its successors, based on the original MiNT that was officially |
| 1476 |
adopted by Atari. |
| 1477 |
.IP Synology 4 |
| 1478 |
.IX Item "Synology" |
| 1479 |
Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative |
| 1480 |
cheap CPU's (like the Marvell Kirkwood mv6282 \- ARMv5tel or Freescale QorIQ |
| 1481 |
P1022 ppc \- e500v2) not meant for workstations or development. These boxes |
| 1482 |
should build now. The basic problems are the non-standard location for tools. |
| 1483 |
.SS "Discontinued Platforms" |
| 1484 |
.IX Subsection "Discontinued Platforms" |
| 1485 |
.ie n .IP """sfio""" 4 |
| 1486 |
.el .IP \f(CWsfio\fR 4 |
| 1487 |
.IX Item "sfio" |
| 1488 |
Code related to supporting the \f(CW\*(C`sfio\*(C'\fR I/O system has been removed. |
| 1489 |
.Sp |
| 1490 |
Perl 5.004 added support to use the native API of \f(CW\*(C`sfio\*(C'\fR, AT&T's Safe/Fast |
| 1491 |
I/O library. This code still built with v5.8.0, albeit with many regression |
| 1492 |
tests failing, but was inadvertently broken before the v5.8.1 release, |
| 1493 |
meaning that it has not worked on any version of Perl released since then. |
| 1494 |
In over a decade we have received no bug reports about this, hence it is clear |
| 1495 |
that no-one is using this functionality on any version of Perl that is still |
| 1496 |
supported to any degree. |
| 1497 |
.IP "AT&T 3b1" 4 |
| 1498 |
.IX Item "AT&T 3b1" |
| 1499 |
Configure support for the 3b1, also known as the AT&T Unix PC (and the similar |
| 1500 |
AT&T 7300), has been removed. |
| 1501 |
.IP DG/UX 4 |
| 1502 |
.IX Item "DG/UX" |
| 1503 |
DG/UX was a Unix sold by Data General. The last release was in April 2001. |
| 1504 |
It only runs on Data General's own hardware. |
| 1505 |
.IP EBCDIC 4 |
| 1506 |
.IX Item "EBCDIC" |
| 1507 |
In the absence of a regular source of smoke reports, code intended to support |
| 1508 |
native EBCDIC platforms will be removed from perl before 5.22.0. |
| 1509 |
.SS "Platform-Specific Notes" |
| 1510 |
.IX Subsection "Platform-Specific Notes" |
| 1511 |
.IP Cygwin 4 |
| 1512 |
.IX Item "Cygwin" |
| 1513 |
.RS 4 |
| 1514 |
.PD 0 |
| 1515 |
.IP \(bu 4 |
| 1516 |
.PD |
| 1517 |
\&\fBrecv()\fR on a connected handle would populate the returned sender |
| 1518 |
address with whatever happened to be in the working buffer. \fBrecv()\fR |
| 1519 |
now uses a workaround similar to the Win32 \fBrecv()\fR wrapper and returns |
| 1520 |
an empty string when \fBrecvfrom\fR\|(2) doesn't modify the supplied address |
| 1521 |
length. [perl #118843] |
| 1522 |
.IP \(bu 4 |
| 1523 |
Fixed a build error in cygwin.c on Cygwin 1.7.28. |
| 1524 |
.Sp |
| 1525 |
Tests now handle the errors that occur when \f(CW\*(C`cygserver\*(C'\fR isn't |
| 1526 |
running. |
| 1527 |
.RE |
| 1528 |
.RS 4 |
| 1529 |
.RE |
| 1530 |
.IP GNU/Hurd 4 |
| 1531 |
.IX Item "GNU/Hurd" |
| 1532 |
The BSD compatibility library \f(CW\*(C`libbsd\*(C'\fR is no longer required for builds. |
| 1533 |
.IP Linux 4 |
| 1534 |
.IX Item "Linux" |
| 1535 |
The hints file now looks for \f(CW\*(C`libgdbm_compat\*(C'\fR only if \f(CW\*(C`libgdbm\*(C'\fR itself is |
| 1536 |
also wanted. The former is never useful without the latter, and in some |
| 1537 |
circumstances, including it could actually prevent building. |
| 1538 |
.IP "Mac OS" 4 |
| 1539 |
.IX Item "Mac OS" |
| 1540 |
The build system now honors an \f(CW\*(C`ld\*(C'\fR setting supplied by the user running |
| 1541 |
\&\fIConfigure\fR. |
| 1542 |
.IP MidnightBSD 4 |
| 1543 |
.IX Item "MidnightBSD" |
| 1544 |
\&\f(CW\*(C`objformat\*(C'\fR was removed from version 0.4\-RELEASE of MidnightBSD and had been |
| 1545 |
deprecated on earlier versions. This caused the build environment to be |
| 1546 |
erroneously configured for \f(CW\*(C`a.out\*(C'\fR rather than \f(CW\*(C`elf\*(C'\fR. This has been now |
| 1547 |
been corrected. |
| 1548 |
.IP "Mixed-endian platforms" 4 |
| 1549 |
.IX Item "Mixed-endian platforms" |
| 1550 |
The code supporting \f(CW\*(C`pack\*(C'\fR and \f(CW\*(C`unpack\*(C'\fR operations on mixed endian |
| 1551 |
platforms has been removed. We believe that Perl has long been unable to |
| 1552 |
build on mixed endian architectures (such as PDP\-11s), so we don't think |
| 1553 |
that this change will affect any platforms which were able to build v5.18.0. |
| 1554 |
.IP VMS 4 |
| 1555 |
.IX Item "VMS" |
| 1556 |
.RS 4 |
| 1557 |
.PD 0 |
| 1558 |
.IP \(bu 4 |
| 1559 |
.PD |
| 1560 |
The \f(CW\*(C`PERL_ENV_TABLES\*(C'\fR feature to control the population of \f(CW%ENV\fR at perl |
| 1561 |
start-up was broken in Perl 5.16.0 but has now been fixed. |
| 1562 |
.IP \(bu 4 |
| 1563 |
Skip access checks on remotes in \fBopendir()\fR. [perl #121002] |
| 1564 |
.IP \(bu 4 |
| 1565 |
A check for glob metacharacters in a path returned by the |
| 1566 |
\&\f(CWglob()\fR operator has been replaced with a check for VMS |
| 1567 |
wildcard characters. This saves a significant number of unnecessary |
| 1568 |
\&\f(CWlstat()\fR calls such that some simple glob operations become |
| 1569 |
60\-80% faster. |
| 1570 |
.RE |
| 1571 |
.RS 4 |
| 1572 |
.RE |
| 1573 |
.IP Win32 4 |
| 1574 |
.IX Item "Win32" |
| 1575 |
.RS 4 |
| 1576 |
.PD 0 |
| 1577 |
.IP \(bu 4 |
| 1578 |
.PD |
| 1579 |
\&\f(CW\*(C`rename\*(C'\fR and \f(CW\*(C`link\*(C'\fR on Win32 now set $! to ENOSPC and EDQUOT when |
| 1580 |
appropriate. [perl #119857] |
| 1581 |
.IP \(bu 4 |
| 1582 |
The BUILD_STATIC and ALL_STATIC makefile options for linking some or (nearly) |
| 1583 |
all extensions statically (into perl520.dll, and into a separate |
| 1584 |
perl\-static.exe too) were broken for MinGW builds. This has now been fixed. |
| 1585 |
.Sp |
| 1586 |
The ALL_STATIC option has also been improved to include the Encode and Win32 |
| 1587 |
extensions (for both VC++ and MinGW builds). |
| 1588 |
.IP \(bu 4 |
| 1589 |
Support for building with Visual C++ 2013 has been added. There are currently |
| 1590 |
two possible test failures (see "Testing Perl on Windows" in perlwin32) which |
| 1591 |
will hopefully be resolved soon. |
| 1592 |
.IP \(bu 4 |
| 1593 |
Experimental support for building with Intel C++ Compiler has been added. The |
| 1594 |
nmake makefile (win32/Makefile) and the dmake makefile (win32/makefile.mk) can |
| 1595 |
be used. A "nmake test" will not pass at this time due to \fIcpan/CGI/t/url.t\fR. |
| 1596 |
.IP \(bu 4 |
| 1597 |
Killing a process tree with "kill" in perlfunc and a negative signal, was broken |
| 1598 |
starting in 5.18.0. In this bug, \f(CW\*(C`kill\*(C'\fR always returned 0 for a negative |
| 1599 |
signal even for valid PIDs, and no processes were terminated. This has been |
| 1600 |
fixed [perl #121230]. |
| 1601 |
.IP \(bu 4 |
| 1602 |
The time taken to build perl on Windows has been reduced quite significantly |
| 1603 |
(time savings in the region of 30\-40% are typically seen) by reducing the |
| 1604 |
number of, usually failing, I/O calls for each \f(CWrequire()\fR |
| 1605 |
(for \fBminiperl.exe\fR only). |
| 1606 |
[GH #13566] <https://github.com/Perl/perl5/issues/13566> |
| 1607 |
.IP \(bu 4 |
| 1608 |
About 15 minutes of idle sleeping was removed from running \f(CW\*(C`make test\*(C'\fR due to |
| 1609 |
a bug in which the timeout monitor used for tests could not be cancelled once |
| 1610 |
the test completes, and the full timeout period elapsed before running the next |
| 1611 |
test file. |
| 1612 |
[GH #13647] <https://github.com/Perl/perl5/issues/13647> |
| 1613 |
.IP \(bu 4 |
| 1614 |
On a perl built without pseudo-fork (pseudo-fork builds were not affected by |
| 1615 |
this bug), killing a process tree with \f(CWkill()\fR and a negative |
| 1616 |
signal resulted in \f(CWkill()\fR inverting the returned value. For example, if |
| 1617 |
\&\f(CWkill()\fR killed 1 process tree PID then it returned 0 instead of 1, and if |
| 1618 |
\&\f(CWkill()\fR was passed 2 invalid PIDs then it returned 2 instead of 0. This has |
| 1619 |
probably been the case since the process tree kill feature was implemented on |
| 1620 |
Win32. It has now been corrected to follow the documented behaviour. |
| 1621 |
[GH #13595] <https://github.com/Perl/perl5/issues/13595> |
| 1622 |
.IP \(bu 4 |
| 1623 |
When building a 64\-bit perl, an uninitialized memory read in \fBminiperl.exe\fR, |
| 1624 |
used during the build process, could lead to a 4GB \fBwperl.exe\fR being created. |
| 1625 |
This has now been fixed. (Note that \fBperl.exe\fR itself was unaffected, but |
| 1626 |
obviously \fBwperl.exe\fR would have been completely broken.) |
| 1627 |
[GH #13677] <https://github.com/Perl/perl5/issues/13677> |
| 1628 |
.IP \(bu 4 |
| 1629 |
Perl can now be built with \fBgcc\fR version 4.8.1 from <http://www.mingw.org>. |
| 1630 |
This was previously broken due to an incorrect definition of \fBDllMain()\fR in one |
| 1631 |
of perl's source files. Earlier \fBgcc\fR versions were also affected when using |
| 1632 |
version 4 of the w32api package. Versions of \fBgcc\fR available from |
| 1633 |
<http://mingw\-w64.sourceforge.net/> were not affected. |
| 1634 |
[GH #13733] <https://github.com/Perl/perl5/issues/13733> |
| 1635 |
.IP \(bu 4 |
| 1636 |
The test harness now has no failures when perl is built on a FAT drive with the |
| 1637 |
Windows OS on an NTFS drive. |
| 1638 |
[GH #6348] <https://github.com/Perl/perl5/issues/6348> |
| 1639 |
.IP \(bu 4 |
| 1640 |
When cloning the context stack in \fBfork()\fR emulation, \fBPerl_cx_dup()\fR |
| 1641 |
would crash accessing parameter information for context stack entries |
| 1642 |
that included no parameters, as with \f(CW\*(C`&foo;\*(C'\fR. |
| 1643 |
[GH #13763] <https://github.com/Perl/perl5/issues/13763> |
| 1644 |
.IP \(bu 4 |
| 1645 |
Introduced by |
| 1646 |
[GH #12161] <https://github.com/Perl/perl5/issues/12161>, a memory |
| 1647 |
leak on every call to \f(CW\*(C`system\*(C'\fR and backticks (\f(CW \`\` \fR), on most Win32 Perls |
| 1648 |
starting from 5.18.0 has been fixed. The memory leak only occurred if you |
| 1649 |
enabled pseudo-fork in your build of Win32 Perl, and were running that build on |
| 1650 |
Server 2003 R2 or newer OS. The leak does not appear on WinXP SP3. |
| 1651 |
[GH #13741] <https://github.com/Perl/perl5/issues/13741> |
| 1652 |
.RE |
| 1653 |
.RS 4 |
| 1654 |
.RE |
| 1655 |
.IP WinCE 4 |
| 1656 |
.IX Item "WinCE" |
| 1657 |
.RS 4 |
| 1658 |
.PD 0 |
| 1659 |
.IP \(bu 4 |
| 1660 |
.PD |
| 1661 |
The building of XS modules has largely been restored. Several still cannot |
| 1662 |
(yet) be built but it is now possible to build Perl on WinCE with only a couple |
| 1663 |
of further patches (to Socket and ExtUtils::MakeMaker), hopefully to be |
| 1664 |
incorporated soon. |
| 1665 |
.IP \(bu 4 |
| 1666 |
Perl can now be built in one shot with no user intervention on WinCE by running |
| 1667 |
\&\f(CW\*(C`nmake \-f Makefile.ce all\*(C'\fR. |
| 1668 |
.Sp |
| 1669 |
Support for building with EVC (Embedded Visual C++) 4 has been restored. Perl |
| 1670 |
can also be built using Smart Devices for Visual C++ 2005 or 2008. |
| 1671 |
.RE |
| 1672 |
.RS 4 |
| 1673 |
.RE |
| 1674 |
.SH "Internal Changes" |
| 1675 |
.IX Header "Internal Changes" |
| 1676 |
.IP \(bu 4 |
| 1677 |
The internal representation has changed for the match variables \f(CW$1\fR, \f(CW$2\fR etc., |
| 1678 |
$`, $&, $', ${^PREMATCH}, ${^MATCH} and ${^POSTMATCH}. It uses slightly less |
| 1679 |
memory, avoids string comparisons and numeric conversions during lookup, and |
| 1680 |
uses 23 fewer lines of C. This change should not affect any external code. |
| 1681 |
.IP \(bu 4 |
| 1682 |
Arrays now use NULL internally to represent unused slots, instead of |
| 1683 |
&PL_sv_undef. &PL_sv_undef is no longer treated as a special value, so |
| 1684 |
av_store(av, 0, &PL_sv_undef) will cause element 0 of that array to hold a |
| 1685 |
read-only undefined scalar. \f(CW\*(C`$array[0] = anything\*(C'\fR will croak and |
| 1686 |
\&\f(CW\*(C`\e$array[0]\*(C'\fR will compare equal to \f(CW\*(C`\eundef\*(C'\fR. |
| 1687 |
.IP \(bu 4 |
| 1688 |
The SV returned by \fBHeSVKEY_force()\fR now correctly reflects the UTF8ness of the |
| 1689 |
underlying hash key when that key is not stored as a SV. [perl #79074] |
| 1690 |
.IP \(bu 4 |
| 1691 |
Certain rarely used functions and macros available to XS code are now |
| 1692 |
deprecated. These are: |
| 1693 |
\&\f(CW\*(C`utf8_to_uvuni_buf\*(C'\fR (use \f(CW\*(C`utf8_to_uvchr_buf\*(C'\fR instead), |
| 1694 |
\&\f(CW\*(C`valid_utf8_to_uvuni\*(C'\fR (use \f(CW\*(C`utf8_to_uvchr_buf\*(C'\fR instead), |
| 1695 |
\&\f(CW\*(C`NATIVE_TO_NEED\*(C'\fR (this did not work properly anyway), |
| 1696 |
and \f(CW\*(C`ASCII_TO_NEED\*(C'\fR (this did not work properly anyway). |
| 1697 |
.Sp |
| 1698 |
Starting in this release, almost never does application code need to |
| 1699 |
distinguish between the platform's character set and Latin1, on which the |
| 1700 |
lowest 256 characters of Unicode are based. New code should not use |
| 1701 |
\&\f(CW\*(C`utf8n_to_uvuni\*(C'\fR (use \f(CW\*(C`utf8_to_uvchr_buf\*(C'\fR instead), |
| 1702 |
nor |
| 1703 |
\&\f(CW\*(C`uvuni_to_utf8\*(C'\fR (use \f(CW\*(C`uvchr_to_utf8\*(C'\fR instead), |
| 1704 |
.IP \(bu 4 |
| 1705 |
The Makefile shortcut targets for many rarely (or never) used testing and |
| 1706 |
profiling targets have been removed, or merged into the only other Makefile |
| 1707 |
target that uses them. Specifically, these targets are gone, along with |
| 1708 |
documentation that referenced them or explained how to use them: |
| 1709 |
.Sp |
| 1710 |
.Vb 10 |
| 1711 |
\& check.third check.utf16 check.utf8 coretest minitest.prep |
| 1712 |
\& minitest.utf16 perl.config.dashg perl.config.dashpg |
| 1713 |
\& perl.config.gcov perl.gcov perl.gprof perl.gprof.config |
| 1714 |
\& perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix |
| 1715 |
\& perl.third perl.third.config perl.valgrind.config purecovperl |
| 1716 |
\& pureperl quantperl test.deparse test.taintwarn test.third |
| 1717 |
\& test.torture test.utf16 test.utf8 test_notty.deparse |
| 1718 |
\& test_notty.third test_notty.valgrind test_prep.third |
| 1719 |
\& test_prep.valgrind torturetest ucheck ucheck.third ucheck.utf16 |
| 1720 |
\& ucheck.valgrind utest utest.third utest.utf16 utest.valgrind |
| 1721 |
.Ve |
| 1722 |
.Sp |
| 1723 |
It's still possible to run the relevant commands by "hand" \- no underlying |
| 1724 |
functionality has been removed. |
| 1725 |
.IP \(bu 4 |
| 1726 |
It is now possible to keep Perl from initializing locale handling. |
| 1727 |
For the most part, Perl doesn't pay attention to locale. (See |
| 1728 |
perllocale.) Nonetheless, until now, on startup, it has always |
| 1729 |
initialized locale handling to the system default, just in case the |
| 1730 |
program being executed ends up using locales. (This is one of the first |
| 1731 |
things a locale-aware program should do, long before Perl knows if it |
| 1732 |
will actually be needed or not.) This works well except when Perl is |
| 1733 |
embedded in another application which wants a locale that isn't the |
| 1734 |
system default. Now, if the environment variable |
| 1735 |
\&\f(CW\*(C`PERL_SKIP_LOCALE_INIT\*(C'\fR is set at the time Perl is started, this |
| 1736 |
initialization step is skipped. Prior to this, on Windows platforms, |
| 1737 |
the only workaround for this deficiency was to use a hacked-up copy of |
| 1738 |
internal Perl code. Applications that need to use older Perls can |
| 1739 |
discover if the embedded Perl they are using needs the workaround by |
| 1740 |
testing that the C preprocessor symbol \f(CW\*(C`HAS_SKIP_LOCALE_INIT\*(C'\fR is not |
| 1741 |
defined. [RT #38193] |
| 1742 |
.IP \(bu 4 |
| 1743 |
\&\f(CW\*(C`BmRARE\*(C'\fR and \f(CW\*(C`BmPREVIOUS\*(C'\fR have been removed. They were not used anywhere |
| 1744 |
and are not part of the API. For XS modules, they are now #defined as 0. |
| 1745 |
.IP \(bu 4 |
| 1746 |
\&\f(CW\*(C`sv_force_normal\*(C'\fR, which usually croaks on read-only values, used to allow |
| 1747 |
read-only values to be modified at compile time. This has been changed to |
| 1748 |
croak on read-only values regardless. This change uncovered several core |
| 1749 |
bugs. |
| 1750 |
.IP \(bu 4 |
| 1751 |
Perl's new copy-on-write mechanism (which is now enabled by default), |
| 1752 |
allows any \f(CW\*(C`SvPOK\*(C'\fR scalar to be automatically upgraded to a copy-on-write |
| 1753 |
scalar when copied. A reference count on the string buffer is stored in |
| 1754 |
the string buffer itself. |
| 1755 |
.Sp |
| 1756 |
For example: |
| 1757 |
.Sp |
| 1758 |
.Vb 10 |
| 1759 |
\& $ perl \-MDevel::Peek \-e\*(Aq$a="abc"; $b = $a; Dump $a; Dump $b\*(Aq |
| 1760 |
\& SV = PV(0x260cd80) at 0x2620ad8 |
| 1761 |
\& REFCNT = 1 |
| 1762 |
\& FLAGS = (POK,IsCOW,pPOK) |
| 1763 |
\& PV = 0x2619bc0 "abc"\e0 |
| 1764 |
\& CUR = 3 |
| 1765 |
\& LEN = 16 |
| 1766 |
\& COW_REFCNT = 1 |
| 1767 |
\& SV = PV(0x260ce30) at 0x2620b20 |
| 1768 |
\& REFCNT = 1 |
| 1769 |
\& FLAGS = (POK,IsCOW,pPOK) |
| 1770 |
\& PV = 0x2619bc0 "abc"\e0 |
| 1771 |
\& CUR = 3 |
| 1772 |
\& LEN = 16 |
| 1773 |
\& COW_REFCNT = 1 |
| 1774 |
.Ve |
| 1775 |
.Sp |
| 1776 |
Note that both scalars share the same PV buffer and have a COW_REFCNT |
| 1777 |
greater than zero. |
| 1778 |
.Sp |
| 1779 |
This means that XS code which wishes to modify the \f(CWSvPVX()\fR buffer of an |
| 1780 |
SV should call \f(CWSvPV_force()\fR or similar first, to ensure a valid (and |
| 1781 |
unshared) buffer, and to call \f(CWSvSETMAGIC()\fR afterwards. This in fact has |
| 1782 |
always been the case (for example hash keys were already copy-on-write); |
| 1783 |
this change just spreads the COW behaviour to a wider variety of SVs. |
| 1784 |
.Sp |
| 1785 |
One important difference is that before 5.18.0, shared hash-key scalars |
| 1786 |
used to have the \f(CW\*(C`SvREADONLY\*(C'\fR flag set; this is no longer the case. |
| 1787 |
.Sp |
| 1788 |
This new behaviour can still be disabled by running \fIConfigure\fR with |
| 1789 |
\&\fB\-Accflags=\-DPERL_NO_COW\fR. This option will probably be removed in Perl |
| 1790 |
5.22. |
| 1791 |
.IP \(bu 4 |
| 1792 |
\&\f(CW\*(C`PL_sawampersand\*(C'\fR is now a constant. The switch this variable provided |
| 1793 |
(to enable/disable the pre-match copy depending on whether \f(CW$&\fR had been |
| 1794 |
seen) has been removed and replaced with copy-on-write, eliminating a few |
| 1795 |
bugs. |
| 1796 |
.Sp |
| 1797 |
The previous behaviour can still be enabled by running \fIConfigure\fR with |
| 1798 |
\&\fB\-Accflags=\-DPERL_SAWAMPERSAND\fR. |
| 1799 |
.IP \(bu 4 |
| 1800 |
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. |
| 1801 |
It is unclear why these functions were ever marked as \fIA\fR, part of the |
| 1802 |
API. XS code can't call them directly, as it can't rely on them being |
| 1803 |
compiled. Unsurprisingly, no code on CPAN references them. |
| 1804 |
.IP \(bu 4 |
| 1805 |
The signature of the \f(CWPerl_re_intuit_start()\fR regex function has changed; |
| 1806 |
the function pointer \f(CW\*(C`intuit\*(C'\fR in the regex engine plugin structure |
| 1807 |
has also changed accordingly. A new parameter, \f(CW\*(C`strbeg\*(C'\fR has been added; |
| 1808 |
this has the same meaning as the same-named parameter in |
| 1809 |
\&\f(CW\*(C`Perl_regexec_flags\*(C'\fR. Previously intuit would try to guess the start of |
| 1810 |
the string from the passed SV (if any), and would sometimes get it wrong |
| 1811 |
(e.g. with an overloaded SV). |
| 1812 |
.IP \(bu 4 |
| 1813 |
The signature of the \f(CWPerl_regexec_flags()\fR regex function has |
| 1814 |
changed; the function pointer \f(CW\*(C`exec\*(C'\fR in the regex engine plugin |
| 1815 |
structure has also changed to match. The \f(CW\*(C`minend\*(C'\fR parameter now has |
| 1816 |
type \f(CW\*(C`SSize_t\*(C'\fR to better support 64\-bit systems. |
| 1817 |
.IP \(bu 4 |
| 1818 |
XS code may use various macros to change the case of a character or code |
| 1819 |
point (for example \f(CWtoLOWER_utf8()\fR). Only a couple of these were |
| 1820 |
documented until now; |
| 1821 |
and now they should be used in preference to calling the underlying |
| 1822 |
functions. See "Character case changing" in perlapi. |
| 1823 |
.IP \(bu 4 |
| 1824 |
The code dealt rather inconsistently with uids and gids. Some |
| 1825 |
places assumed that they could be safely stored in UVs, others |
| 1826 |
in IVs, others in ints. Four new macros are introduced: |
| 1827 |
\&\fBSvUID()\fR, \fBsv_setuid()\fR, \fBSvGID()\fR, and \fBsv_setgid()\fR |
| 1828 |
.IP \(bu 4 |
| 1829 |
\&\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, |
| 1830 |
but supports long strings on 64\-bit platforms. |
| 1831 |
.IP \(bu 4 |
| 1832 |
\&\f(CW\*(C`PL_exit_flags\*(C'\fR can now be used by perl embedders or other XS code to have |
| 1833 |
perl \f(CW\*(C`warn\*(C'\fR or \f(CW\*(C`abort\*(C'\fR on an attempted exit. [perl #52000] |
| 1834 |
.IP \(bu 4 |
| 1835 |
Compiling with \f(CW\*(C`\-Accflags=\-PERL_BOOL_AS_CHAR\*(C'\fR now allows C99 and C++ |
| 1836 |
compilers to emulate the aliasing of \f(CW\*(C`bool\*(C'\fR to \f(CW\*(C`char\*(C'\fR that perl does for |
| 1837 |
C89 compilers. [perl #120314] |
| 1838 |
.IP \(bu 4 |
| 1839 |
The \f(CW\*(C`sv\*(C'\fR argument in "sv_2pv_flags" in perlapi, "sv_2iv_flags" in perlapi, |
| 1840 |
"sv_2uv_flags" in perlapi, and "sv_2nv_flags" in perlapi and their older wrappers |
| 1841 |
sv_2pv, sv_2iv, sv_2uv, sv_2nv, is now non-NULL. Passing NULL now will crash. |
| 1842 |
When the non-NULL marker was introduced en masse in 5.9.3 the functions |
| 1843 |
were marked non-NULL, but since the creation of the SV API in 5.0 alpha 2, if |
| 1844 |
NULL was passed, the functions returned 0 or false-type values. The code that |
| 1845 |
supports \f(CW\*(C`sv\*(C'\fR argument being non-NULL dates to 5.0 alpha 2 directly, and |
| 1846 |
indirectly to Perl 1.0 (pre 5.0 api). The lack of documentation that the |
| 1847 |
functions accepted a NULL \f(CW\*(C`sv\*(C'\fR was corrected in 5.11.0 and between 5.11.0 |
| 1848 |
and 5.19.5 the functions were marked NULLOK. As an optimization the NULLOK code |
| 1849 |
has now been removed, and the functions became non-NULL marked again, because |
| 1850 |
core getter-type macros never pass NULL to these functions and would crash |
| 1851 |
before ever passing NULL. |
| 1852 |
.Sp |
| 1853 |
The only way a NULL \f(CW\*(C`sv\*(C'\fR can be passed to sv_2*v* functions is if XS code |
| 1854 |
directly calls sv_2*v*. This is unlikely as XS code uses Sv*V* macros to get |
| 1855 |
the underlying value out of the SV. One possible situation which leads to |
| 1856 |
a NULL \f(CW\*(C`sv\*(C'\fR being passed to sv_2*v* functions, is if XS code defines its own |
| 1857 |
getter type Sv*V* macros, which check for NULL \fBbefore\fR dereferencing and |
| 1858 |
checking the SV's flags through public API Sv*OK* macros or directly using |
| 1859 |
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 |
| 1860 |
with a NULL literal or passing the \f(CW\*(C`sv\*(C'\fR containing a NULL value. |
| 1861 |
.IP \(bu 4 |
| 1862 |
newATTRSUB is now a macro |
| 1863 |
.Sp |
| 1864 |
The public API newATTRSUB was previously a macro to the private |
| 1865 |
function Perl_newATTRSUB. Function Perl_newATTRSUB has been removed. newATTRSUB |
| 1866 |
is now macro to a different internal function. |
| 1867 |
.IP \(bu 4 |
| 1868 |
Changes in warnings raised by \f(CWutf8n_to_uvchr()\fR |
| 1869 |
.Sp |
| 1870 |
This bottom level function decodes the first character of a UTF\-8 string |
| 1871 |
into a code point. It is accessible to \f(CW\*(C`XS\*(C'\fR level code, but it's |
| 1872 |
discouraged from using it directly. There are higher level functions |
| 1873 |
that call this that should be used instead, such as |
| 1874 |
"utf8_to_uvchr_buf" in perlapi. For completeness though, this documents |
| 1875 |
some changes to it. Now, tests for malformations are done before any |
| 1876 |
tests for other potential issues. One of those issues involves code |
| 1877 |
points so large that they have never appeared in any official standard |
| 1878 |
(the current standard has scaled back the highest acceptable code point |
| 1879 |
from earlier versions). It is possible (though not done in CPAN) to |
| 1880 |
warn and/or forbid these code points, while accepting smaller code |
| 1881 |
points that are still above the legal Unicode maximum. The warning |
| 1882 |
message for this now includes the code point if representable on the |
| 1883 |
machine. Previously it always displayed raw bytes, which is what it |
| 1884 |
still does for non-representable code points. |
| 1885 |
.IP \(bu 4 |
| 1886 |
Regexp engine changes that affect the pluggable regex engine interface |
| 1887 |
.Sp |
| 1888 |
Many flags that used to be exposed via regexp.h and used to populate the |
| 1889 |
extflags member of struct regexp have been removed. These fields were |
| 1890 |
technically private to Perl's own regexp engine and should not have been |
| 1891 |
exposed there in the first place. |
| 1892 |
.Sp |
| 1893 |
The affected flags are: |
| 1894 |
.Sp |
| 1895 |
.Vb 8 |
| 1896 |
\& RXf_NOSCAN |
| 1897 |
\& RXf_CANY_SEEN |
| 1898 |
\& RXf_GPOS_SEEN |
| 1899 |
\& RXf_GPOS_FLOAT |
| 1900 |
\& RXf_ANCH_BOL |
| 1901 |
\& RXf_ANCH_MBOL |
| 1902 |
\& RXf_ANCH_SBOL |
| 1903 |
\& RXf_ANCH_GPOS |
| 1904 |
.Ve |
| 1905 |
.Sp |
| 1906 |
As well as the follow flag masks: |
| 1907 |
.Sp |
| 1908 |
.Vb 2 |
| 1909 |
\& RXf_ANCH_SINGLE |
| 1910 |
\& RXf_ANCH |
| 1911 |
.Ve |
| 1912 |
.Sp |
| 1913 |
All have been renamed to PREGf_ equivalents and moved to regcomp.h. |
| 1914 |
.Sp |
| 1915 |
The behavior previously achieved by setting one or more of the RXf_ANCH_ |
| 1916 |
flags (via the RXf_ANCH mask) have now been replaced by a *single* flag bit |
| 1917 |
in extflags: |
| 1918 |
.Sp |
| 1919 |
.Vb 1 |
| 1920 |
\& RXf_IS_ANCHORED |
| 1921 |
.Ve |
| 1922 |
.Sp |
| 1923 |
pluggable regex engines which previously used to set these flags should |
| 1924 |
now set this flag ALONE. |
| 1925 |
.IP \(bu 4 |
| 1926 |
The Perl core now consistently uses \f(CWav_tindex()\fR ("the top index of an |
| 1927 |
array") as a more clearly-named synonym for \f(CWav_len()\fR. |
| 1928 |
.IP \(bu 4 |
| 1929 |
The obscure interpreter variable \f(CW\*(C`PL_timesbuf\*(C'\fR is expected to be removed |
| 1930 |
early in the 5.21.x development series, so that Perl 5.22.0 will not provide |
| 1931 |
it to XS authors. While the variable still exists in 5.20.0, we hope that |
| 1932 |
this advance warning of the deprecation will help anyone who is using that |
| 1933 |
variable. |
| 1934 |
.SH "Selected Bug Fixes" |
| 1935 |
.IX Header "Selected Bug Fixes" |
| 1936 |
.SS "Regular Expressions" |
| 1937 |
.IX Subsection "Regular Expressions" |
| 1938 |
.IP \(bu 4 |
| 1939 |
Fixed a small number of regexp constructions that could either fail to |
| 1940 |
match or crash perl when the string being matched against was |
| 1941 |
allocated above the 2GB line on 32\-bit systems. [RT #118175] |
| 1942 |
.IP \(bu 4 |
| 1943 |
Various memory leaks involving the parsing of the \f(CW\*(C`(?[...])\*(C'\fR regular |
| 1944 |
expression construct have been fixed. |
| 1945 |
.IP \(bu 4 |
| 1946 |
\&\f(CW\*(C`(?[...])\*(C'\fR now allows interpolation of precompiled patterns consisting of |
| 1947 |
\&\f(CW\*(C`(?[...])\*(C'\fR with bracketed character classes inside (\f(CW\*(C`$pat = |
| 1948 |
qr/(?[\ [a]\ ])/; /(?[\ $pat\ ])/\*(C'\fR). Formerly, the brackets would |
| 1949 |
confuse the regular expression parser. |
| 1950 |
.IP \(bu 4 |
| 1951 |
The "Quantifier unexpected on zero-length expression" warning message could |
| 1952 |
appear twice starting in Perl v5.10 for a regular expression also |
| 1953 |
containing alternations (e.g., "a|b") triggering the trie optimisation. |
| 1954 |
.IP \(bu 4 |
| 1955 |
Perl v5.18 inadvertently introduced a bug whereby interpolating mixed up\- |
| 1956 |
and down-graded UTF\-8 strings in a regex could result in malformed UTF\-8 |
| 1957 |
in the pattern: specifically if a downgraded character in the range |
| 1958 |
\&\f(CW\*(C`\ex80..\exff\*(C'\fR followed a UTF\-8 string, e.g. |
| 1959 |
.Sp |
| 1960 |
.Vb 3 |
| 1961 |
\& utf8::upgrade( my $u = "\ex{e5}"); |
| 1962 |
\& utf8::downgrade(my $d = "\ex{e5}"); |
| 1963 |
\& /$u$d/ |
| 1964 |
.Ve |
| 1965 |
.Sp |
| 1966 |
[RT #118297] |
| 1967 |
.IP \(bu 4 |
| 1968 |
In regular expressions containing multiple code blocks, the values of |
| 1969 |
\&\f(CW$1\fR, \f(CW$2\fR, etc., set by nested regular expression calls would leak from |
| 1970 |
one block to the next. Now these variables always refer to the outer |
| 1971 |
regular expression at the start of an embedded block [perl #117917]. |
| 1972 |
.IP \(bu 4 |
| 1973 |
\&\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 |
| 1974 |
fixed. [perl #118213] |
| 1975 |
.IP \(bu 4 |
| 1976 |
Starting in Perl 5.18.0, a construct like \f(CW\*(C`/[#](?{})/x\*(C'\fR would have its \f(CW\*(C`#\*(C'\fR |
| 1977 |
incorrectly interpreted as a comment. The code block would be skipped, |
| 1978 |
unparsed. This has been corrected. |
| 1979 |
.IP \(bu 4 |
| 1980 |
Starting in Perl 5.001, a regular expression like \f(CW\*(C`/[#$a]/x\*(C'\fR or \f(CW\*(C`/[#]$a/x\*(C'\fR |
| 1981 |
would have its \f(CW\*(C`#\*(C'\fR incorrectly interpreted as a comment, so the variable would |
| 1982 |
not interpolate. This has been corrected. [perl #45667] |
| 1983 |
.IP \(bu 4 |
| 1984 |
Perl 5.18.0 inadvertently made dereferenced regular expressions |
| 1985 |
(\f(CW\*(C`${\ qr//\ }\*(C'\fR) false as booleans. This has been fixed. |
| 1986 |
.IP \(bu 4 |
| 1987 |
The use of \f(CW\*(C`\eG\*(C'\fR in regular expressions, where it's not at the start of the |
| 1988 |
pattern, is now slightly less buggy (although it is still somewhat |
| 1989 |
problematic). |
| 1990 |
.IP \(bu 4 |
| 1991 |
Where a regular expression included code blocks (\f(CW\*(C`/(?{...})/\*(C'\fR), and where the |
| 1992 |
use of constant overloading triggered a re-compilation of the code block, the |
| 1993 |
second compilation didn't see its outer lexical scope. This was a regression |
| 1994 |
in Perl 5.18.0. |
| 1995 |
.IP \(bu 4 |
| 1996 |
The string position set by \f(CW\*(C`pos\*(C'\fR could shift if the string changed |
| 1997 |
representation internally to or from utf8. This could happen, e.g., with |
| 1998 |
references to objects with string overloading. |
| 1999 |
.IP \(bu 4 |
| 2000 |
Taking references to the return values of two \f(CW\*(C`pos\*(C'\fR calls with the same |
| 2001 |
argument, and then assigning a reference to one and \f(CW\*(C`undef\*(C'\fR to the other, |
| 2002 |
could result in assertion failures or memory leaks. |
| 2003 |
.IP \(bu 4 |
| 2004 |
Elements of @\- and @+ now update correctly when they refer to non-existent |
| 2005 |
captures. Previously, a referenced element (\f(CW\*(C`$ref = \e$\-[1]\*(C'\fR) could refer to |
| 2006 |
the wrong match after subsequent matches. |
| 2007 |
.IP \(bu 4 |
| 2008 |
The code that parses regex backrefs (or ambiguous backref/octals) such as \e123 |
| 2009 |
did a simple \fBatoi()\fR, which could wrap round to negative values on long digit |
| 2010 |
strings and cause segmentation faults. This has now been fixed. [perl |
| 2011 |
#119505] |
| 2012 |
.IP \(bu 4 |
| 2013 |
Assigning another typeglob to \f(CW\*(C`*^R\*(C'\fR no longer makes the regular expression |
| 2014 |
engine crash. |
| 2015 |
.IP \(bu 4 |
| 2016 |
The \f(CW\*(C`\eN\*(C'\fR regular expression escape, when used without the curly braces (to |
| 2017 |
mean \f(CW\*(C`[^\en]\*(C'\fR), was ignoring a following \f(CW\*(C`*\*(C'\fR if followed by whitespace |
| 2018 |
under /x. It had been this way since \f(CW\*(C`\eN\*(C'\fR to mean \f(CW\*(C`[^\en]\*(C'\fR was introduced |
| 2019 |
in 5.12.0. |
| 2020 |
.IP \(bu 4 |
| 2021 |
\&\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 |
| 2022 |
delimiter. [perl #120463] |
| 2023 |
.IP \(bu 4 |
| 2024 |
Some cases of unterminated (?...) sequences in regular expressions (e.g., |
| 2025 |
\&\f(CW\*(C`/(?</\*(C'\fR) have been fixed to produce the proper error message instead of |
| 2026 |
"panic: memory wrap". Other cases (e.g., \f(CW\*(C`/(?(/\*(C'\fR) have yet to be fixed. |
| 2027 |
.IP \(bu 4 |
| 2028 |
When a reference to a reference to an overloaded object was returned from |
| 2029 |
a regular expression \f(CW\*(C`(??{...})\*(C'\fR code block, an incorrect implicit |
| 2030 |
dereference could take place if the inner reference had been returned by |
| 2031 |
a code block previously. |
| 2032 |
.IP \(bu 4 |
| 2033 |
A tied variable returned from \f(CW\*(C`(??{...})\*(C'\fR sees the inner values of match |
| 2034 |
variables (i.e., the \f(CW$1\fR etc. from any matches inside the block) in its |
| 2035 |
FETCH method. This was not the case if a reference to an overloaded object |
| 2036 |
was the last thing assigned to the tied variable. Instead, the match |
| 2037 |
variables referred to the outer pattern during the FETCH call. |
| 2038 |
.IP \(bu 4 |
| 2039 |
Fix unexpected tainting via regexp using locale. Previously, under certain |
| 2040 |
conditions, the use of character classes could cause tainting when it |
| 2041 |
shouldn't. Some character classes are locale-dependent, but before this |
| 2042 |
patch, sometimes tainting was happening even for character classes that |
| 2043 |
don't depend on the locale. [perl #120675] |
| 2044 |
.IP \(bu 4 |
| 2045 |
Under certain conditions, Perl would throw an error if in a lookbehind |
| 2046 |
assertion in a regexp, the assertion referred to a named subpattern, |
| 2047 |
complaining the lookbehind was variable when it wasn't. This has been |
| 2048 |
fixed. [perl #120600], [perl #120618]. The current fix may be improved |
| 2049 |
on in the future. |
| 2050 |
.IP \(bu 4 |
| 2051 |
\&\f(CW$^R\fR wasn't available outside of the regular expression that |
| 2052 |
initialized it. [perl #121070] |
| 2053 |
.IP \(bu 4 |
| 2054 |
A large set of fixes and refactoring for \fBre_intuit_start()\fR was merged, |
| 2055 |
the highlights are: |
| 2056 |
.RS 4 |
| 2057 |
.IP \(bu 4 |
| 2058 |
Fixed a panic when compiling the regular expression |
| 2059 |
\&\f(CW\*(C`/\ex{100}[xy]\ex{100}{2}/\*(C'\fR. |
| 2060 |
.IP \(bu 4 |
| 2061 |
Fixed a performance regression when performing a global pattern match |
| 2062 |
against a UTF\-8 string. [perl #120692] |
| 2063 |
.IP \(bu 4 |
| 2064 |
Fixed another performance issue where matching a regular expression |
| 2065 |
like \f(CW\*(C`/ab.{1,2}x/\*(C'\fR against a long UTF\-8 string would unnecessarily |
| 2066 |
calculate byte offsets for a large portion of the string. [perl |
| 2067 |
#120692] |
| 2068 |
.RE |
| 2069 |
.RS 4 |
| 2070 |
.RE |
| 2071 |
.IP \(bu 4 |
| 2072 |
Fixed an alignment error when compiling regular expressions when built |
| 2073 |
with GCC on HP-UX 64\-bit. |
| 2074 |
.IP \(bu 4 |
| 2075 |
On 64\-bit platforms \f(CW\*(C`pos\*(C'\fR can now be set to a value higher than 2**31\-1. |
| 2076 |
[perl #72766] |
| 2077 |
.SS "Perl 5 Debugger and \-d" |
| 2078 |
.IX Subsection "Perl 5 Debugger and -d" |
| 2079 |
.IP \(bu 4 |
| 2080 |
The debugger's \f(CW\*(C`man\*(C'\fR command been fixed. It was broken in the v5.18.0 |
| 2081 |
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 \- |
| 2082 |
all now work again. |
| 2083 |
.IP \(bu 4 |
| 2084 |
\&\f(CW@_\fR is now correctly visible in the debugger, fixing a regression |
| 2085 |
introduced in v5.18.0's debugger. [RT #118169] |
| 2086 |
.IP \(bu 4 |
| 2087 |
Under copy-on-write builds (the default as of 5.20.0) \f(CW\*(C`${\*(Aq_<\-e\*(Aq}[0]\*(C'\fR |
| 2088 |
no longer gets mangled. This is the first line of input saved for the |
| 2089 |
debugger's use for one-liners [perl #118627]. |
| 2090 |
.IP \(bu 4 |
| 2091 |
On non-threaded builds, setting \f(CW\*(C`${"_<filename"}\*(C'\fR to a reference or |
| 2092 |
typeglob no longer causes \f(CW\*(C`_\|_FILE_\|_\*(C'\fR and some error messages to produce a |
| 2093 |
corrupt string, and no longer prevents \f(CW\*(C`#line\*(C'\fR directives in string evals from |
| 2094 |
providing the source lines to the debugger. Threaded builds were unaffected. |
| 2095 |
.IP \(bu 4 |
| 2096 |
Starting with Perl 5.12, line numbers were off by one if the \fB\-d\fR switch was |
| 2097 |
used on the #! line. Now they are correct. |
| 2098 |
.IP \(bu 4 |
| 2099 |
\&\f(CW\*(C`*DB::DB = sub {} if 0\*(C'\fR no longer stops Perl's debugging mode from finding |
| 2100 |
\&\f(CW\*(C`DB::DB\*(C'\fR subs declared thereafter. |
| 2101 |
.IP \(bu 4 |
| 2102 |
\&\f(CW\*(C`%{\*(Aq_<...\*(Aq}\*(C'\fR hashes now set breakpoints on the corresponding \f(CW\*(C`@{\*(Aq_<...\*(Aq}\*(C'\fR |
| 2103 |
rather than whichever array \f(CW@DB::dbline\fR is aliased to. [perl #119799] |
| 2104 |
.IP \(bu 4 |
| 2105 |
Call set-magic when setting \f(CW$DB::sub\fR. [perl #121255] |
| 2106 |
.IP \(bu 4 |
| 2107 |
The debugger's "n" command now respects lvalue subroutines and steps over |
| 2108 |
them [perl #118839]. |
| 2109 |
.SS "Lexical Subroutines" |
| 2110 |
.IX Subsection "Lexical Subroutines" |
| 2111 |
.IP \(bu 4 |
| 2112 |
Lexical constants (\f(CW\*(C`my sub a() { 42 }\*(C'\fR) no longer crash when inlined. |
| 2113 |
.IP \(bu 4 |
| 2114 |
Parameter prototypes attached to lexical subroutines are now respected when |
| 2115 |
compiling sub calls without parentheses. Previously, the prototypes were |
| 2116 |
honoured only for calls \fIwith\fR parentheses. [RT #116735] |
| 2117 |
.IP \(bu 4 |
| 2118 |
Syntax errors in lexical subroutines in combination with calls to the same |
| 2119 |
subroutines no longer cause crashes at compile time. |
| 2120 |
.IP \(bu 4 |
| 2121 |
Deep recursion warnings no longer crash lexical subroutines. [RT #118521] |
| 2122 |
.IP \(bu 4 |
| 2123 |
The dtrace sub-entry probe now works with lexical subs, instead of |
| 2124 |
crashing [perl #118305]. |
| 2125 |
.IP \(bu 4 |
| 2126 |
Undefining an inlinable lexical subroutine (\f(CWmy sub foo() { 42 } undef |
| 2127 |
&foo\fR) would result in a crash if warnings were turned on. |
| 2128 |
.IP \(bu 4 |
| 2129 |
An undefined lexical sub used as an inherited method no longer crashes. |
| 2130 |
.IP \(bu 4 |
| 2131 |
The presence of a lexical sub named "CORE" no longer stops the CORE:: |
| 2132 |
prefix from working. |
| 2133 |
.SS "Everything Else" |
| 2134 |
.IX Subsection "Everything Else" |
| 2135 |
.IP \(bu 4 |
| 2136 |
The OP allocation code now returns correctly aligned memory in all cases |
| 2137 |
for \f(CW\*(C`struct pmop\*(C'\fR. Previously it could return memory only aligned to a |
| 2138 |
4\-byte boundary, which is not correct for an ithreads build with 64 bit IVs |
| 2139 |
on some 32 bit platforms. Notably, this caused the build to fail completely |
| 2140 |
on sparc GNU/Linux. [RT #118055] |
| 2141 |
.IP \(bu 4 |
| 2142 |
Evaluating large hashes in scalar context is now much faster, as the number |
| 2143 |
of used chains in the hash is now cached for larger hashes. Smaller hashes |
| 2144 |
continue not to store it and calculate it when needed, as this saves one IV. |
| 2145 |
That would be 1 IV overhead for every object built from a hash. [RT #114576] |
| 2146 |
.IP \(bu 4 |
| 2147 |
Perl v5.16 inadvertently introduced a bug whereby calls to XSUBs that were |
| 2148 |
not visible at compile time were treated as lvalues and could be assigned |
| 2149 |
to, even when the subroutine was not an lvalue sub. This has been fixed. |
| 2150 |
[RT #117947] |
| 2151 |
.IP \(bu 4 |
| 2152 |
In Perl v5.18.0 dualvars that had an empty string for the string part but a |
| 2153 |
non-zero number for the number part starting being treated as true. In |
| 2154 |
previous versions they were treated as false, the string representation |
| 2155 |
taking precedence. The old behaviour has been restored. [RT #118159] |
| 2156 |
.IP \(bu 4 |
| 2157 |
Since Perl v5.12, inlining of constants that override built-in keywords of |
| 2158 |
the same name had countermanded \f(CW\*(C`use subs\*(C'\fR, causing subsequent mentions of |
| 2159 |
the constant to use the built-in keyword instead. This has been fixed. |
| 2160 |
.IP \(bu 4 |
| 2161 |
The warning produced by \f(CW\*(C`\-l $handle\*(C'\fR now applies to IO refs and globs, not |
| 2162 |
just to glob refs. That warning is also now UTF8\-clean. [RT #117595] |
| 2163 |
.IP \(bu 4 |
| 2164 |
\&\f(CW\*(C`delete local $ENV{nonexistent_env_var}\*(C'\fR no longer leaks memory. |
| 2165 |
.IP \(bu 4 |
| 2166 |
\&\f(CW\*(C`sort\*(C'\fR and \f(CW\*(C`require\*(C'\fR followed by a keyword prefixed with \f(CW\*(C`CORE::\*(C'\fR now |
| 2167 |
treat it as a keyword, and not as a subroutine or module name. [RT #24482] |
| 2168 |
.IP \(bu 4 |
| 2169 |
Through certain conundrums, it is possible to cause the current package to |
| 2170 |
be freed. Certain operators (\f(CW\*(C`bless\*(C'\fR, \f(CW\*(C`reset\*(C'\fR, \f(CW\*(C`open\*(C'\fR, \f(CW\*(C`eval\*(C'\fR) could |
| 2171 |
not cope and would crash. They have been made more resilient. [RT #117941] |
| 2172 |
.IP \(bu 4 |
| 2173 |
Aliasing filehandles through glob-to-glob assignment would not update |
| 2174 |
internal method caches properly if a package of the same name as the |
| 2175 |
filehandle existed, resulting in filehandle method calls going to the |
| 2176 |
package instead. This has been fixed. |
| 2177 |
.IP \(bu 4 |
| 2178 |
\&\f(CW\*(C`./Configure \-de \-Dusevendorprefix\*(C'\fR didn't default. [RT #64126] |
| 2179 |
.IP \(bu 4 |
| 2180 |
The \f(CW\*(C`Statement unlikely to be reached\*(C'\fR warning was listed in |
| 2181 |
perldiag as an \f(CW\*(C`exec\*(C'\fR\-category warning, but was enabled and disabled |
| 2182 |
by the \f(CW\*(C`syntax\*(C'\fR category. On the other hand, the \f(CW\*(C`exec\*(C'\fR category |
| 2183 |
controlled its fatal-ness. It is now entirely handled by the \f(CW\*(C`exec\*(C'\fR |
| 2184 |
category. |
| 2185 |
.IP \(bu 4 |
| 2186 |
The "Replacement list is longer that search list" warning for \f(CW\*(C`tr///\*(C'\fR and |
| 2187 |
\&\f(CW\*(C`y///\*(C'\fR no longer occurs in the presence of the \f(CW\*(C`/c\*(C'\fR flag. [RT #118047] |
| 2188 |
.IP \(bu 4 |
| 2189 |
Stringification of NVs are not cached so that the lexical locale controls |
| 2190 |
stringification of the decimal point. [perl #108378] [perl #115800] |
| 2191 |
.IP \(bu 4 |
| 2192 |
There have been several fixes related to Perl's handling of locales. perl |
| 2193 |
#38193 was described above in "Internal Changes". |
| 2194 |
Also fixed is |
| 2195 |
#118197, where the radix (decimal point) character had to be an ASCII |
| 2196 |
character (which doesn't work for some non-Western languages); |
| 2197 |
and #115808, in which \f(CWPOSIX::setlocale()\fR on failure returned an |
| 2198 |
\&\f(CW\*(C`undef\*(C'\fR which didn't warn about not being defined even if those |
| 2199 |
warnings were enabled. |
| 2200 |
.IP \(bu 4 |
| 2201 |
Compiling a \f(CW\*(C`split\*(C'\fR operator whose third argument is a named constant |
| 2202 |
evaluating to 0 no longer causes the constant's value to change. |
| 2203 |
.IP \(bu 4 |
| 2204 |
A named constant used as the second argument to \f(CW\*(C`index\*(C'\fR no longer gets |
| 2205 |
coerced to a string if it is a reference, regular expression, dualvar, etc. |
| 2206 |
.IP \(bu 4 |
| 2207 |
A named constant evaluating to the undefined value used as the second |
| 2208 |
argument to \f(CW\*(C`index\*(C'\fR no longer produces "uninitialized" warnings at compile |
| 2209 |
time. It will still produce them at run time. |
| 2210 |
.IP \(bu 4 |
| 2211 |
When a scalar was returned from a subroutine in \f(CW@INC\fR, the referenced scalar |
| 2212 |
was magically converted into an IO thingy, possibly resulting in "Bizarre |
| 2213 |
copy" errors if that scalar continued to be used elsewhere. Now Perl uses |
| 2214 |
an internal copy of the scalar instead. |
| 2215 |
.IP \(bu 4 |
| 2216 |
Certain uses of the \f(CW\*(C`sort\*(C'\fR operator are optimised to modify an array in |
| 2217 |
place, such as \f(CW\*(C`@a = sort @a\*(C'\fR. During the sorting, the array is made |
| 2218 |
read-only. If a sort block should happen to die, then the array remained |
| 2219 |
read-only even outside the \f(CW\*(C`sort\*(C'\fR. This has been fixed. |
| 2220 |
.IP \(bu 4 |
| 2221 |
\&\f(CW$a\fR and \f(CW$b\fR inside a sort block are aliased to the actual arguments to |
| 2222 |
\&\f(CW\*(C`sort\*(C'\fR, so they can be modified through those two variables. This did not |
| 2223 |
always work, e.g., for lvalue subs and \f(CW$#ary\fR, and probably many other |
| 2224 |
operators. It works now. |
| 2225 |
.IP \(bu 4 |
| 2226 |
The arguments to \f(CW\*(C`sort\*(C'\fR are now all in list context. If the \f(CW\*(C`sort\*(C'\fR |
| 2227 |
itself were called in void or scalar context, then \fIsome\fR, but not all, of |
| 2228 |
the arguments used to be in void or scalar context. |
| 2229 |
.IP \(bu 4 |
| 2230 |
Subroutine prototypes with Unicode characters above U+00FF were getting |
| 2231 |
mangled during closure cloning. This would happen with subroutines closing |
| 2232 |
over lexical variables declared outside, and with lexical subs. |
| 2233 |
.IP \(bu 4 |
| 2234 |
\&\f(CW\*(C`UNIVERSAL::can\*(C'\fR now treats its first argument the same way that method |
| 2235 |
calls do: Typeglobs and glob references with non-empty IO slots are treated |
| 2236 |
as handles, and strings are treated as filehandles, rather than packages, |
| 2237 |
if a handle with that name exists [perl #113932]. |
| 2238 |
.IP \(bu 4 |
| 2239 |
Method calls on typeglobs (e.g., \f(CW\*(C`*ARGV\->getline\*(C'\fR) used to stringify |
| 2240 |
the typeglob and then look it up again. Combined with changes in Perl |
| 2241 |
5.18.0, this allowed \f(CW\*(C`*foo\->bar\*(C'\fR to call methods on the "foo" package |
| 2242 |
(like \f(CW\*(C`foo\->bar\*(C'\fR). In some cases it could cause the method to be |
| 2243 |
called on the wrong handle. Now a typeglob argument is treated as a |
| 2244 |
handle (just like \f(CW\*(C`(\e*foo)\->bar\*(C'\fR), or, if its IO slot is empty, an |
| 2245 |
error is raised. |
| 2246 |
.IP \(bu 4 |
| 2247 |
Assigning a vstring to a tied variable or to a subroutine argument aliased |
| 2248 |
to a nonexistent hash or array element now works, without flattening the |
| 2249 |
vstring into a regular string. |
| 2250 |
.IP \(bu 4 |
| 2251 |
\&\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 |
| 2252 |
properly on subroutine arguments aliased to nonexistent |
| 2253 |
hash and array elements [perl #77814, #27010]. |
| 2254 |
.IP \(bu 4 |
| 2255 |
The \f(CW\*(C`=>\*(C'\fR fat arrow operator can now quote built-in keywords even if it |
| 2256 |
occurs on the next line, making it consistent with how it treats other |
| 2257 |
barewords. |
| 2258 |
.IP \(bu 4 |
| 2259 |
Autovivifying a subroutine stub via \f(CW\*(C`\e&$glob\*(C'\fR started causing crashes in Perl |
| 2260 |
5.18.0 if the \f(CW$glob\fR was merely a copy of a real glob, i.e., a scalar that had |
| 2261 |
had a glob assigned to it. This has been fixed. [perl #119051] |
| 2262 |
.IP \(bu 4 |
| 2263 |
Perl used to leak an implementation detail when it came to referencing the |
| 2264 |
return values of certain operators. \f(CW\*(C`for ($a+$b) { warn \e$_; warn \e$_ }\*(C'\fR used |
| 2265 |
to display two different memory addresses, because the \f(CW\*(C`\e\*(C'\fR operator was |
| 2266 |
copying the variable. Under threaded builds, it would also happen for |
| 2267 |
constants (\f(CW\*(C`for(1) { ... }\*(C'\fR). This has been fixed. [perl #21979, #78194, |
| 2268 |
#89188, #109746, #114838, #115388] |
| 2269 |
.IP \(bu 4 |
| 2270 |
The range operator \f(CW\*(C`..\*(C'\fR was returning the same modifiable scalars with each |
| 2271 |
call, unless it was the only thing in a \f(CW\*(C`foreach\*(C'\fR loop header. This meant |
| 2272 |
that changes to values within the list returned would be visible the next time |
| 2273 |
the operator was executed. [perl #3105] |
| 2274 |
.IP \(bu 4 |
| 2275 |
Constant folding and subroutine inlining no longer cause operations that would |
| 2276 |
normally return new modifiable scalars to return read-only values instead. |
| 2277 |
.IP \(bu 4 |
| 2278 |
Closures of the form \f(CW\*(C`sub () { $some_variable }\*(C'\fR are no longer inlined, |
| 2279 |
causing changes to the variable to be ignored by callers of the subroutine. |
| 2280 |
[perl #79908] |
| 2281 |
.IP \(bu 4 |
| 2282 |
Return values of certain operators such as \f(CW\*(C`ref\*(C'\fR would sometimes be shared |
| 2283 |
between recursive calls to the same subroutine, causing the inner call to |
| 2284 |
modify the value returned by \f(CW\*(C`ref\*(C'\fR in the outer call. This has been fixed. |
| 2285 |
.IP \(bu 4 |
| 2286 |
\&\f(CW\*(C`_\|_PACKAGE_\|_\*(C'\fR and constants returning a package name or hash key are now |
| 2287 |
consistently read-only. In various previous Perl releases, they have become |
| 2288 |
mutable under certain circumstances. |
| 2289 |
.IP \(bu 4 |
| 2290 |
Enabling "used once" warnings no longer causes crashes on stash circularities |
| 2291 |
created at compile time (\f(CW\*(C`*Foo::Bar::Foo:: = *Foo::\*(C'\fR). |
| 2292 |
.IP \(bu 4 |
| 2293 |
Undef constants used in hash keys (\f(CW\*(C`use constant u => undef; $h{+u}\*(C'\fR) no |
| 2294 |
longer produce "uninitialized" warnings at compile time. |
| 2295 |
.IP \(bu 4 |
| 2296 |
Modifying a substitution target inside the substitution replacement no longer |
| 2297 |
causes crashes. |
| 2298 |
.IP \(bu 4 |
| 2299 |
The first statement inside a string eval used to use the wrong pragma setting |
| 2300 |
sometimes during constant folding. \f(CW\*(C`eval \*(Aquc chr 0xe0\*(Aq\*(C'\fR would randomly choose |
| 2301 |
between Unicode, byte, and locale semantics. This has been fixed. |
| 2302 |
.IP \(bu 4 |
| 2303 |
The handling of return values of \f(CW@INC\fR filters (subroutines returned by |
| 2304 |
subroutines in \f(CW@INC\fR) has been fixed in various ways. Previously tied variables |
| 2305 |
were mishandled, and setting \f(CW$_\fR to a reference or typeglob could result in |
| 2306 |
crashes. |
| 2307 |
.IP \(bu 4 |
| 2308 |
The \f(CW\*(C`SvPVbyte\*(C'\fR XS function has been fixed to work with tied scalars returning |
| 2309 |
something other than a string. It used to return utf8 in those cases where |
| 2310 |
\&\f(CW\*(C`SvPV\*(C'\fR would. |
| 2311 |
.IP \(bu 4 |
| 2312 |
Perl 5.18.0 inadvertently made \f(CW\*(C`\-\-\*(C'\fR and \f(CW\*(C`++\*(C'\fR crash on dereferenced regular |
| 2313 |
expressions, and stopped \f(CW\*(C`++\*(C'\fR from flattening vstrings. |
| 2314 |
.IP \(bu 4 |
| 2315 |
\&\f(CW\*(C`bless\*(C'\fR no longer dies with "Can't bless non-reference value" if its first |
| 2316 |
argument is a tied reference. |
| 2317 |
.IP \(bu 4 |
| 2318 |
\&\f(CW\*(C`reset\*(C'\fR with an argument no longer skips copy-on-write scalars, regular |
| 2319 |
expressions, typeglob copies, and vstrings. Also, when encountering those or |
| 2320 |
read-only values, it no longer skips any array or hash with the same name. |
| 2321 |
.IP \(bu 4 |
| 2322 |
\&\f(CW\*(C`reset\*(C'\fR with an argument now skips scalars aliased to typeglobs |
| 2323 |
(\f(CW\*(C`for $z (*foo) { reset "z" }\*(C'\fR). Previously it would corrupt memory or crash. |
| 2324 |
.IP \(bu 4 |
| 2325 |
\&\f(CW\*(C`ucfirst\*(C'\fR and \f(CW\*(C`lcfirst\*(C'\fR were not respecting the bytes pragma. This was a |
| 2326 |
regression from Perl 5.12. [perl #117355] |
| 2327 |
.IP \(bu 4 |
| 2328 |
Changes to \f(CW\*(C`UNIVERSAL::DESTROY\*(C'\fR now update DESTROY caches in all classes, |
| 2329 |
instead of causing classes that have already had objects destroyed to continue |
| 2330 |
using the old sub. This was a regression in Perl 5.18. [perl #114864] |
| 2331 |
.IP \(bu 4 |
| 2332 |
All known false-positive occurrences of the deprecation warning "Useless use of |
| 2333 |
\&'\e'; doesn't escape metacharacter '%c'", added in Perl 5.18.0, have been |
| 2334 |
removed. [perl #119101] |
| 2335 |
.IP \(bu 4 |
| 2336 |
The value of $^E is now saved across signal handlers on Windows. [perl #85104] |
| 2337 |
.IP \(bu 4 |
| 2338 |
A lexical filehandle (as in \f(CW\*(C`open my $fh...\*(C'\fR) is usually given a name based on |
| 2339 |
the current package and the name of the variable, e.g. "main::$fh". Under |
| 2340 |
recursion, the filehandle was losing the "$fh" part of the name. This has been |
| 2341 |
fixed. |
| 2342 |
.IP \(bu 4 |
| 2343 |
Uninitialized values returned by XSUBs are no longer exempt from uninitialized |
| 2344 |
warnings. [perl #118693] |
| 2345 |
.IP \(bu 4 |
| 2346 |
\&\f(CW\*(C`elsif ("")\*(C'\fR no longer erroneously produces a warning about void context. |
| 2347 |
[perl #118753] |
| 2348 |
.IP \(bu 4 |
| 2349 |
Passing \f(CW\*(C`undef\*(C'\fR to a subroutine now causes \f(CW@_\fR to contain the same read-only |
| 2350 |
undefined scalar that \f(CW\*(C`undef\*(C'\fR returns. Furthermore, \f(CW\*(C`exists $_[0]\*(C'\fR will now |
| 2351 |
return true if \f(CW\*(C`undef\*(C'\fR was the first argument. [perl #7508, #109726] |
| 2352 |
.IP \(bu 4 |
| 2353 |
Passing a non-existent array element to a subroutine does not usually |
| 2354 |
autovivify it unless the subroutine modifies its argument. This did not work |
| 2355 |
correctly with negative indices and with non-existent elements within the |
| 2356 |
array. The element would be vivified immediately. The delayed vivification |
| 2357 |
has been extended to work with those. [perl #118691] |
| 2358 |
.IP \(bu 4 |
| 2359 |
Assigning references or globs to the scalar returned by $#foo after the \f(CW@foo\fR |
| 2360 |
array has been freed no longer causes assertion failures on debugging builds |
| 2361 |
and memory leaks on regular builds. |
| 2362 |
.IP \(bu 4 |
| 2363 |
On 64\-bit platforms, large ranges like 1..1000000000000 no longer crash, but |
| 2364 |
eat up all your memory instead. [perl #119161] |
| 2365 |
.IP \(bu 4 |
| 2366 |
\&\f(CW\*(C`_\|_DATA_\|_\*(C'\fR now puts the \f(CW\*(C`DATA\*(C'\fR handle in the right package, even if the |
| 2367 |
current package has been renamed through glob assignment. |
| 2368 |
.IP \(bu 4 |
| 2369 |
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, |
| 2370 |
it is possible for \f(CW\*(C`DESTROY\*(C'\fR recursively to call a subroutine or format that |
| 2371 |
is currently being exited. It that case, sometimes the lexical variables |
| 2372 |
inside the sub would start out having values from the outer call, instead of |
| 2373 |
being undefined as they should. This has been fixed. [perl #119311] |
| 2374 |
.IP \(bu 4 |
| 2375 |
${^MPEN} is no longer treated as a synonym for ${^MATCH}. |
| 2376 |
.IP \(bu 4 |
| 2377 |
Perl now tries a little harder to return the correct line number in |
| 2378 |
\&\f(CW\*(C`(caller)[2]\*(C'\fR. [perl #115768] |
| 2379 |
.IP \(bu 4 |
| 2380 |
Line numbers inside multiline quote-like operators are now reported correctly. |
| 2381 |
[perl #3643] |
| 2382 |
.IP \(bu 4 |
| 2383 |
\&\f(CW\*(C`#line\*(C'\fR directives inside code embedded in quote-like operators are now |
| 2384 |
respected. |
| 2385 |
.IP \(bu 4 |
| 2386 |
Line numbers are now correct inside the second here-doc when two here-doc |
| 2387 |
markers occur on the same line. |
| 2388 |
.IP \(bu 4 |
| 2389 |
An optimization in Perl 5.18 made incorrect assumptions causing a bad |
| 2390 |
interaction with the Devel::CallParser CPAN module. If the module was |
| 2391 |
loaded then lexical variables declared in separate statements following a |
| 2392 |
\&\f(CWmy(...)\fR list might fail to be cleared on scope exit. |
| 2393 |
.IP \(bu 4 |
| 2394 |
\&\f(CW&xsub\fR and \f(CW\*(C`goto &xsub\*(C'\fR calls now allow the called subroutine to autovivify |
| 2395 |
elements of \f(CW@_\fR. |
| 2396 |
.IP \(bu 4 |
| 2397 |
\&\f(CW&xsub\fR and \f(CW\*(C`goto &xsub\*(C'\fR no longer crash if *_ has been undefined and has no |
| 2398 |
ARRAY entry (i.e. \f(CW@_\fR does not exist). |
| 2399 |
.IP \(bu 4 |
| 2400 |
\&\f(CW&xsub\fR and \f(CW\*(C`goto &xsub\*(C'\fR now work with tied \f(CW@_\fR. |
| 2401 |
.IP \(bu 4 |
| 2402 |
Overlong identifiers no longer cause a buffer overflow (and a crash). They |
| 2403 |
started doing so in Perl 5.18. |
| 2404 |
.IP \(bu 4 |
| 2405 |
The warning "Scalar value \f(CW@hash\fR{foo} better written as \f(CW$hash\fR{foo}" now produces |
| 2406 |
far fewer false positives. In particular, \f(CW@hash{+function_returning_a_list}\fR |
| 2407 |
and \f(CW@hash{ qw "foo bar baz" }\fR no longer warn. The same applies to array |
| 2408 |
slices. [perl #28380, #114024] |
| 2409 |
.IP \(bu 4 |
| 2410 |
\&\f(CW\*(C`$! = EINVAL; waitpid(0, WNOHANG);\*(C'\fR no longer goes into an internal infinite |
| 2411 |
loop. [perl #85228] |
| 2412 |
.IP \(bu 4 |
| 2413 |
A possible segmentation fault in filehandle duplication has been fixed. |
| 2414 |
.IP \(bu 4 |
| 2415 |
A subroutine in \f(CW@INC\fR can return a reference to a scalar containing the initial |
| 2416 |
contents of the file. However, that scalar was freed prematurely if not |
| 2417 |
referenced elsewhere, giving random results. |
| 2418 |
.IP \(bu 4 |
| 2419 |
\&\f(CW\*(C`last\*(C'\fR no longer returns values that the same statement has accumulated so |
| 2420 |
far, fixing amongst other things the long-standing bug that \f(CW\*(C`push @a, last\*(C'\fR |
| 2421 |
would try to return the \f(CW@a\fR, copying it like a scalar in the process and |
| 2422 |
resulting in the error, "Bizarre copy of ARRAY in last." [perl #3112] |
| 2423 |
.IP \(bu 4 |
| 2424 |
In some cases, closing file handles opened to pipe to or from a process, which |
| 2425 |
had been duplicated into a standard handle, would call perl's internal waitpid |
| 2426 |
wrapper with a pid of zero. With the fix for [perl #85228] this zero pid was |
| 2427 |
passed to \f(CW\*(C`waitpid\*(C'\fR, possibly blocking the process. This wait for process |
| 2428 |
zero no longer occurs. [perl #119893] |
| 2429 |
.IP \(bu 4 |
| 2430 |
\&\f(CW\*(C`select\*(C'\fR used to ignore magic on the fourth (timeout) argument, leading to |
| 2431 |
effects such as \f(CW\*(C`select\*(C'\fR blocking indefinitely rather than the expected sleep |
| 2432 |
time. This has now been fixed. [perl #120102] |
| 2433 |
.IP \(bu 4 |
| 2434 |
The class name in \f(CW\*(C`for my class $foo\*(C'\fR is now parsed correctly. In the case of |
| 2435 |
the second character of the class name being followed by a digit (e.g. 'a1b') |
| 2436 |
this used to give the error "Missing $ on loop variable". [perl #120112] |
| 2437 |
.IP \(bu 4 |
| 2438 |
Perl 5.18.0 accidentally disallowed \f(CW\*(C`\-bareword\*(C'\fR under \f(CW\*(C`use strict\*(C'\fR and |
| 2439 |
\&\f(CW\*(C`use integer\*(C'\fR. This has been fixed. [perl #120288] |
| 2440 |
.IP \(bu 4 |
| 2441 |
\&\f(CW\*(C`\-a\*(C'\fR at the start of a line (or a hyphen with any single letter that is |
| 2442 |
not a filetest operator) no longer produces an erroneous 'Use of "\-a" |
| 2443 |
without parentheses is ambiguous' warning. [perl #120288] |
| 2444 |
.IP \(bu 4 |
| 2445 |
Lvalue context is now properly propagated into bare blocks and \f(CW\*(C`if\*(C'\fR and |
| 2446 |
\&\f(CW\*(C`else\*(C'\fR blocks in lvalue subroutines. Previously, arrays and hashes would |
| 2447 |
sometimes incorrectly be flattened when returned in lvalue list context, or |
| 2448 |
"Bizarre copy" errors could occur. [perl #119797] |
| 2449 |
.IP \(bu 4 |
| 2450 |
Lvalue context is now propagated to the branches of \f(CW\*(C`||\*(C'\fR and \f(CW\*(C`&&\*(C'\fR (and |
| 2451 |
their alphabetic equivalents, \f(CW\*(C`or\*(C'\fR and \f(CW\*(C`and\*(C'\fR). This means |
| 2452 |
\&\f(CW\*(C`foreach (pos $x || pos $y) {...}\*(C'\fR now allows \f(CW\*(C`pos\*(C'\fR to be modified |
| 2453 |
through \f(CW$_\fR. |
| 2454 |
.IP \(bu 4 |
| 2455 |
\&\f(CW\*(C`stat\*(C'\fR and \f(CW\*(C`readline\*(C'\fR remember the last handle used; the former |
| 2456 |
for the special \f(CW\*(C`_\*(C'\fR filehandle, the latter for \f(CW\*(C`${^LAST_FH}\*(C'\fR. |
| 2457 |
\&\f(CW\*(C`eval "*foo if 0"\*(C'\fR where *foo was the last handle passed to \f(CW\*(C`stat\*(C'\fR |
| 2458 |
or \f(CW\*(C`readline\*(C'\fR could cause that handle to be forgotten if the |
| 2459 |
handle were not opened yet. This has been fixed. |
| 2460 |
.IP \(bu 4 |
| 2461 |
Various cases of \f(CW\*(C`delete $::{a}\*(C'\fR, \f(CW\*(C`delete $::{ENV}\*(C'\fR etc. causing a crash |
| 2462 |
have been fixed. [perl #54044] |
| 2463 |
.IP \(bu 4 |
| 2464 |
Setting \f(CW$!\fR to EACCESS before calling \f(CW\*(C`require\*(C'\fR could affect |
| 2465 |
\&\f(CW\*(C`require\*(C'\fR's behaviour. This has been fixed. |
| 2466 |
.IP \(bu 4 |
| 2467 |
The "Can't use \e1 to mean \f(CW$1\fR in expression" warning message now only occurs |
| 2468 |
on the right-hand (replacement) part of a substitution. Formerly it could |
| 2469 |
happen in code embedded in the left-hand side, or in any other quote-like |
| 2470 |
operator. |
| 2471 |
.IP \(bu 4 |
| 2472 |
Blessing into a reference (\f(CW\*(C`bless $thisref, $thatref\*(C'\fR) has long been |
| 2473 |
disallowed, but magical scalars for the second like \f(CW$/\fR and those tied |
| 2474 |
were exempt. They no longer are. [perl #119809] |
| 2475 |
.IP \(bu 4 |
| 2476 |
Blessing into a reference was accidentally allowed in 5.18 if the class |
| 2477 |
argument were a blessed reference with stale method caches (i.e., whose |
| 2478 |
class had had subs defined since the last method call). They are |
| 2479 |
disallowed once more, as in 5.16. |
| 2480 |
.IP \(bu 4 |
| 2481 |
\&\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 |
| 2482 |
if a Class::FIELDS subroutine stub has been declared. |
| 2483 |
.IP \(bu 4 |
| 2484 |
\&\f(CW@$obj{\*(Aqkey\*(Aq}\fR and \f(CW\*(C`${$obj}{key}\*(C'\fR used to be exempt from compile-time |
| 2485 |
field checking ("No such class field"; see fields) but no longer are. |
| 2486 |
.IP \(bu 4 |
| 2487 |
A nonexistent array element with a large index passed to a subroutine that |
| 2488 |
ties the array and then tries to access the element no longer results in a |
| 2489 |
crash. |
| 2490 |
.IP \(bu 4 |
| 2491 |
Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative |
| 2492 |
array indices crash when the current package is a tied array class. |
| 2493 |
.IP \(bu 4 |
| 2494 |
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 |
| 2495 |
CORE::GLOBAL:: package no longer makes compilation of calls to the |
| 2496 |
corresponding functions crash. |
| 2497 |
.IP \(bu 4 |
| 2498 |
Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10 |
| 2499 |
but has now been fixed. |
| 2500 |
.IP \(bu 4 |
| 2501 |
When \f(CW\`...\`\fR or \f(CW\*(C`qx/.../\*(C'\fR calls a \f(CW\*(C`readpipe\*(C'\fR override, double-quotish |
| 2502 |
interpolation now happens, as is the case when there is no override. |
| 2503 |
Previously, the presence of an override would make these quote-like |
| 2504 |
operators act like \f(CW\*(C`q{}\*(C'\fR, suppressing interpolation. [perl #115330] |
| 2505 |
.IP \(bu 4 |
| 2506 |
\&\f(CW\*(C`<<<\`...\`\*(C'\fR here-docs (with backticks as the delimiters) now call |
| 2507 |
\&\f(CW\*(C`readpipe\*(C'\fR overrides. [perl #119827] |
| 2508 |
.IP \(bu 4 |
| 2509 |
\&\f(CW&CORE::exit()\fR and \f(CW&CORE::die()\fR now respect vmsish hints. |
| 2510 |
.IP \(bu 4 |
| 2511 |
Undefining a glob that triggers a DESTROY method that undefines the same |
| 2512 |
glob is now safe. It used to produce "Attempt to free unreferenced glob |
| 2513 |
pointer" warnings and leak memory. |
| 2514 |
.IP \(bu 4 |
| 2515 |
If subroutine redefinition (\f(CW\*(C`eval \*(Aqsub foo{}\*(Aq\*(C'\fR or \f(CW\*(C`newXS\*(C'\fR for XS code) |
| 2516 |
triggers a DESTROY method on the sub that is being redefined, and that |
| 2517 |
method assigns a subroutine to the same slot (\f(CW\*(C`*foo = sub {}\*(C'\fR), \f(CW$_[0]\fR |
| 2518 |
is no longer left pointing to a freed scalar. Now DESTROY is delayed until |
| 2519 |
the new subroutine has been installed. |
| 2520 |
.IP \(bu 4 |
| 2521 |
On Windows, perl no longer calls \fBCloseHandle()\fR on a socket handle. This makes |
| 2522 |
debugging easier on Windows by removing certain irrelevant bad handle |
| 2523 |
exceptions. It also fixes a race condition that made socket functions randomly |
| 2524 |
fail in a Perl process with multiple OS threads, and possible test failures in |
| 2525 |
\&\fIdist/IO/t/cachepropagate\-tcp.t\fR. [perl #120091/118059] |
| 2526 |
.IP \(bu 4 |
| 2527 |
Formats involving UTF\-8 encoded strings, or strange vars like ties, |
| 2528 |
overloads, or stringified refs (and in recent |
| 2529 |
perls, pure NOK vars) would generally do the wrong thing in formats |
| 2530 |
when the var is treated as a string and repeatedly chopped, as in |
| 2531 |
\&\f(CW\*(C`^<<<~~\*(C'\fR and similar. This has now been resolved. |
| 2532 |
[perl #33832/45325/113868/119847/119849/119851] |
| 2533 |
.IP \(bu 4 |
| 2534 |
\&\f(CW\*(C`semctl(..., SETVAL, ...)\*(C'\fR would set the semaphore to the top |
| 2535 |
32\-bits of the supplied integer instead of the bottom 32\-bits on |
| 2536 |
64\-bit big-endian systems. [perl #120635] |
| 2537 |
.IP \(bu 4 |
| 2538 |
\&\f(CWreaddir()\fR now only sets \f(CW$!\fR on error. \f(CW$!\fR is no longer set |
| 2539 |
to \f(CW\*(C`EBADF\*(C'\fR when then terminating \f(CW\*(C`undef\*(C'\fR is read from the directory |
| 2540 |
unless the system call sets \f(CW$!\fR. [perl #118651] |
| 2541 |
.IP \(bu 4 |
| 2542 |
\&\f(CW&CORE::glob\fR no longer causes an intermittent crash due to perl's stack |
| 2543 |
getting corrupted. [perl #119993] |
| 2544 |
.IP \(bu 4 |
| 2545 |
\&\f(CW\*(C`open\*(C'\fR with layers that load modules (e.g., "<:encoding(utf8)") no longer |
| 2546 |
runs the risk of crashing due to stack corruption. |
| 2547 |
.IP \(bu 4 |
| 2548 |
Perl 5.18 broke autoloading via \f(CW\*(C`\->SUPER::foo\*(C'\fR method calls by looking |
| 2549 |
up AUTOLOAD from the current package rather than the current package's |
| 2550 |
superclass. This has been fixed. [perl #120694] |
| 2551 |
.IP \(bu 4 |
| 2552 |
A longstanding bug causing \f(CW\*(C`do {} until CONSTANT\*(C'\fR, where the constant |
| 2553 |
holds a true value, to read unallocated memory has been resolved. This |
| 2554 |
would usually happen after a syntax error. In past versions of Perl it has |
| 2555 |
crashed intermittently. [perl #72406] |
| 2556 |
.IP \(bu 4 |
| 2557 |
Fix HP-UX \f(CW$!\fR failure. HP-UX \fBstrerror()\fR returns an empty string for an |
| 2558 |
unknown error code. This caused an assertion to fail under DEBUGGING |
| 2559 |
builds. Now instead, the returned string for \f(CW"$!"\fR contains text |
| 2560 |
indicating the code is for an unknown error. |
| 2561 |
.IP \(bu 4 |
| 2562 |
Individually-tied elements of \f(CW@INC\fR (as in \f(CW\*(C`tie $INC[0]...\*(C'\fR) are now |
| 2563 |
handled correctly. Formerly, whether a sub returned by such a tied element |
| 2564 |
would be treated as a sub depended on whether a FETCH had occurred |
| 2565 |
previously. |
| 2566 |
.IP \(bu 4 |
| 2567 |
\&\f(CW\*(C`getc\*(C'\fR on a byte-sized handle after the same \f(CW\*(C`getc\*(C'\fR operator had been |
| 2568 |
used on a utf8 handle used to treat the bytes as utf8, resulting in erratic |
| 2569 |
behavior (e.g., malformed UTF\-8 warnings). |
| 2570 |
.IP \(bu 4 |
| 2571 |
An initial \f(CW\*(C`{\*(C'\fR at the beginning of a format argument line was always |
| 2572 |
interpreted as the beginning of a block prior to v5.18. In Perl v5.18, it |
| 2573 |
started being treated as an ambiguous token. The parser would guess |
| 2574 |
whether it was supposed to be an anonymous hash constructor or a block |
| 2575 |
based on the contents. Now the previous behaviour has been restored. |
| 2576 |
[perl #119973] |
| 2577 |
.IP \(bu 4 |
| 2578 |
In Perl v5.18 \f(CW\*(C`undef *_; goto &sub\*(C'\fR and \f(CW\*(C`local *_; goto &sub\*(C'\fR started |
| 2579 |
crashing. This has been fixed. [perl #119949] |
| 2580 |
.IP \(bu 4 |
| 2581 |
Backticks (\f(CW \`\` \fR or \f(CW\*(C` qx// \*(C'\fR) combined with multiple threads on |
| 2582 |
Win32 could result in output sent to stdout on one thread being |
| 2583 |
captured by backticks of an external command in another thread. |
| 2584 |
.Sp |
| 2585 |
This could occur for pseudo-forked processes too, as Win32's |
| 2586 |
pseudo-fork is implemented in terms of threads. [perl #77672] |
| 2587 |
.IP \(bu 4 |
| 2588 |
\&\f(CW\*(C`open $fh, ">+", undef\*(C'\fR no longer leaks memory when TMPDIR is set |
| 2589 |
but points to a directory a temporary file cannot be created in. [perl |
| 2590 |
#120951] |
| 2591 |
.IP \(bu 4 |
| 2592 |
\&\f(CW\*(C` for ( $h{k} || \*(Aq\*(Aq ) \*(C'\fR no longer auto-vivifies \f(CW$h{k}\fR. [perl |
| 2593 |
#120374] |
| 2594 |
.IP \(bu 4 |
| 2595 |
On Windows machines, Perl now emulates the POSIX use of the environment |
| 2596 |
for locale initialization. Previously, the environment was ignored. |
| 2597 |
See "ENVIRONMENT" in perllocale. |
| 2598 |
.IP \(bu 4 |
| 2599 |
Fixed a crash when destroying a self-referencing GLOB. [perl #121242] |
| 2600 |
.SH "Known Problems" |
| 2601 |
.IX Header "Known Problems" |
| 2602 |
.IP \(bu 4 |
| 2603 |
IO::Socket is known to fail tests on AIX 5.3. There is |
| 2604 |
a patch <https://github.com/Perl/perl5/issues/13484> in the request |
| 2605 |
tracker, #120835, which may be applied to future releases. |
| 2606 |
.IP \(bu 4 |
| 2607 |
The following modules are known to have test failures with this version of |
| 2608 |
Perl. Patches have been submitted, so there will hopefully be new releases |
| 2609 |
soon: |
| 2610 |
.RS 4 |
| 2611 |
.IP \(bu 4 |
| 2612 |
Data::Structure::Util version 0.15 |
| 2613 |
.IP \(bu 4 |
| 2614 |
HTML::StripScripts version 1.05 |
| 2615 |
.IP \(bu 4 |
| 2616 |
List::Gather version 0.08. |
| 2617 |
.RE |
| 2618 |
.RS 4 |
| 2619 |
.RE |
| 2620 |
.SH Obituary |
| 2621 |
.IX Header "Obituary" |
| 2622 |
Diana Rosa, 27, of Rio de Janeiro, went to her long rest on May 10, |
| 2623 |
2014, along with the plush camel she kept hanging on her computer screen |
| 2624 |
all the time. She was a passionate Perl hacker who loved the language and its |
| 2625 |
community, and who never missed a Rio.pm event. She was a true artist, an |
| 2626 |
enthusiast about writing code, singing arias and graffiting walls. We'll never |
| 2627 |
forget you. |
| 2628 |
.PP |
| 2629 |
Greg McCarroll died on August 28, 2013. |
| 2630 |
.PP |
| 2631 |
Greg was well known for many good reasons. He was one of the organisers of |
| 2632 |
the first YAPC::Europe, which concluded with an unscheduled auction where he |
| 2633 |
frantically tried to raise extra money to avoid the conference making a |
| 2634 |
loss. It was Greg who mistakenly arrived for a london.pm meeting a week |
| 2635 |
late; some years later he was the one who sold the choice of official |
| 2636 |
meeting date at a YAPC::Europe auction, and eventually as glorious leader of |
| 2637 |
london.pm he got to inherit the irreverent confusion that he had created. |
| 2638 |
.PP |
| 2639 |
Always helpful, friendly and cheerfully optimistic, you will be missed, but |
| 2640 |
never forgotten. |
| 2641 |
.SH Acknowledgements |
| 2642 |
.IX Header "Acknowledgements" |
| 2643 |
Perl 5.20.0 represents approximately 12 months of development since Perl 5.18.0 |
| 2644 |
and contains approximately 470,000 lines of changes across 2,900 files from 124 |
| 2645 |
authors. |
| 2646 |
.PP |
| 2647 |
Excluding auto-generated files, documentation and release tools, there were |
| 2648 |
approximately 280,000 lines of changes to 1,800 .pm, .t, .c and .h files. |
| 2649 |
.PP |
| 2650 |
Perl continues to flourish into its third decade thanks to a vibrant community |
| 2651 |
of users and developers. The following people are known to have contributed the |
| 2652 |
improvements that became Perl 5.20.0: |
| 2653 |
.PP |
| 2654 |
Aaron Crane, Abhijit Menon-Sen, Abigail, Abir Viqar, Alan Haggai Alavi, Alan |
| 2655 |
Hourihane, Alexander Voronov, Alexandr Ciornii, Andy Dougherty, Anno Siegel, |
| 2656 |
Aristotle Pagaltzis, Arthur Axel 'fREW' Schmidt, Brad Gilbert, Brendan Byrd, |
| 2657 |
Brian Childs, Brian Fraser, Brian Gottreu, Chris 'BinGOs' Williams, Christian |
| 2658 |
Millour, Colin Kuskie, Craig A. Berry, Dabrien 'Dabe' Murphy, Dagfinn Ilmari |
| 2659 |
Mannsåker, Daniel Dragan, Darin McBride, David Golden, David Leadbeater, David |
| 2660 |
Mitchell, David Nicol, David Steinbrunner, Dennis Kaarsemaker, Dominic |
| 2661 |
Hargreaves, Ed Avis, Eric Brine, Evan Zacks, Father Chrysostomos, Florian |
| 2662 |
Ragwitz, François Perrad, Gavin Shelley, Gideon Israel Dsouza, Gisle Aas, |
| 2663 |
Graham Knop, H.Merijn Brand, Hauke D, Heiko Eissfeldt, Hiroo Hayashi, Hojung |
| 2664 |
Youn, James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Jess Robinson, Jesse |
| 2665 |
Luehrs, Johan Vromans, John Gardiner Myers, John Goodyear, John P. Linderman, |
| 2666 |
John Peacock, kafka, Kang-min Liu, Karen Etheridge, Karl Williamson, Keedi Kim, |
| 2667 |
Kent Fredric, kevin dawson, Kevin Falcone, Kevin Ryde, Leon Timmermans, Lukas |
| 2668 |
Mai, Marc Simpson, Marcel Grünauer, Marco Peereboom, Marcus Holland-Moritz, |
| 2669 |
Mark Jason Dominus, Martin McGrath, Matthew Horsfall, Max Maischein, Mike |
| 2670 |
Doherty, Moritz Lenz, Nathan Glenn, Nathan Trapuzzano, Neil Bowers, Neil |
| 2671 |
Williams, Nicholas Clark, Niels Thykier, Niko Tyni, Olivier Mengué, Owain G. |
| 2672 |
Ainsworth, Paul Green, Paul Johnson, Peter John Acklam, Peter Martini, Peter |
| 2673 |
Rabbitson, Petr Písař, Philip Boulain, Philip Guenther, Piotr Roszatycki, |
| 2674 |
Rafael Garcia-Suarez, Reini Urban, Reuben Thomas, Ricardo Signes, Ruslan |
| 2675 |
Zakirov, Sergey Alekseev, Shirakata Kentaro, Shlomi Fish, Slaven Rezic, |
| 2676 |
Smylers, Steffen Müller, Steve Hay, Sullivan Beck, Thomas Sibley, Tobias |
| 2677 |
Leich, Toby Inkster, Tokuhiro Matsuno, Tom Christiansen, Tom Hukins, Tony Cook, |
| 2678 |
Victor Efimov, Viktor Turskyi, Vladimir Timofeev, YAMASHINA Hio, Yves Orton, |
| 2679 |
Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason. |
| 2680 |
.PP |
| 2681 |
The list above is almost certainly incomplete as it is automatically generated |
| 2682 |
from version control history. In particular, it does not include the names of |
| 2683 |
the (very much appreciated) contributors who reported issues to the Perl bug |
| 2684 |
tracker. |
| 2685 |
.PP |
| 2686 |
Many of the changes included in this version originated in the CPAN modules |
| 2687 |
included in Perl's core. We're grateful to the entire CPAN community for |
| 2688 |
helping Perl to flourish. |
| 2689 |
.PP |
| 2690 |
For a more complete list of all of Perl's historical contributors, please see |
| 2691 |
the \fIAUTHORS\fR file in the Perl source distribution. |
| 2692 |
.SH "Reporting Bugs" |
| 2693 |
.IX Header "Reporting Bugs" |
| 2694 |
If you find what you think is a bug, you might check the articles recently |
| 2695 |
posted to the comp.lang.perl.misc newsgroup and the perl bug database at |
| 2696 |
http://rt.perl.org/perlbug/ . There may also be information at |
| 2697 |
http://www.perl.org/ , the Perl Home Page. |
| 2698 |
.PP |
| 2699 |
If you believe you have an unreported bug, please run the perlbug program |
| 2700 |
included with your release. Be sure to trim your bug down to a tiny but |
| 2701 |
sufficient test case. Your bug report, along with the output of \f(CW\*(C`perl \-V\*(C'\fR, |
| 2702 |
will be sent off to [email protected] to be analysed by the Perl porting team. |
| 2703 |
.PP |
| 2704 |
If the bug you are reporting has security implications, which make it |
| 2705 |
inappropriate to send to a publicly archived mailing list, then please send it |
| 2706 |
to perl5\-security\[email protected]. This points to a closed subscription |
| 2707 |
unarchived mailing list, which includes all the core committers, who will be |
| 2708 |
able to help assess the impact of issues, figure out a resolution, and help |
| 2709 |
co-ordinate the release of patches to mitigate or fix the problem across all |
| 2710 |
platforms on which Perl is supported. Please only use this address for |
| 2711 |
security issues in the Perl core, not for modules independently distributed on |
| 2712 |
CPAN. |
| 2713 |
.SH "SEE ALSO" |
| 2714 |
.IX Header "SEE ALSO" |
| 2715 |
The \fIChanges\fR file for an explanation of how to view exhaustive details on |
| 2716 |
what changed. |
| 2717 |
.PP |
| 2718 |
The \fIINSTALL\fR file for how to build Perl. |
| 2719 |
.PP |
| 2720 |
The \fIREADME\fR file for general stuff. |
| 2721 |
.PP |
| 2722 |
The \fIArtistic\fR and \fICopying\fR files for copyright information. |