Debian Codegraph @

upstream/opensuse-tumbleweed/man1/perl5200delta.1

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