Debian Codegraph @

upstream/debian-unstable/man1/perl5140delta.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "PERL5140DELTA 1"
58 .TH PERL5140DELTA 1 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 perl5140delta \- what is new for perl v5.14.0
65 .SH DESCRIPTION
66 .IX Header "DESCRIPTION"
67 This document describes differences between the 5.12.0 release and
68 the 5.14.0 release.
69 .PP
70 If you are upgrading from an earlier release such as 5.10.0, first read
71 perl5120delta, which describes differences between 5.10.0 and
72 5.12.0.
73 .PP
74 Some of the bug fixes in this release have been backported to subsequent
75 releases of 5.12.x. Those are indicated with the 5.12.x version in
76 parentheses.
77 .SH Notice
78 .IX Header "Notice"
79 As described in perlpolicy, the release of Perl 5.14.0 marks the
80 official end of support for Perl 5.10. Users of Perl 5.10 or earlier
81 should consider upgrading to a more recent release of Perl.
82 .SH "Core Enhancements"
83 .IX Header "Core Enhancements"
84 .SS Unicode
85 .IX Subsection "Unicode"
86 \fIUnicode Version 6.0 is now supported (mostly)\fR
87 .IX Subsection "Unicode Version 6.0 is now supported (mostly)"
88 .PP
89 Perl comes with the Unicode 6.0 data base updated with
90 Corrigendum #8 <http://www.unicode.org/versions/corrigendum8.html>,
91 with one exception noted below.
92 See <http://unicode.org/versions/Unicode6.0.0/> for details on the new
93 release. Perl does not support any Unicode provisional properties,
94 including the new ones for this release.
95 .PP
96 Unicode 6.0 has chosen to use the name \f(CW\*(C`BELL\*(C'\fR for the character at U+1F514,
97 which is a symbol that looks like a bell, and is used in Japanese cell
98 phones. This conflicts with the long-standing Perl usage of having
99 \&\f(CW\*(C`BELL\*(C'\fR mean the ASCII \f(CW\*(C`BEL\*(C'\fR character, U+0007. In Perl 5.14,
100 \&\f(CW\*(C`\eN{BELL}\*(C'\fR continues to mean U+0007, but its use generates a
101 deprecation warning message unless such warnings are turned off. The
102 new name for U+0007 in Perl is \f(CW\*(C`ALERT\*(C'\fR, which corresponds nicely
103 with the existing shorthand sequence for it, \f(CW"\ea"\fR. \f(CW\*(C`\eN{BEL}\*(C'\fR
104 means U+0007, with no warning given. The character at U+1F514 has no
105 name in 5.14, but can be referred to by \f(CW\*(C`\eN{U+1F514}\*(C'\fR.
106 In Perl 5.16, \f(CW\*(C`\eN{BELL}\*(C'\fR will refer to U+1F514; all code
107 that uses \f(CW\*(C`\eN{BELL}\*(C'\fR should be converted to use \f(CW\*(C`\eN{ALERT}\*(C'\fR,
108 \&\f(CW\*(C`\eN{BEL}\*(C'\fR, or \f(CW"\ea"\fR before upgrading.
109 .PP
110 \fIFull functionality for \fR\f(CI\*(C`use feature \*(Aqunicode_strings\*(Aq\*(C'\fR
111 .IX Subsection "Full functionality for use feature unicode_strings"
112 .PP
113 This release provides full functionality for \f(CWuse feature
114 \&\*(Aqunicode_strings\*(Aq\fR. Under its scope, all string operations executed and
115 regular expressions compiled (even if executed outside its scope) have
116 Unicode semantics. See "the 'unicode_strings' feature" in feature.
117 However, see "Inverted bracketed character classes and multi-character folds",
118 below.
119 .PP
120 This feature avoids most forms of the "Unicode Bug" (see
121 "The "Unicode Bug"" in perlunicode for details). If there is any
122 possibility that your code will process Unicode strings, you are
123 \&\fIstrongly\fR encouraged to use this subpragma to avoid nasty surprises.
124 .PP
125 \fR\f(CI\*(C`\eN{NAME}\*(C'\fR\fI and \fR\f(CI\*(C`charnames\*(C'\fR\fI enhancements\fR
126 .IX Subsection "N{NAME} and charnames enhancements"
127 .IP \(bu 4
128 \&\f(CW\*(C`\eN{\fR\f(CINAME\fR\f(CW}\*(C'\fR and \f(CW\*(C`charnames::vianame\*(C'\fR now know about the abbreviated
129 character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc.; all
130 customary abbreviations for the C0 and C1 control characters (such as
131 ACK, BEL, CAN, etc.); and a few new variants of some C1 full names that
132 are in common usage.
133 .IP \(bu 4
134 Unicode has several \fInamed character sequences\fR, in which particular sequences
135 of code points are given names. \f(CW\*(C`\eN{\fR\f(CINAME\fR\f(CW}\*(C'\fR now recognizes these.
136 .IP \(bu 4
137 \&\f(CW\*(C`\eN{\fR\f(CINAME\fR\f(CW}\*(C'\fR, \f(CW\*(C`charnames::vianame\*(C'\fR, and \f(CW\*(C`charnames::viacode\*(C'\fR
138 now know about every character in Unicode. In earlier releases of
139 Perl, they didn't know about the Hangul syllables nor several
140 CJK (Chinese/Japanese/Korean) characters.
141 .IP \(bu 4
142 It is now possible to override Perl's abbreviations with your own custom aliases.
143 .IP \(bu 4
144 You can now create a custom alias of the ordinal of a
145 character, known by \f(CW\*(C`\eN{\fR\f(CINAME\fR\f(CW}\*(C'\fR, \f(CWcharnames::vianame()\fR, and
146 \&\f(CWcharnames::viacode()\fR. Previously, aliases had to be to official
147 Unicode character names. This made it impossible to create an alias for
148 unnamed code points, such as those reserved for private
149 use.
150 .IP \(bu 4
151 The new function \fBcharnames::string_vianame()\fR is a run-time version
152 of \f(CW\*(C`\eN{\fR\f(CINAME\fR\f(CW}}\*(C'\fR, returning the string of characters whose Unicode
153 name is its parameter. It can handle Unicode named character
154 sequences, whereas the pre-existing \fBcharnames::vianame()\fR cannot,
155 as the latter returns a single code point.
156 .PP
157 See charnames for details on all these changes.
158 .PP
159 \fINew warnings categories for problematic (non\-)Unicode code points\fR
160 .IX Subsection "New warnings categories for problematic (non-)Unicode code points"
161 .PP
162 Three new warnings subcategories of "utf8" have been added. These
163 allow you to turn off some "utf8" warnings, while allowing
164 other warnings to remain on. The three categories are:
165 \&\f(CW\*(C`surrogate\*(C'\fR when UTF\-16 surrogates are encountered;
166 \&\f(CW\*(C`nonchar\*(C'\fR when Unicode non-character code points are encountered;
167 and \f(CW\*(C`non_unicode\*(C'\fR when code points above the legal Unicode
168 maximum of 0x10FFFF are encountered.
169 .PP
170 \fIAny unsigned value can be encoded as a character\fR
171 .IX Subsection "Any unsigned value can be encoded as a character"
172 .PP
173 With this release, Perl is adopting a model that any unsigned value
174 can be treated as a code point and encoded internally (as utf8)
175 without warnings, not just the code points that are legal in Unicode.
176 However, unless utf8 or the corresponding sub-category (see previous
177 item) of lexical warnings have been explicitly turned off, outputting
178 or executing a Unicode-defined operation such as upper-casing
179 on such a code point generates a warning. Attempting to input these
180 using strict rules (such as with the \f(CW:encoding(UTF\-8)\fR layer)
181 will continue to fail. Prior to this release, handling was
182 inconsistent and in places, incorrect.
183 .PP
184 Unicode non-characters, some of which previously were erroneously
185 considered illegal in places by Perl, contrary to the Unicode Standard,
186 are now always legal internally. Inputting or outputting them
187 works the same as with the non-legal Unicode code points, because the Unicode
188 Standard says they are (only) illegal for "open interchange".
189 .PP
190 \fIUnicode database files not installed\fR
191 .IX Subsection "Unicode database files not installed"
192 .PP
193 The Unicode database files are no longer installed with Perl. This
194 doesn't affect any functionality in Perl and saves significant disk
195 space. If you need these files, you can download them from
196 <http://www.unicode.org/Public/zipped/6.0.0/>.
197 .SS "Regular Expressions"
198 .IX Subsection "Regular Expressions"
199 \fR\f(CI\*(C`(?^...)\*(C'\fR\fI construct signifies default modifiers\fR
200 .IX Subsection "(?^...) construct signifies default modifiers"
201 .PP
202 An ASCII caret \f(CW"^"\fR immediately following a \f(CW"(?"\fR in a regular
203 expression now means that the subexpression does not inherit surrounding
204 modifiers such as \f(CW\*(C`/i\*(C'\fR, but reverts to the Perl defaults. Any modifiers
205 following the caret override the defaults.
206 .PP
207 Stringification of regular expressions now uses this notation.
208 For example, \f(CW\*(C`qr/hlagh/i\*(C'\fR would previously be stringified as
209 \&\f(CW\*(C`(?i\-xsm:hlagh)\*(C'\fR, but now it's stringified as \f(CW\*(C`(?^i:hlagh)\*(C'\fR.
210 .PP
211 The main purpose of this change is to allow tests that rely on the
212 stringification \fInot\fR to have to change whenever new modifiers are added.
213 See "Extended Patterns" in perlre.
214 .PP
215 This change is likely to break code that compares stringified regular
216 expressions with fixed strings containing \f(CW\*(C`?\-xism\*(C'\fR.
217 .PP
218 \fR\f(CI\*(C`/d\*(C'\fR\fI, \fR\f(CI\*(C`/l\*(C'\fR\fI, \fR\f(CI\*(C`/u\*(C'\fR\fI, and \fR\f(CI\*(C`/a\*(C'\fR\fI modifiers\fR
219 .IX Subsection "/d, /l, /u, and /a modifiers"
220 .PP
221 Four new regular expression modifiers have been added. These are mutually
222 exclusive: one only can be turned on at a time.
223 .IP \(bu 4
224 The \f(CW\*(C`/l\*(C'\fR modifier says to compile the regular expression as if it were
225 in the scope of \f(CW\*(C`use locale\*(C'\fR, even if it is not.
226 .IP \(bu 4
227 The \f(CW\*(C`/u\*(C'\fR modifier says to compile the regular expression as if it were
228 in the scope of a \f(CW\*(C`use feature \*(Aqunicode_strings\*(Aq\*(C'\fR pragma.
229 .IP \(bu 4
230 The \f(CW\*(C`/d\*(C'\fR (default) modifier is used to override any \f(CW\*(C`use locale\*(C'\fR and
231 \&\f(CW\*(C`use feature \*(Aqunicode_strings\*(Aq\*(C'\fR pragmas in effect at the time
232 of compiling the regular expression.
233 .IP \(bu 4
234 The \f(CW\*(C`/a\*(C'\fR regular expression modifier restricts \f(CW\*(C`\es\*(C'\fR, \f(CW\*(C`\ed\*(C'\fR and \f(CW\*(C`\ew\*(C'\fR and
235 the POSIX (\f(CW\*(C`[[:posix:]]\*(C'\fR) character classes to the ASCII range. Their
236 complements and \f(CW\*(C`\eb\*(C'\fR and \f(CW\*(C`\eB\*(C'\fR are correspondingly
237 affected. Otherwise, \f(CW\*(C`/a\*(C'\fR behaves like the \f(CW\*(C`/u\*(C'\fR modifier, in that
238 case-insensitive matching uses Unicode semantics.
239 .Sp
240 If the \f(CW\*(C`/a\*(C'\fR modifier is repeated, then additionally in case-insensitive
241 matching, no ASCII character can match a non-ASCII character.
242 For example,
243 .Sp
244 .Vb 2
245 \& "k" =~ /\eN{KELVIN SIGN}/ai
246 \& "\exDF" =~ /ss/ai
247 .Ve
248 .Sp
249 match but
250 .Sp
251 .Vb 2
252 \& "k" =~ /\eN{KELVIN SIGN}/aai
253 \& "\exDF" =~ /ss/aai
254 .Ve
255 .Sp
256 do not match.
257 .PP
258 See "Modifiers" in perlre for more detail.
259 .PP
260 \fINon-destructive substitution\fR
261 .IX Subsection "Non-destructive substitution"
262 .PP
263 The substitution (\f(CW\*(C`s///\*(C'\fR) and transliteration
264 (\f(CW\*(C`y///\*(C'\fR) operators now support an \f(CW\*(C`/r\*(C'\fR option that
265 copies the input variable, carries out the substitution on
266 the copy, and returns the result. The original remains unmodified.
267 .PP
268 .Vb 3
269 \& my $old = "cat";
270 \& my $new = $old =~ s/cat/dog/r;
271 \& # $old is "cat" and $new is "dog"
272 .Ve
273 .PP
274 This is particularly useful with \f(CW\*(C`map\*(C'\fR. See perlop for more examples.
275 .PP
276 \fIRe-entrant regular expression engine\fR
277 .IX Subsection "Re-entrant regular expression engine"
278 .PP
279 It is now safe to use regular expressions within \f(CW\*(C`(?{...})\*(C'\fR and
280 \&\f(CW\*(C`(??{...})\*(C'\fR code blocks inside regular expressions.
281 .PP
282 These blocks are still experimental, however, and still have problems with
283 lexical (\f(CW\*(C`my\*(C'\fR) variables and abnormal exiting.
284 .PP
285 \fR\f(CI\*(C`use re \*(Aq/flags\*(Aq\*(C'\fR\fI\fR
286 .IX Subsection "use re /flags"
287 .PP
288 The \f(CW\*(C`re\*(C'\fR pragma now has the ability to turn on regular expression flags
289 till the end of the lexical scope:
290 .PP
291 .Vb 2
292 \& use re "/x";
293 \& "foo" =~ / (.+) /; # /x implied
294 .Ve
295 .PP
296 See "'/flags' mode" in re for details.
297 .PP
298 \fI\eo{...} for octals\fR
299 .IX Subsection "o{...} for octals"
300 .PP
301 There is a new octal escape sequence, \f(CW"\eo"\fR, in doublequote-like
302 contexts. This construct allows large octal ordinals beyond the
303 current max of 0777 to be represented. It also allows you to specify a
304 character in octal which can safely be concatenated with other regex
305 snippets and which won't be confused with being a backreference to
306 a regex capture group. See "Capture groups" in perlre.
307 .PP
308 \fIAdd \fR\f(CI\*(C`\ep{Titlecase}\*(C'\fR\fI as a synonym for \fR\f(CI\*(C`\ep{Title}\*(C'\fR
309 .IX Subsection "Add p{Titlecase} as a synonym for p{Title}"
310 .PP
311 This synonym is added for symmetry with the Unicode property names
312 \&\f(CW\*(C`\ep{Uppercase}\*(C'\fR and \f(CW\*(C`\ep{Lowercase}\*(C'\fR.
313 .PP
314 \fIRegular expression debugging output improvement\fR
315 .IX Subsection "Regular expression debugging output improvement"
316 .PP
317 Regular expression debugging output (turned on by \f(CW\*(C`use re \*(Aqdebug\*(Aq\*(C'\fR) now
318 uses hexadecimal when escaping non-ASCII characters, instead of octal.
319 .PP
320 \fIReturn value of \fR\f(CI\*(C`delete $+{...}\*(C'\fR
321 .IX Subsection "Return value of delete $+{...}"
322 .PP
323 Custom regular expression engines can now determine the return value of
324 \&\f(CW\*(C`delete\*(C'\fR on an entry of \f(CW\*(C`%+\*(C'\fR or \f(CW\*(C`%\-\*(C'\fR.
325 .SS "Syntactical Enhancements"
326 .IX Subsection "Syntactical Enhancements"
327 \fIArray and hash container functions accept references\fR
328 .IX Subsection "Array and hash container functions accept references"
329 .PP
330 \&\fBWarning:\fR This feature is considered experimental, as the exact behaviour
331 may change in a future version of Perl.
332 .PP
333 All builtin functions that operate directly on array or hash
334 containers now also accept unblessed hard references to arrays
335 or hashes:
336 .PP
337 .Vb 10
338 \& |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-|
339 \& | Traditional syntax | Terse syntax |
340 \& |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-|
341 \& | push @$arrayref, @stuff | push $arrayref, @stuff |
342 \& | unshift @$arrayref, @stuff | unshift $arrayref, @stuff |
343 \& | pop @$arrayref | pop $arrayref |
344 \& | shift @$arrayref | shift $arrayref |
345 \& | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 |
346 \& | keys %$hashref | keys $hashref |
347 \& | keys @$arrayref | keys $arrayref |
348 \& | values %$hashref | values $hashref |
349 \& | values @$arrayref | values $arrayref |
350 \& | ($k,$v) = each %$hashref | ($k,$v) = each $hashref |
351 \& | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref |
352 \& |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-|
353 .Ve
354 .PP
355 This allows these builtin functions to act on long dereferencing chains
356 or on the return value of subroutines without needing to wrap them in
357 \&\f(CW\*(C`@{}\*(C'\fR or \f(CW\*(C`%{}\*(C'\fR:
358 .PP
359 .Vb 2
360 \& push @{$obj\->tags}, $new_tag; # old way
361 \& push $obj\->tags, $new_tag; # new way
362 \&
363 \& for ( keys %{$hoh\->{genres}{artists}} ) {...} # old way
364 \& for ( keys $hoh\->{genres}{artists} ) {...} # new way
365 .Ve
366 .PP
367 \fISingle term prototype\fR
368 .IX Subsection "Single term prototype"
369 .PP
370 The \f(CW\*(C`+\*(C'\fR prototype is a special alternative to \f(CW\*(C`$\*(C'\fR that acts like
371 \&\f(CW\*(C`\e[@%]\*(C'\fR when given a literal array or hash variable, but will otherwise
372 force scalar context on the argument. See "Prototypes" in perlsub.
373 .PP
374 \fR\f(CI\*(C`package\*(C'\fR\fI block syntax\fR
375 .IX Subsection "package block syntax"
376 .PP
377 A package declaration can now contain a code block, in which case the
378 declaration is in scope inside that block only. So \f(CW\*(C`package Foo { ... }\*(C'\fR
379 is precisely equivalent to \f(CW\*(C`{ package Foo; ... }\*(C'\fR. It also works with
380 a version number in the declaration, as in \f(CW\*(C`package Foo 1.2 { ... }\*(C'\fR,
381 which is its most attractive feature. See perlfunc.
382 .PP
383 \fIStatement labels can appear in more places\fR
384 .IX Subsection "Statement labels can appear in more places"
385 .PP
386 Statement labels can now occur before any type of statement or declaration,
387 such as \f(CW\*(C`package\*(C'\fR.
388 .PP
389 \fIStacked labels\fR
390 .IX Subsection "Stacked labels"
391 .PP
392 Multiple statement labels can now appear before a single statement.
393 .PP
394 \fIUppercase X/B allowed in hexadecimal/binary literals\fR
395 .IX Subsection "Uppercase X/B allowed in hexadecimal/binary literals"
396 .PP
397 Literals may now use either upper case \f(CW\*(C`0X...\*(C'\fR or \f(CW\*(C`0B...\*(C'\fR prefixes,
398 in addition to the already supported \f(CW\*(C`0x...\*(C'\fR and \f(CW\*(C`0b...\*(C'\fR
399 syntax [perl #76296].
400 .PP
401 C, Ruby, Python, and PHP already support this syntax, and it makes
402 Perl more internally consistent: a round-trip with \f(CW\*(C`eval sprintf
403 "%#X", 0x10\*(C'\fR now returns \f(CW16\fR, just like \f(CW\*(C`eval sprintf "%#x", 0x10\*(C'\fR.
404 .PP
405 \fIOverridable tie functions\fR
406 .IX Subsection "Overridable tie functions"
407 .PP
408 \&\f(CW\*(C`tie\*(C'\fR, \f(CW\*(C`tied\*(C'\fR and \f(CW\*(C`untie\*(C'\fR can now be overridden [perl #75902].
409 .SS "Exception Handling"
410 .IX Subsection "Exception Handling"
411 To make them more reliable and consistent, several changes have been made
412 to how \f(CW\*(C`die\*(C'\fR, \f(CW\*(C`warn\*(C'\fR, and \f(CW$@\fR behave.
413 .IP \(bu 4
414 When an exception is thrown inside an \f(CW\*(C`eval\*(C'\fR, the exception is no
415 longer at risk of being clobbered by destructor code running during unwinding.
416 Previously, the exception was written into \f(CW$@\fR
417 early in the throwing process, and would be overwritten if \f(CW\*(C`eval\*(C'\fR was
418 used internally in the destructor for an object that had to be freed
419 while exiting from the outer \f(CW\*(C`eval\*(C'\fR. Now the exception is written
420 into \f(CW$@\fR last thing before exiting the outer \f(CW\*(C`eval\*(C'\fR, so the code
421 running immediately thereafter can rely on the value in \f(CW$@\fR correctly
422 corresponding to that \f(CW\*(C`eval\*(C'\fR. (\f(CW$@\fR is still also set before exiting the
423 \&\f(CW\*(C`eval\*(C'\fR, for the sake of destructors that rely on this.)
424 .Sp
425 Likewise, a \f(CW\*(C`local $@\*(C'\fR inside an \f(CW\*(C`eval\*(C'\fR no longer clobbers any
426 exception thrown in its scope. Previously, the restoration of \f(CW$@\fR upon
427 unwinding would overwrite any exception being thrown. Now the exception
428 gets to the \f(CW\*(C`eval\*(C'\fR anyway. So \f(CW\*(C`local $@\*(C'\fR is safe before a \f(CW\*(C`die\*(C'\fR.
429 .Sp
430 Exceptions thrown from object destructors no longer modify the \f(CW$@\fR
431 of the surrounding context. (If the surrounding context was exception
432 unwinding, this used to be another way to clobber the exception being
433 thrown.) Previously such an exception was
434 sometimes emitted as a warning, and then either was
435 string-appended to the surrounding \f(CW$@\fR or completely replaced the
436 surrounding \f(CW$@\fR, depending on whether that exception and the surrounding
437 \&\f(CW$@\fR were strings or objects. Now, an exception in this situation is
438 always emitted as a warning, leaving the surrounding \f(CW$@\fR untouched.
439 In addition to object destructors, this also affects any function call
440 run by XS code using the \f(CW\*(C`G_KEEPERR\*(C'\fR flag.
441 .IP \(bu 4
442 Warnings for \f(CW\*(C`warn\*(C'\fR can now be objects in the same way as exceptions
443 for \f(CW\*(C`die\*(C'\fR. If an object-based warning gets the default handling
444 of writing to standard error, it is stringified as before with the
445 filename and line number appended. But a \f(CW$SIG{_\|_WARN_\|_}\fR handler now
446 receives an object-based warning as an object, where previously it
447 was passed the result of stringifying the object.
448 .SS "Other Enhancements"
449 .IX Subsection "Other Enhancements"
450 \fIAssignment to \fR\f(CI$0\fR\fI sets the legacy process name with \fR\f(BIprctl()\fR\fI on Linux\fR
451 .IX Subsection "Assignment to $0 sets the legacy process name with prctl() on Linux"
452 .PP
453 On Linux the legacy process name is now set with \fBprctl\fR\|(2), in
454 addition to altering the POSIX name via \f(CW\*(C`argv[0]\*(C'\fR, as Perl has done
455 since version 4.000. Now system utilities that read the legacy process
456 name such as \fIps\fR, \fItop\fR, and \fIkillall\fR recognize the name you set when
457 assigning to \f(CW$0\fR. The string you supply is truncated at 16 bytes;
458 this limitation is imposed by Linux.
459 .PP
460 \fR\f(BIsrand()\fR\fI now returns the seed\fR
461 .IX Subsection "srand() now returns the seed"
462 .PP
463 This allows programs that need to have repeatable results not to have to come
464 up with their own seed-generating mechanism. Instead, they can use \fBsrand()\fR
465 and stash the return value for future use. One example is a test program with
466 too many combinations to test comprehensively in the time available for
467 each run. It can test a random subset each time and, should there be a failure,
468 log the seed used for that run so this can later be used to produce the same results.
469 .PP
470 \fIprintf-like functions understand post\-1980 size modifiers\fR
471 .IX Subsection "printf-like functions understand post-1980 size modifiers"
472 .PP
473 Perl's printf and sprintf operators, and Perl's internal printf replacement
474 function, now understand the C90 size modifiers "hh" (\f(CW\*(C`char\*(C'\fR), "z"
475 (\f(CW\*(C`size_t\*(C'\fR), and "t" (\f(CW\*(C`ptrdiff_t\*(C'\fR). Also, when compiled with a C99
476 compiler, Perl now understands the size modifier "j" (\f(CW\*(C`intmax_t\*(C'\fR)
477 (but this is not portable).
478 .PP
479 So, for example, on any modern machine, \f(CW\*(C`sprintf("%hhd", 257)\*(C'\fR returns "1".
480 .PP
481 \fINew global variable \fR\f(CI\*(C`${^GLOBAL_PHASE}\*(C'\fR
482 .IX Subsection "New global variable ${^GLOBAL_PHASE}"
483 .PP
484 A new global variable, \f(CW\*(C`${^GLOBAL_PHASE}\*(C'\fR, has been added to allow
485 introspection of the current phase of the Perl interpreter. It's explained in
486 detail in "${^GLOBAL_PHASE}" in perlvar and in
487 "BEGIN, UNITCHECK, CHECK, INIT and END" in perlmod.
488 .PP
489 \fR\f(CI\*(C`\-d:\-foo\*(C'\fR\fI calls \fR\f(CI\*(C`Devel::foo::unimport\*(C'\fR\fI\fR
490 .IX Subsection "-d:-foo calls Devel::foo::unimport"
491 .PP
492 The syntax \fB\-d:foo\fR was extended in 5.6.1 to make \fB\-d:foo=bar\fR
493 equivalent to \fB\-MDevel::foo=bar\fR, which expands
494 internally to \f(CW\*(C`use Devel::foo \*(Aqbar\*(Aq\*(C'\fR.
495 Perl now allows prefixing the module name with \fB\-\fR, with the same
496 semantics as \fB\-M\fR; that is:
497 .ie n .IP """\-d:\-foo""" 4
498 .el .IP \f(CW\-d:\-foo\fR 4
499 .IX Item "-d:-foo"
500 Equivalent to \fB\-M\-Devel::foo\fR: expands to
501 \&\f(CW\*(C`no Devel::foo\*(C'\fR and calls \f(CW\*(C`Devel::foo\->unimport()\*(C'\fR
502 if that method exists.
503 .ie n .IP """\-d:\-foo=bar""" 4
504 .el .IP \f(CW\-d:\-foo=bar\fR 4
505 .IX Item "-d:-foo=bar"
506 Equivalent to \fB\-M\-Devel::foo=bar\fR: expands to \f(CW\*(C`no Devel::foo \*(Aqbar\*(Aq\*(C'\fR,
507 and calls \f(CW\*(C`Devel::foo\->unimport("bar")\*(C'\fR if that method exists.
508 .PP
509 This is particularly useful for suppressing the default actions of a
510 \&\f(CW\*(C`Devel::*\*(C'\fR module's \f(CW\*(C`import\*(C'\fR method whilst still loading it for debugging.
511 .PP
512 \fIFilehandle method calls load IO::File on demand\fR
513 .IX Subsection "Filehandle method calls load IO::File on demand"
514 .PP
515 When a method call on a filehandle would die because the method cannot
516 be resolved and IO::File has not been loaded, Perl now loads IO::File
517 via \f(CW\*(C`require\*(C'\fR and attempts method resolution again:
518 .PP
519 .Vb 2
520 \& open my $fh, ">", $file;
521 \& $fh\->binmode(":raw"); # loads IO::File and succeeds
522 .Ve
523 .PP
524 This also works for globs like \f(CW\*(C`STDOUT\*(C'\fR, \f(CW\*(C`STDERR\*(C'\fR, and \f(CW\*(C`STDIN\*(C'\fR:
525 .PP
526 .Vb 1
527 \& STDOUT\->autoflush(1);
528 .Ve
529 .PP
530 Because this on-demand load happens only if method resolution fails, the
531 legacy approach of manually loading an IO::File parent class for partial
532 method support still works as expected:
533 .PP
534 .Vb 3
535 \& use IO::Handle;
536 \& open my $fh, ">", $file;
537 \& $fh\->autoflush(1); # IO::File not loaded
538 .Ve
539 .PP
540 \fIImproved IPv6 support\fR
541 .IX Subsection "Improved IPv6 support"
542 .PP
543 The \f(CW\*(C`Socket\*(C'\fR module provides new affordances for IPv6,
544 including implementations of the \f(CWSocket::getaddrinfo()\fR and
545 \&\f(CWSocket::getnameinfo()\fR functions, along with related constants and a
546 handful of new functions. See Socket.
547 .PP
548 \fIDTrace probes now include package name\fR
549 .IX Subsection "DTrace probes now include package name"
550 .PP
551 The \f(CW\*(C`DTrace\*(C'\fR probes now include an additional argument, \f(CW\*(C`arg3\*(C'\fR, which contains
552 the package the subroutine being entered or left was compiled in.
553 .PP
554 For example, using the following DTrace script:
555 .PP
556 .Vb 4
557 \& perl$target:::sub\-entry
558 \& {
559 \& printf("%s::%s\en", copyinstr(arg0), copyinstr(arg3));
560 \& }
561 .Ve
562 .PP
563 and then running:
564 .PP
565 .Vb 1
566 \& $ perl \-e \*(Aqsub test { }; test\*(Aq
567 .Ve
568 .PP
569 \&\f(CW\*(C`DTrace\*(C'\fR will print:
570 .PP
571 .Vb 1
572 \& main::test
573 .Ve
574 .SS "New C APIs"
575 .IX Subsection "New C APIs"
576 See "Internal Changes".
577 .SH Security
578 .IX Header "Security"
579 .SS "User-defined regular expression properties"
580 .IX Subsection "User-defined regular expression properties"
581 "User-Defined Character Properties" in perlunicode documented that you can
582 create custom properties by defining subroutines whose names begin with
583 "In" or "Is". However, Perl did not actually enforce that naming
584 restriction, so \f(CW\*(C`\ep{foo::bar}\*(C'\fR could call \fBfoo::bar()\fR if it existed. The documented
585 convention is now enforced.
586 .PP
587 Also, Perl no longer allows tainted regular expressions to invoke a
588 user-defined property. It simply dies instead [perl #82616].
589 .SH "Incompatible Changes"
590 .IX Header "Incompatible Changes"
591 Perl 5.14.0 is not binary-compatible with any previous stable release.
592 .PP
593 In addition to the sections that follow, see "C API Changes".
594 .SS "Regular Expressions and String Escapes"
595 .IX Subsection "Regular Expressions and String Escapes"
596 \fIInverted bracketed character classes and multi-character folds\fR
597 .IX Subsection "Inverted bracketed character classes and multi-character folds"
598 .PP
599 Some characters match a sequence of two or three characters in \f(CW\*(C`/i\*(C'\fR
600 regular expression matching under Unicode rules. One example is
601 \&\f(CW\*(C`LATIN SMALL LETTER SHARP S\*(C'\fR which matches the sequence \f(CW\*(C`ss\*(C'\fR.
602 .PP
603 .Vb 1
604 \& \*(Aqss\*(Aq =~ /\eA[\eN{LATIN SMALL LETTER SHARP S}]\ez/i # Matches
605 .Ve
606 .PP
607 This, however, can lead to very counter-intuitive results, especially
608 when inverted. Because of this, Perl 5.14 does not use multi-character \f(CW\*(C`/i\*(C'\fR
609 matching in inverted character classes.
610 .PP
611 .Vb 1
612 \& \*(Aqss\*(Aq =~ /\eA[^\eN{LATIN SMALL LETTER SHARP S}]+\ez/i # ???
613 .Ve
614 .PP
615 This should match any sequences of characters that aren't the \f(CW\*(C`SHARP S\*(C'\fR
616 nor what \f(CW\*(C`SHARP S\*(C'\fR matches under \f(CW\*(C`/i\*(C'\fR. \f(CW"s"\fR isn't \f(CW\*(C`SHARP S\*(C'\fR, but
617 Unicode says that \f(CW"ss"\fR is what \f(CW\*(C`SHARP S\*(C'\fR matches under \f(CW\*(C`/i\*(C'\fR. So
618 which one "wins"? Do you fail the match because the string has \f(CW\*(C`ss\*(C'\fR or
619 accept it because it has an \f(CW\*(C`s\*(C'\fR followed by another \f(CW\*(C`s\*(C'\fR?
620 .PP
621 Earlier releases of Perl did allow this multi-character matching,
622 but due to bugs, it mostly did not work.
623 .PP
624 \fI\e400\-\e777\fR
625 .IX Subsection "400-777"
626 .PP
627 In certain circumstances, \f(CW\*(C`\e400\*(C'\fR\-\f(CW\*(C`\e777\*(C'\fR in regexes have behaved
628 differently than they behave in all other doublequote-like contexts.
629 Since 5.10.1, Perl has issued a deprecation warning when this happens.
630 Now, these literals behave the same in all doublequote-like contexts,
631 namely to be equivalent to \f(CW\*(C`\ex{100}\*(C'\fR\-\f(CW\*(C`\ex{1FF}\*(C'\fR, with no deprecation
632 warning.
633 .PP
634 Use of \f(CW\*(C`\e400\*(C'\fR\-\f(CW\*(C`\e777\*(C'\fR in the command-line option \fB\-0\fR retain their
635 conventional meaning. They slurp whole input files; previously, this
636 was documented only for \fB\-0777\fR.
637 .PP
638 Because of various ambiguities, you should use the new
639 \&\f(CW\*(C`\eo{...}\*(C'\fR construct to represent characters in octal instead.
640 .PP
641 \fIMost \fR\f(CI\*(C`\ep{}\*(C'\fR\fI properties are now immune to case-insensitive matching\fR
642 .IX Subsection "Most p{} properties are now immune to case-insensitive matching"
643 .PP
644 For most Unicode properties, it doesn't make sense to have them match
645 differently under \f(CW\*(C`/i\*(C'\fR case-insensitive matching. Doing so can lead
646 to unexpected results and potential security holes. For example
647 .PP
648 .Vb 1
649 \& m/\ep{ASCII_Hex_Digit}+/i
650 .Ve
651 .PP
652 could previously match non-ASCII characters because of the Unicode
653 matching rules (although there were several bugs with this). Now
654 matching under \f(CW\*(C`/i\*(C'\fR gives the same results as non\-\f(CW\*(C`/i\*(C'\fR matching except
655 for those few properties where people have come to expect differences,
656 namely the ones where casing is an integral part of their meaning, such
657 as \f(CW\*(C`m/\ep{Uppercase}/i\*(C'\fR and \f(CW\*(C`m/\ep{Lowercase}/i\*(C'\fR, both of which match
658 the same code points as matched by \f(CW\*(C`m/\ep{Cased}/i\*(C'\fR.
659 Details are in "Unicode Properties" in perlrecharclass.
660 .PP
661 User-defined property handlers that need to match differently under \f(CW\*(C`/i\*(C'\fR
662 must be changed to read the new boolean parameter passed to them, which
663 is non-zero if case-insensitive matching is in effect and 0 otherwise.
664 See "User-Defined Character Properties" in perlunicode.
665 .PP
666 \fI\ep{} implies Unicode semantics\fR
667 .IX Subsection "p{} implies Unicode semantics"
668 .PP
669 Specifying a Unicode property in the pattern indicates
670 that the pattern is meant for matching according to Unicode rules, the way
671 \&\f(CW\*(C`\eN{\fR\f(CINAME\fR\f(CW}\*(C'\fR does.
672 .PP
673 \fIRegular expressions retain their localeness when interpolated\fR
674 .IX Subsection "Regular expressions retain their localeness when interpolated"
675 .PP
676 Regular expressions compiled under \f(CW\*(C`use locale\*(C'\fR now retain this when
677 interpolated into a new regular expression compiled outside a
678 \&\f(CW\*(C`use locale\*(C'\fR, and vice-versa.
679 .PP
680 Previously, one regular expression interpolated into another inherited
681 the localeness of the surrounding regex, losing whatever state it
682 originally had. This is considered a bug fix, but may trip up code that
683 has come to rely on the incorrect behaviour.
684 .PP
685 \fIStringification of regexes has changed\fR
686 .IX Subsection "Stringification of regexes has changed"
687 .PP
688 Default regular expression modifiers are now notated using
689 \&\f(CW\*(C`(?^...)\*(C'\fR. Code relying on the old stringification will fail.
690 This is so that when new modifiers are added, such code won't
691 have to keep changing each time this happens, because the stringification
692 will automatically incorporate the new modifiers.
693 .PP
694 Code that needs to work properly with both old\- and new-style regexes
695 can avoid the whole issue by using (for perls since 5.9.5; see re):
696 .PP
697 .Vb 2
698 \& use re qw(regexp_pattern);
699 \& my ($pat, $mods) = regexp_pattern($re_ref);
700 .Ve
701 .PP
702 If the actual stringification is important or older Perls need to be
703 supported, you can use something like the following:
704 .PP
705 .Vb 2
706 \& # Accept both old and new\-style stringification
707 \& my $modifiers = (qr/foobar/ =~ /\eQ(?^/) ? "^" : "\-xism";
708 .Ve
709 .PP
710 And then use \f(CW$modifiers\fR instead of \f(CW\*(C`\-xism\*(C'\fR.
711 .PP
712 \fIRun-time code blocks in regular expressions inherit pragmata\fR
713 .IX Subsection "Run-time code blocks in regular expressions inherit pragmata"
714 .PP
715 Code blocks in regular expressions (\f(CW\*(C`(?{...})\*(C'\fR and \f(CW\*(C`(??{...})\*(C'\fR) previously
716 did not inherit pragmata (strict, warnings, etc.) if the regular expression
717 was compiled at run time as happens in cases like these two:
718 .PP
719 .Vb 3
720 \& use re "eval";
721 \& $foo =~ $bar; # when $bar contains (?{...})
722 \& $foo =~ /$bar(?{ $finished = 1 })/;
723 .Ve
724 .PP
725 This bug has now been fixed, but code that relied on the buggy behaviour
726 may need to be fixed to account for the correct behaviour.
727 .SS "Stashes and Package Variables"
728 .IX Subsection "Stashes and Package Variables"
729 \fILocalised tied hashes and arrays are no longed tied\fR
730 .IX Subsection "Localised tied hashes and arrays are no longed tied"
731 .PP
732 In the following:
733 .PP
734 .Vb 6
735 \& tie @a, ...;
736 \& {
737 \& local @a;
738 \& # here, @a is a now a new, untied array
739 \& }
740 \& # here, @a refers again to the old, tied array
741 .Ve
742 .PP
743 Earlier versions of Perl incorrectly tied the new local array. This has
744 now been fixed. This fix could however potentially cause a change in
745 behaviour of some code.
746 .PP
747 \fIStashes are now always defined\fR
748 .IX Subsection "Stashes are now always defined"
749 .PP
750 \&\f(CW\*(C`defined %Foo::\*(C'\fR now always returns true, even when no symbols have yet been
751 defined in that package.
752 .PP
753 This is a side-effect of removing a special-case kludge in the tokeniser,
754 added for 5.10.0, to hide side-effects of changes to the internal storage of
755 hashes. The fix drastically reduces hashes' memory overhead.
756 .PP
757 Calling defined on a stash has been deprecated since 5.6.0, warned on
758 lexicals since 5.6.0, and warned for stashes and other package
759 variables since 5.12.0. \f(CW\*(C`defined %hash\*(C'\fR has always exposed an
760 implementation detail: emptying a hash by deleting all entries from it does
761 not make \f(CW\*(C`defined %hash\*(C'\fR false. Hence \f(CW\*(C`defined %hash\*(C'\fR is not valid code to
762 determine whether an arbitrary hash is empty. Instead, use the behaviour
763 of an empty \f(CW%hash\fR always returning false in scalar context.
764 .PP
765 \fIClearing stashes\fR
766 .IX Subsection "Clearing stashes"
767 .PP
768 Stash list assignment \f(CW\*(C`%foo:: = ()\*(C'\fR used to make the stash temporarily
769 anonymous while it was being emptied. Consequently, any of its
770 subroutines referenced elsewhere would become anonymous, showing up as
771 "(unknown)" in \f(CW\*(C`caller\*(C'\fR. They now retain their package names such that
772 \&\f(CW\*(C`caller\*(C'\fR returns the original sub name if there is still a reference
773 to its typeglob and "foo::_\|_ANON_\|_" otherwise [perl #79208].
774 .PP
775 \fIDereferencing typeglobs\fR
776 .IX Subsection "Dereferencing typeglobs"
777 .PP
778 If you assign a typeglob to a scalar variable:
779 .PP
780 .Vb 1
781 \& $glob = *foo;
782 .Ve
783 .PP
784 the glob that is copied to \f(CW$glob\fR is marked with a special flag
785 indicating that the glob is just a copy. This allows subsequent
786 assignments to \f(CW$glob\fR to overwrite the glob. The original glob,
787 however, is immutable.
788 .PP
789 Some Perl operators did not distinguish between these two types of globs.
790 This would result in strange behaviour in edge cases: \f(CW\*(C`untie $scalar\*(C'\fR
791 would not untie the scalar if the last thing assigned to it was a glob
792 (because it treated it as \f(CW\*(C`untie *$scalar\*(C'\fR, which unties a handle).
793 Assignment to a glob slot (such as \f(CW\*(C`*$glob = \e@some_array\*(C'\fR) would simply
794 assign \f(CW\*(C`\e@some_array\*(C'\fR to \f(CW$glob\fR.
795 .PP
796 To fix this, the \f(CW\*(C`*{}\*(C'\fR operator (including its \f(CW*foo\fR and \f(CW*$foo\fR forms)
797 has been modified to make a new immutable glob if its operand is a glob
798 copy. This allows operators that make a distinction between globs and
799 scalars to be modified to treat only immutable globs as globs. (\f(CW\*(C`tie\*(C'\fR,
800 \&\f(CW\*(C`tied\*(C'\fR and \f(CW\*(C`untie\*(C'\fR have been left as they are for compatibility's sake,
801 but will warn. See "Deprecations".)
802 .PP
803 This causes an incompatible change in code that assigns a glob to the
804 return value of \f(CW\*(C`*{}\*(C'\fR when that operator was passed a glob copy. Take the
805 following code, for instance:
806 .PP
807 .Vb 2
808 \& $glob = *foo;
809 \& *$glob = *bar;
810 .Ve
811 .PP
812 The \f(CW*$glob\fR on the second line returns a new immutable glob. That new
813 glob is made an alias to \f(CW*bar\fR. Then it is discarded. So the second
814 assignment has no effect.
815 .PP
816 See <https://github.com/Perl/perl5/issues/10625> for
817 more detail.
818 .PP
819 \fIMagic variables outside the main package\fR
820 .IX Subsection "Magic variables outside the main package"
821 .PP
822 In previous versions of Perl, magic variables like \f(CW$!\fR, \f(CW%SIG\fR, etc. would
823 "leak" into other packages. So \f(CW%foo::SIG\fR could be used to access signals,
824 \&\f(CW\*(C`${"foo::!"}\*(C'\fR (with strict mode off) to access C's \f(CW\*(C`errno\*(C'\fR, etc.
825 .PP
826 This was a bug, or an "unintentional" feature, which caused various ill effects,
827 such as signal handlers being wiped when modules were loaded, etc.
828 .PP
829 This has been fixed (or the feature has been removed, depending on how you see
830 it).
831 .PP
832 \fIlocal($_) strips all magic from \fR\f(CI$_\fR
833 .IX Subsection "local($_) strips all magic from $_"
834 .PP
835 \&\fBlocal()\fR on scalar variables gives them a new value but keeps all
836 their magic intact. This has proven problematic for the default
837 scalar variable \f(CW$_\fR, where perlsub recommends that any subroutine
838 that assigns to \f(CW$_\fR should first localize it. This would throw an
839 exception if \f(CW$_\fR is aliased to a read-only variable, and could in general have
840 various unintentional side-effects.
841 .PP
842 Therefore, as an exception to the general rule, local($_) will not
843 only assign a new value to \f(CW$_\fR, but also remove all existing magic from
844 it as well.
845 .PP
846 \fIParsing of package and variable names\fR
847 .IX Subsection "Parsing of package and variable names"
848 .PP
849 Parsing the names of packages and package variables has changed:
850 multiple adjacent pairs of colons, as in \f(CW\*(C`foo::::bar\*(C'\fR, are now all
851 treated as package separators.
852 .PP
853 Regardless of this change, the exact parsing of package separators has
854 never been guaranteed and is subject to change in future Perl versions.
855 .SS "Changes to Syntax or to Perl Operators"
856 .IX Subsection "Changes to Syntax or to Perl Operators"
857 \fR\f(CI\*(C`given\*(C'\fR\fI return values\fR
858 .IX Subsection "given return values"
859 .PP
860 \&\f(CW\*(C`given\*(C'\fR blocks now return the last evaluated
861 expression, or an empty list if the block was exited by \f(CW\*(C`break\*(C'\fR. Thus you
862 can now write:
863 .PP
864 .Vb 8
865 \& my $type = do {
866 \& given ($num) {
867 \& break when undef;
868 \& "integer" when /^[+\-]?[0\-9]+$/;
869 \& "float" when /^[+\-]?[0\-9]+(?:\e.[0\-9]+)?$/;
870 \& "unknown";
871 \& }
872 \& };
873 .Ve
874 .PP
875 See "Return value" in perlsyn for details.
876 .PP
877 \fIChange in parsing of certain prototypes\fR
878 .IX Subsection "Change in parsing of certain prototypes"
879 .PP
880 Functions declared with the following prototypes now behave correctly as unary
881 functions:
882 .PP
883 .Vb 6
884 \& *
885 \& \e$ \e% \e@ \e* \e&
886 \& \e[...]
887 \& ;$ ;*
888 \& ;\e$ ;\e% etc.
889 \& ;\e[...]
890 .Ve
891 .PP
892 Due to this bug fix [perl #75904], functions
893 using the \f(CW\*(C`(*)\*(C'\fR, \f(CW\*(C`(;$)\*(C'\fR and \f(CW\*(C`(;*)\*(C'\fR prototypes
894 are parsed with higher precedence than before. So
895 in the following example:
896 .PP
897 .Vb 2
898 \& sub foo(;$);
899 \& foo $a < $b;
900 .Ve
901 .PP
902 the second line is now parsed correctly as \f(CW\*(C`foo($a) < $b\*(C'\fR, rather than
903 \&\f(CW\*(C`foo($a < $b)\*(C'\fR. This happens when one of these operators is used in
904 an unparenthesised argument:
905 .PP
906 .Vb 10
907 \& < > <= >= lt gt le ge
908 \& == != <=> eq ne cmp ~~
909 \& &
910 \& | ^
911 \& &&
912 \& || //
913 \& .. ...
914 \& ?:
915 \& = += \-= *= etc.
916 \& , =>
917 .Ve
918 .PP
919 \fISmart-matching against array slices\fR
920 .IX Subsection "Smart-matching against array slices"
921 .PP
922 Previously, the following code resulted in a successful match:
923 .PP
924 .Vb 3
925 \& my @a = qw(a y0 z);
926 \& my @b = qw(a x0 z);
927 \& @a[0 .. $#b] ~~ @b;
928 .Ve
929 .PP
930 This odd behaviour has now been fixed [perl #77468].
931 .PP
932 \fINegation treats strings differently from before\fR
933 .IX Subsection "Negation treats strings differently from before"
934 .PP
935 The unary negation operator, \f(CW\*(C`\-\*(C'\fR, now treats strings that look like numbers
936 as numbers [perl #57706].
937 .PP
938 \fINegative zero\fR
939 .IX Subsection "Negative zero"
940 .PP
941 Negative zero (\-0.0), when converted to a string, now becomes "0" on all
942 platforms. It used to become "\-0" on some, but "0" on others.
943 .PP
944 If you still need to determine whether a zero is negative, use
945 \&\f(CW\*(C`sprintf("%g", $zero) =~ /^\-/\*(C'\fR or the Data::Float module on CPAN.
946 .PP
947 \fR\f(CI\*(C`:=\*(C'\fR\fI is now a syntax error\fR
948 .IX Subsection ":= is now a syntax error"
949 .PP
950 Previously \f(CW\*(C`my $pi := 4\*(C'\fR was exactly equivalent to \f(CW\*(C`my $pi : = 4\*(C'\fR,
951 with the \f(CW\*(C`:\*(C'\fR being treated as the start of an attribute list, ending before
952 the \f(CW\*(C`=\*(C'\fR. The use of \f(CW\*(C`:=\*(C'\fR to mean \f(CW\*(C`: =\*(C'\fR was deprecated in 5.12.0, and is
953 now a syntax error. This allows future use of \f(CW\*(C`:=\*(C'\fR as a new token.
954 .PP
955 Outside the core's tests for it, we find no Perl 5 code on CPAN
956 using this construction, so we believe that this change will have
957 little impact on real-world codebases.
958 .PP
959 If it is absolutely necessary to have empty attribute lists (for example,
960 because of a code generator), simply avoid the error by adding a space before
961 the \f(CW\*(C`=\*(C'\fR.
962 .PP
963 \fIChange in the parsing of identifiers\fR
964 .IX Subsection "Change in the parsing of identifiers"
965 .PP
966 Characters outside the Unicode "XIDStart" set are no longer allowed at the
967 beginning of an identifier. This means that certain accents and marks
968 that normally follow an alphabetic character may no longer be the first
969 character of an identifier.
970 .SS "Threads and Processes"
971 .IX Subsection "Threads and Processes"
972 \fIDirectory handles not copied to threads\fR
973 .IX Subsection "Directory handles not copied to threads"
974 .PP
975 On systems other than Windows that do not have
976 a \f(CW\*(C`fchdir\*(C'\fR function, newly-created threads no
977 longer inherit directory handles from their parent threads. Such programs
978 would usually have crashed anyway [perl #75154].
979 .PP
980 \fR\f(CI\*(C`close\*(C'\fR\fI on shared pipes\fR
981 .IX Subsection "close on shared pipes"
982 .PP
983 To avoid deadlocks, the \f(CW\*(C`close\*(C'\fR function no longer waits for the
984 child process to exit if the underlying file descriptor is still
985 in use by another thread. It returns true in such cases.
986 .PP
987 \fR\f(BIfork()\fR\fI emulation will not wait for signalled children\fR
988 .IX Subsection "fork() emulation will not wait for signalled children"
989 .PP
990 On Windows parent processes would not terminate until all forked
991 children had terminated first. However, \f(CW\*(C`kill("KILL", ...)\*(C'\fR is
992 inherently unstable on pseudo-processes, and \f(CW\*(C`kill("TERM", ...)\*(C'\fR
993 might not get delivered if the child is blocked in a system call.
994 .PP
995 To avoid the deadlock and still provide a safe mechanism to terminate
996 the hosting process, Perl now no longer waits for children that
997 have been sent a SIGTERM signal. It is up to the parent process to
998 \&\fBwaitpid()\fR for these children if child-cleanup processing must be
999 allowed to finish. However, it is also then the responsibility of the
1000 parent to avoid the deadlock by making sure the child process
1001 can't be blocked on I/O.
1002 .PP
1003 See perlfork for more information about the \fBfork()\fR emulation on
1004 Windows.
1005 .SS Configuration
1006 .IX Subsection "Configuration"
1007 \fINaming fixes in Policy_sh.SH may invalidate Policy.sh\fR
1008 .IX Subsection "Naming fixes in Policy_sh.SH may invalidate Policy.sh"
1009 .PP
1010 Several long-standing typos and naming confusions in \fIPolicy_sh.SH\fR have
1011 been fixed, standardizing on the variable names used in \fIconfig.sh\fR.
1012 .PP
1013 This will change the behaviour of \fIPolicy.sh\fR if you happen to have been
1014 accidentally relying on its incorrect behaviour.
1015 .PP
1016 \fIPerl source code is read in text mode on Windows\fR
1017 .IX Subsection "Perl source code is read in text mode on Windows"
1018 .PP
1019 Perl scripts used to be read in binary mode on Windows for the benefit
1020 of the ByteLoader module (which is no longer part of core Perl). This
1021 had the side-effect of breaking various operations on the \f(CW\*(C`DATA\*(C'\fR filehandle,
1022 including \fBseek()\fR/\fBtell()\fR, and even simply reading from \f(CW\*(C`DATA\*(C'\fR after filehandles
1023 have been flushed by a call to \fBsystem()\fR, backticks, \fBfork()\fR etc.
1024 .PP
1025 The default build options for Windows have been changed to read Perl source
1026 code on Windows in text mode now. ByteLoader will (hopefully) be updated on
1027 CPAN to automatically handle this situation [perl #28106].
1028 .SH Deprecations
1029 .IX Header "Deprecations"
1030 See also "Deprecated C APIs".
1031 .SS "Omitting a space between a regular expression and subsequent word"
1032 .IX Subsection "Omitting a space between a regular expression and subsequent word"
1033 Omitting the space between a regular expression operator or
1034 its modifiers and the following word is deprecated. For
1035 example, \f(CW\*(C`m/foo/sand $bar\*(C'\fR is for now still parsed
1036 as \f(CW\*(C`m/foo/s and $bar\*(C'\fR, but will now issue a warning.
1037 .ie n .SS """\ec\fIX\fP"""
1038 .el .SS \f(CW\ec\fP\f(CIX\fP\f(CW\fP
1039 .IX Subsection "cX"
1040 The backslash-c construct was designed as a way of specifying
1041 non-printable characters, but there were no restrictions (on ASCII
1042 platforms) on what the character following the \f(CW\*(C`c\*(C'\fR could be. Now,
1043 a deprecation warning is raised if that character isn't an ASCII character.
1044 Also, a deprecation warning is raised for \f(CW"\ec{"\fR (which is the same
1045 as simply saying \f(CW";"\fR).
1046 .ie n .SS """\eb{"" and ""\eB{"""
1047 .el .SS "\f(CW""\eb{""\fP and \f(CW""\eB{""\fP"
1048 .IX Subsection """b{"" and ""B{"""
1049 In regular expressions, a literal \f(CW"{"\fR immediately following a \f(CW"\eb"\fR
1050 (not in a bracketed character class) or a \f(CW"\eB{"\fR is now deprecated
1051 to allow for its future use by Perl itself.
1052 .SS "Perl 4\-era .pl libraries"
1053 .IX Subsection "Perl 4-era .pl libraries"
1054 Perl bundles a handful of library files that predate Perl 5.
1055 This bundling is now deprecated for most of these files, which are now
1056 available from CPAN. The affected files now warn when run, if they were
1057 installed as part of the core.
1058 .PP
1059 This is a mandatory warning, not obeying \fB\-X\fR or lexical warning bits.
1060 The warning is modelled on that supplied by \fIdeprecate.pm\fR for
1061 deprecated-in-core \fI.pm\fR libraries. It points to the specific CPAN
1062 distribution that contains the \fI.pl\fR libraries. The CPAN versions, of
1063 course, do not generate the warning.
1064 .ie n .SS "List assignment to $["
1065 .el .SS "List assignment to \f(CW$[\fP"
1066 .IX Subsection "List assignment to $["
1067 Assignment to \f(CW$[\fR was deprecated and started to give warnings in
1068 Perl version 5.12.0. This version of Perl (5.14) now also emits a warning
1069 when assigning to \f(CW$[\fR in list context. This fixes an oversight in 5.12.0.
1070 .SS "Use of qw(...) as parentheses"
1071 .IX Subsection "Use of qw(...) as parentheses"
1072 Historically the parser fooled itself into thinking that \f(CWqw(...)\fR literals
1073 were always enclosed in parentheses, and as a result you could sometimes omit
1074 parentheses around them:
1075 .PP
1076 .Vb 1
1077 \& for $x qw(a b c) { ... }
1078 .Ve
1079 .PP
1080 The parser no longer lies to itself in this way. Wrap the list literal in
1081 parentheses like this:
1082 .PP
1083 .Vb 1
1084 \& for $x (qw(a b c)) { ... }
1085 .Ve
1086 .PP
1087 This is being deprecated because the parentheses in \f(CW\*(C`for $i (1,2,3) { ... }\*(C'\fR
1088 are not part of expression syntax. They are part of the statement
1089 syntax, with the \f(CW\*(C`for\*(C'\fR statement wanting literal parentheses.
1090 The synthetic parentheses that a \f(CW\*(C`qw\*(C'\fR expression acquired were only
1091 intended to be treated as part of expression syntax.
1092 .PP
1093 Note that this does not change the behaviour of cases like:
1094 .PP
1095 .Vb 2
1096 \& use POSIX qw(setlocale localeconv);
1097 \& our @EXPORT = qw(foo bar baz);
1098 .Ve
1099 .PP
1100 where parentheses were never required around the expression.
1101 .ie n .SS """\eN{BELL}"""
1102 .el .SS \f(CW\eN{BELL}\fP
1103 .IX Subsection "N{BELL}"
1104 This is because Unicode is using that name for a different character.
1105 See "Unicode Version 6.0 is now supported (mostly)" for more
1106 explanation.
1107 .ie n .SS """?PATTERN?"""
1108 .el .SS \f(CW?PATTERN?\fP
1109 .IX Subsection "?PATTERN?"
1110 \&\f(CW\*(C`?PATTERN?\*(C'\fR (without the initial \f(CW\*(C`m\*(C'\fR) has been deprecated and now produces
1111 a warning. This is to allow future use of \f(CW\*(C`?\*(C'\fR in new operators.
1112 The match-once functionality is still available as \f(CW\*(C`m?PATTERN?\*(C'\fR.
1113 .SS "Tie functions on scalars holding typeglobs"
1114 .IX Subsection "Tie functions on scalars holding typeglobs"
1115 Calling a tie function (\f(CW\*(C`tie\*(C'\fR, \f(CW\*(C`tied\*(C'\fR, \f(CW\*(C`untie\*(C'\fR) with a scalar argument
1116 acts on a filehandle if the scalar happens to hold a typeglob.
1117 .PP
1118 This is a long-standing bug that will be removed in Perl 5.16, as
1119 there is currently no way to tie the scalar itself when it holds
1120 a typeglob, and no way to untie a scalar that has had a typeglob
1121 assigned to it.
1122 .PP
1123 Now there is a deprecation warning whenever a tie
1124 function is used on a handle without an explicit \f(CW\*(C`*\*(C'\fR.
1125 .SS "User-defined case-mapping"
1126 .IX Subsection "User-defined case-mapping"
1127 This feature is being deprecated due to its many issues, as documented in
1128 "User-Defined Case Mappings (for serious hackers only)" in perlunicode.
1129 This feature will be removed in Perl 5.16. Instead use the CPAN module
1130 Unicode::Casing, which provides improved functionality.
1131 .SS "Deprecated modules"
1132 .IX Subsection "Deprecated modules"
1133 The following module will be removed from the core distribution in a
1134 future release, and should be installed from CPAN instead. Distributions
1135 on CPAN that require this should add it to their prerequisites. The
1136 core version of these module now issues a deprecation warning.
1137 .PP
1138 If you ship a packaged version of Perl, either alone or as part of a
1139 larger system, then you should carefully consider the repercussions of
1140 core module deprecations. You may want to consider shipping your default
1141 build of Perl with a package for the deprecated module that
1142 installs into \f(CW\*(C`vendor\*(C'\fR or \f(CW\*(C`site\*(C'\fR Perl library directories. This will
1143 inhibit the deprecation warnings.
1144 .PP
1145 Alternatively, you may want to consider patching \fIlib/deprecate.pm\fR
1146 to provide deprecation warnings specific to your packaging system
1147 or distribution of Perl, consistent with how your packaging system
1148 or distribution manages a staged transition from a release where the
1149 installation of a single package provides the given functionality, to
1150 a later release where the system administrator needs to know to install
1151 multiple packages to get that same functionality.
1152 .PP
1153 You can silence these deprecation warnings by installing the module
1154 in question from CPAN. To install the latest version of it by role
1155 rather than by name, just install \f(CW\*(C`Task::Deprecations::5_14\*(C'\fR.
1156 .IP Devel::DProf 4
1157 .IX Item "Devel::DProf"
1158 We strongly recommend that you install and use Devel::NYTProf instead
1159 of Devel::DProf, as Devel::NYTProf offers significantly
1160 improved profiling and reporting.
1161 .SH "Performance Enhancements"
1162 .IX Header "Performance Enhancements"
1163 .SS """Safe signals"" optimisation"
1164 .IX Subsection """Safe signals"" optimisation"
1165 Signal dispatch has been moved from the runloop into control ops.
1166 This should give a few percent speed increase, and eliminates nearly
1167 all the speed penalty caused by the introduction of "safe signals"
1168 in 5.8.0. Signals should still be dispatched within the same
1169 statement as they were previously. If this does \fInot\fR happen, or
1170 if you find it possible to create uninterruptible loops, this is a
1171 bug, and reports are encouraged of how to recreate such issues.
1172 .SS "Optimisation of \fBshift()\fP and \fBpop()\fP calls without arguments"
1173 .IX Subsection "Optimisation of shift() and pop() calls without arguments"
1174 Two fewer OPs are used for \fBshift()\fR and \fBpop()\fR calls with no argument (with
1175 implicit \f(CW@_\fR). This change makes \fBshift()\fR 5% faster than \f(CW\*(C`shift @_\*(C'\fR
1176 on non-threaded perls, and 25% faster on threaded ones.
1177 .SS "Optimisation of regexp engine string comparison work"
1178 .IX Subsection "Optimisation of regexp engine string comparison work"
1179 The \f(CW\*(C`foldEQ_utf8\*(C'\fR API function for case-insensitive comparison of strings (which
1180 is used heavily by the regexp engine) was substantially refactored and
1181 optimised \-\- and its documentation much improved as a free bonus.
1182 .SS "Regular expression compilation speed-up"
1183 .IX Subsection "Regular expression compilation speed-up"
1184 Compiling regular expressions has been made faster when upgrading
1185 the regex to utf8 is necessary but this isn't known when the compilation begins.
1186 .SS "String appending is 100 times faster"
1187 .IX Subsection "String appending is 100 times faster"
1188 When doing a lot of string appending, perls built to use the system's
1189 \&\f(CW\*(C`malloc\*(C'\fR could end up allocating a lot more memory than needed in a
1190 inefficient way.
1191 .PP
1192 \&\f(CW\*(C`sv_grow\*(C'\fR, the function used to allocate more memory if necessary
1193 when appending to a string, has been taught to round up the memory
1194 it requests to a certain geometric progression, making it much faster on
1195 certain platforms and configurations. On Win32, it's now about 100 times
1196 faster.
1197 .ie n .SS "Eliminate ""PL_*"" accessor functions under ithreads"
1198 .el .SS "Eliminate \f(CWPL_*\fP accessor functions under ithreads"
1199 .IX Subsection "Eliminate PL_* accessor functions under ithreads"
1200 When \f(CW\*(C`MULTIPLICITY\*(C'\fR was first developed, and interpreter state moved into
1201 an interpreter struct, thread\- and interpreter-local \f(CW\*(C`PL_*\*(C'\fR variables
1202 were defined as macros that called accessor functions (returning the
1203 address of the value) outside the Perl core. The intent was to allow
1204 members within the interpreter struct to change size without breaking
1205 binary compatibility, so that bug fixes could be merged to a maintenance
1206 branch that necessitated such a size change. This mechanism was redundant
1207 and penalised well-behaved code. It has been removed.
1208 .SS "Freeing weak references"
1209 .IX Subsection "Freeing weak references"
1210 When there are many weak references to an object, freeing that object
1211 can under some circumstances take O(\fIN*N\fR) time to free, where
1212 \&\fIN\fR is the number of references. The circumstances in which this can happen
1213 have been reduced [perl #75254]
1214 .SS "Lexical array and hash assignments"
1215 .IX Subsection "Lexical array and hash assignments"
1216 An earlier optimisation to speed up \f(CW\*(C`my @array = ...\*(C'\fR and
1217 \&\f(CW\*(C`my %hash = ...\*(C'\fR assignments caused a bug and was disabled in Perl 5.12.0.
1218 .PP
1219 Now we have found another way to speed up these assignments [perl #82110].
1220 .ie n .SS "@_ uses less memory"
1221 .el .SS "\f(CW@_\fP uses less memory"
1222 .IX Subsection "@_ uses less memory"
1223 Previously, \f(CW@_\fR was allocated for every subroutine at compile time with
1224 enough space for four entries. Now this allocation is done on demand when
1225 the subroutine is called [perl #72416].
1226 .SS "Size optimisations to SV and HV structures"
1227 .IX Subsection "Size optimisations to SV and HV structures"
1228 \&\f(CW\*(C`xhv_fill\*(C'\fR has been eliminated from \f(CW\*(C`struct xpvhv\*(C'\fR, saving 1 IV per hash and
1229 on some systems will cause \f(CW\*(C`struct xpvhv\*(C'\fR to become cache-aligned. To avoid
1230 this memory saving causing a slowdown elsewhere, boolean use of \f(CW\*(C`HvFILL\*(C'\fR
1231 now calls \f(CW\*(C`HvTOTALKEYS\*(C'\fR instead (which is equivalent), so while the fill
1232 data when actually required are now calculated on demand, cases when
1233 this needs to be done should be rare.
1234 .PP
1235 The order of structure elements in SV bodies has changed. Effectively,
1236 the NV slot has swapped location with STASH and MAGIC. As all access to
1237 SV members is via macros, this should be completely transparent. This
1238 change allows the space saving for PVHVs documented above, and may reduce
1239 the memory allocation needed for PVIVs on some architectures.
1240 .PP
1241 \&\f(CW\*(C`XPV\*(C'\fR, \f(CW\*(C`XPVIV\*(C'\fR, and \f(CW\*(C`XPVNV\*(C'\fR now allocate only the parts of the \f(CW\*(C`SV\*(C'\fR body
1242 they actually use, saving some space.
1243 .PP
1244 Scalars containing regular expressions now allocate only the part of the \f(CW\*(C`SV\*(C'\fR
1245 body they actually use, saving some space.
1246 .SS "Memory consumption improvements to Exporter"
1247 .IX Subsection "Memory consumption improvements to Exporter"
1248 The \f(CW@EXPORT_FAIL\fR AV is no longer created unless needed, hence neither is
1249 the typeglob backing it. This saves about 200 bytes for every package that
1250 uses Exporter but doesn't use this functionality.
1251 .SS "Memory savings for weak references"
1252 .IX Subsection "Memory savings for weak references"
1253 For weak references, the common case of just a single weak reference
1254 per referent has been optimised to reduce the storage required. In this
1255 case it saves the equivalent of one small Perl array per referent.
1256 .ie n .SS """%+"" and ""%\-"" use less memory"
1257 .el .SS "\f(CW%+\fP and \f(CW%\-\fP use less memory"
1258 .IX Subsection "%+ and %- use less memory"
1259 The bulk of the \f(CW\*(C`Tie::Hash::NamedCapture\*(C'\fR module used to be in the Perl
1260 core. It has now been moved to an XS module to reduce overhead for
1261 programs that do not use \f(CW\*(C`%+\*(C'\fR or \f(CW\*(C`%\-\*(C'\fR.
1262 .SS "Multiple small improvements to threads"
1263 .IX Subsection "Multiple small improvements to threads"
1264 The internal structures of threading now make fewer API calls and fewer
1265 allocations, resulting in noticeably smaller object code. Additionally,
1266 many thread context checks have been deferred so they're done only
1267 as needed (although this is only possible for non-debugging builds).
1268 .SS "Adjacent pairs of nextstate opcodes are now optimized away"
1269 .IX Subsection "Adjacent pairs of nextstate opcodes are now optimized away"
1270 Previously, in code such as
1271 .PP
1272 .Vb 1
1273 \& use constant DEBUG => 0;
1274 \&
1275 \& sub GAK {
1276 \& warn if DEBUG;
1277 \& print "stuff\en";
1278 \& }
1279 .Ve
1280 .PP
1281 the ops for \f(CW\*(C`warn if DEBUG\*(C'\fR would be folded to a \f(CW\*(C`null\*(C'\fR op (\f(CW\*(C`ex\-const\*(C'\fR), but
1282 the \f(CW\*(C`nextstate\*(C'\fR op would remain, resulting in a runtime op dispatch of
1283 \&\f(CW\*(C`nextstate\*(C'\fR, \f(CW\*(C`nextstate\*(C'\fR, etc.
1284 .PP
1285 The execution of a sequence of \f(CW\*(C`nextstate\*(C'\fR ops is indistinguishable from just
1286 the last \f(CW\*(C`nextstate\*(C'\fR op so the peephole optimizer now eliminates the first of
1287 a pair of \f(CW\*(C`nextstate\*(C'\fR ops except when the first carries a label, since labels
1288 must not be eliminated by the optimizer, and label usage isn't conclusively known
1289 at compile time.
1290 .SH "Modules and Pragmata"
1291 .IX Header "Modules and Pragmata"
1292 .SS "New Modules and Pragmata"
1293 .IX Subsection "New Modules and Pragmata"
1294 .IP \(bu 4
1295 CPAN::Meta::YAML 0.003 has been added as a dual-life module. It supports a
1296 subset of YAML sufficient for reading and writing \fIMETA.yml\fR and \fIMYMETA.yml\fR files
1297 included with CPAN distributions or generated by the module installation
1298 toolchain. It should not be used for any other general YAML parsing or
1299 generation task.
1300 .IP \(bu 4
1301 CPAN::Meta version 2.110440 has been added as a dual-life module. It
1302 provides a standard library to read, interpret and write CPAN distribution
1303 metadata files (like \fIMETA.json\fR and \fIMETA.yml\fR) that describe a
1304 distribution, its contents, and the requirements for building it and
1305 installing it. The latest CPAN distribution metadata specification is
1306 included as CPAN::Meta::Spec and notes on changes in the specification
1307 over time are given in CPAN::Meta::History.
1308 .IP \(bu 4
1309 HTTP::Tiny 0.012 has been added as a dual-life module. It is a very
1310 small, simple HTTP/1.1 client designed for simple GET requests and file
1311 mirroring. It has been added so that \fICPAN.pm\fR and CPANPLUS can
1312 "bootstrap" HTTP access to CPAN using pure Perl without relying on external
1313 binaries like \fBcurl\fR\|(1) or \fBwget\fR\|(1).
1314 .IP \(bu 4
1315 JSON::PP 2.27105 has been added as a dual-life module to allow CPAN
1316 clients to read \fIMETA.json\fR files in CPAN distributions.
1317 .IP \(bu 4
1318 Module::Metadata 1.000004 has been added as a dual-life module. It gathers
1319 package and POD information from Perl module files. It is a standalone module
1320 based on Module::Build::ModuleInfo for use by other module installation
1321 toolchain components. Module::Build::ModuleInfo has been deprecated in
1322 favor of this module instead.
1323 .IP \(bu 4
1324 Perl::OSType 1.002 has been added as a dual-life module. It maps Perl
1325 operating system names (like "dragonfly" or "MSWin32") to more generic types
1326 with standardized names (like "Unix" or "Windows"). It has been refactored
1327 out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into
1328 a single location for easier maintenance.
1329 .IP \(bu 4
1330 The following modules were added by the Unicode::Collate
1331 upgrade. See below for details.
1332 .Sp
1333 Unicode::Collate::CJK::Big5
1334 .Sp
1335 Unicode::Collate::CJK::GB2312
1336 .Sp
1337 Unicode::Collate::CJK::JISX0208
1338 .Sp
1339 Unicode::Collate::CJK::Korean
1340 .Sp
1341 Unicode::Collate::CJK::Pinyin
1342 .Sp
1343 Unicode::Collate::CJK::Stroke
1344 .IP \(bu 4
1345 Version::Requirements version 0.101020 has been added as a dual-life
1346 module. It provides a standard library to model and manipulates module
1347 prerequisites and version constraints defined in CPAN::Meta::Spec.
1348 .SS "Updated Modules and Pragma"
1349 .IX Subsection "Updated Modules and Pragma"
1350 .IP \(bu 4
1351 attributes has been upgraded from version 0.12 to 0.14.
1352 .IP \(bu 4
1353 Archive::Extract has been upgraded from version 0.38 to 0.48.
1354 .Sp
1355 Updates since 0.38 include: a safe print method that guards
1356 Archive::Extract from changes to \f(CW\*(C`$\e\*(C'\fR; a fix to the tests when run in core
1357 Perl; support for TZ files; a modification for the lzma
1358 logic to favour IO::Uncompress::Unlzma; and a fix
1359 for an issue with NetBSD-current and its new \fBunzip\fR\|(1)
1360 executable.
1361 .IP \(bu 4
1362 Archive::Tar has been upgraded from version 1.54 to 1.76.
1363 .Sp
1364 Important changes since 1.54 include the following:
1365 .RS 4
1366 .IP \(bu 4
1367 Compatibility with busybox implementations of \fBtar\fR\|(1).
1368 .IP \(bu 4
1369 A fix so that \fBwrite()\fR and \fBcreate_archive()\fR
1370 close only filehandles they themselves opened.
1371 .IP \(bu 4
1372 A bug was fixed regarding the exit code of extract_archive.
1373 .IP \(bu 4
1374 The \fBptar\fR\|(1) utility has a new option to allow safe creation of
1375 tarballs without world-writable files on Windows, allowing those
1376 archives to be uploaded to CPAN.
1377 .IP \(bu 4
1378 A new \fBptargrep\fR\|(1) utility for using regular expressions against
1379 the contents of files in a tar archive.
1380 .IP \(bu 4
1381 pax extended headers are now skipped.
1382 .RE
1383 .RS 4
1384 .RE
1385 .IP \(bu 4
1386 Attribute::Handlers has been upgraded from version 0.87 to 0.89.
1387 .IP \(bu 4
1388 autodie has been upgraded from version 2.06_01 to 2.1001.
1389 .IP \(bu 4
1390 AutoLoader has been upgraded from version 5.70 to 5.71.
1391 .IP \(bu 4
1392 The B module has been upgraded from version 1.23 to 1.29.
1393 .Sp
1394 It no longer crashes when taking apart a \f(CW\*(C`y///\*(C'\fR containing characters
1395 outside the octet range or compiled in a \f(CW\*(C`use utf8\*(C'\fR scope.
1396 .Sp
1397 The size of the shared object has been reduced by about 40%, with no
1398 reduction in functionality.
1399 .IP \(bu 4
1400 B::Concise has been upgraded from version 0.78 to 0.83.
1401 .Sp
1402 B::Concise marks \fBrv2sv()\fR, \fBrv2av()\fR, and \fBrv2hv()\fR ops with the new
1403 \&\f(CW\*(C`OPpDEREF\*(C'\fR flag as "DREFed".
1404 .Sp
1405 It no longer produces mangled output with the \fB\-tree\fR option
1406 [perl #80632].
1407 .IP \(bu 4
1408 B::Debug has been upgraded from version 1.12 to 1.16.
1409 .IP \(bu 4
1410 B::Deparse has been upgraded from version 0.96 to 1.03.
1411 .Sp
1412 The deparsing of a \f(CW\*(C`nextstate\*(C'\fR op has changed when it has both a
1413 change of package relative to the previous nextstate, or a change of
1414 \&\f(CW\*(C`%^H\*(C'\fR or other state and a label. The label was previously emitted
1415 first, but is now emitted last (5.12.1).
1416 .Sp
1417 The \f(CW\*(C`no 5.13.2\*(C'\fR or similar form is now correctly handled by B::Deparse
1418 (5.12.3).
1419 .Sp
1420 B::Deparse now properly handles the code that applies a conditional
1421 pattern match against implicit \f(CW$_\fR as it was fixed in [perl #20444].
1422 .Sp
1423 Deparsing of \f(CW\*(C`our\*(C'\fR followed by a variable with funny characters
1424 (as permitted under the \f(CW\*(C`use utf8\*(C'\fR pragma) has also been fixed [perl #33752].
1425 .IP \(bu 4
1426 B::Lint has been upgraded from version 1.11_01 to 1.13.
1427 .IP \(bu 4
1428 base has been upgraded from version 2.15 to 2.16.
1429 .IP \(bu 4
1430 Benchmark has been upgraded from version 1.11 to 1.12.
1431 .IP \(bu 4
1432 bignum has been upgraded from version 0.23 to 0.27.
1433 .IP \(bu 4
1434 Carp has been upgraded from version 1.15 to 1.20.
1435 .Sp
1436 Carp now detects incomplete \fBcaller()\fR
1437 overrides and avoids using bogus \f(CW@DB::args\fR. To provide backtraces,
1438 Carp relies on particular behaviour of the \fBcaller()\fR builtin.
1439 Carp now detects if other code has overridden this with an
1440 incomplete implementation, and modifies its backtrace accordingly.
1441 Previously incomplete overrides would cause incorrect values in
1442 backtraces (best case), or obscure fatal errors (worst case).
1443 .Sp
1444 This fixes certain cases of "Bizarre copy of ARRAY" caused by modules
1445 overriding \fBcaller()\fR incorrectly (5.12.2).
1446 .Sp
1447 It now also avoids using regular expressions that cause Perl to
1448 load its Unicode tables, so as to avoid the "BEGIN not safe after
1449 errors" error that ensue if there has been a syntax error
1450 [perl #82854].
1451 .IP \(bu 4
1452 CGI has been upgraded from version 3.48 to 3.52.
1453 .Sp
1454 This provides the following security fixes: the MIME boundary in
1455 \&\fBmultipart_init()\fR is now random and the handling of
1456 newlines embedded in header values has been improved.
1457 .IP \(bu 4
1458 Compress::Raw::Bzip2 has been upgraded from version 2.024 to 2.033.
1459 .Sp
1460 It has been updated to use \fBbzip2\fR\|(1) 1.0.6.
1461 .IP \(bu 4
1462 Compress::Raw::Zlib has been upgraded from version 2.024 to 2.033.
1463 .IP \(bu 4
1464 constant has been upgraded from version 1.20 to 1.21.
1465 .Sp
1466 Unicode constants work once more. They have been broken since Perl 5.10.0
1467 [CPAN RT #67525].
1468 .IP \(bu 4
1469 CPAN has been upgraded from version 1.94_56 to 1.9600.
1470 .Sp
1471 Major highlights:
1472 .RS 4
1473 .IP \(bu 4
1474 much less configuration dialog hassle
1475 .IP \(bu 4
1476 support for \fIMETA/MYMETA.json\fR
1477 .IP \(bu 4
1478 support for local::lib
1479 .IP \(bu 4
1480 support for HTTP::Tiny to reduce the dependency on FTP sites
1481 .IP \(bu 4
1482 automatic mirror selection
1483 .IP \(bu 4
1484 iron out all known bugs in configure_requires
1485 .IP \(bu 4
1486 support for distributions compressed with \fBbzip2\fR\|(1)
1487 .IP \(bu 4
1488 allow \fIFoo/Bar.pm\fR on the command line to mean \f(CW\*(C`Foo::Bar\*(C'\fR
1489 .RE
1490 .RS 4
1491 .RE
1492 .IP \(bu 4
1493 CPANPLUS has been upgraded from version 0.90 to 0.9103.
1494 .Sp
1495 A change to \fIcpanp-run-perl\fR
1496 resolves RT #55964 <http://rt.cpan.org/Public/Bug/Display.html?id=55964>
1497 and RT #57106 <http://rt.cpan.org/Public/Bug/Display.html?id=57106>, both
1498 of which related to failures to install distributions that use
1499 \&\f(CW\*(C`Module::Install::DSL\*(C'\fR (5.12.2).
1500 .Sp
1501 A dependency on Config was not recognised as a
1502 core module dependency. This has been fixed.
1503 .Sp
1504 CPANPLUS now includes support for \fIMETA.json\fR and \fIMYMETA.json\fR.
1505 .IP \(bu 4
1506 CPANPLUS::Dist::Build has been upgraded from version 0.46 to 0.54.
1507 .IP \(bu 4
1508 Data::Dumper has been upgraded from version 2.125 to 2.130_02.
1509 .Sp
1510 The indentation used to be off when \f(CW$Data::Dumper::Terse\fR was set. This
1511 has been fixed [perl #73604].
1512 .Sp
1513 This upgrade also fixes a crash when using custom sort functions that might
1514 cause the stack to change [perl #74170].
1515 .Sp
1516 Dumpxs no longer crashes with globs returned by \f(CW*$io_ref\fR
1517 [perl #72332].
1518 .IP \(bu 4
1519 DB_File has been upgraded from version 1.820 to 1.821.
1520 .IP \(bu 4
1521 DBM_Filter has been upgraded from version 0.03 to 0.04.
1522 .IP \(bu 4
1523 Devel::DProf has been upgraded from version 20080331.00 to 20110228.00.
1524 .Sp
1525 Merely loading Devel::DProf now no longer triggers profiling to start.
1526 Both \f(CW\*(C`use Devel::DProf\*(C'\fR and \f(CW\*(C`perl \-d:DProf ...\*(C'\fR behave as before and start
1527 the profiler.
1528 .Sp
1529 \&\fBNOTE\fR: Devel::DProf is deprecated and will be removed from a future
1530 version of Perl. We strongly recommend that you install and use
1531 Devel::NYTProf instead, as it offers significantly improved
1532 profiling and reporting.
1533 .IP \(bu 4
1534 Devel::Peek has been upgraded from version 1.04 to 1.07.
1535 .IP \(bu 4
1536 Devel::SelfStubber has been upgraded from version 1.03 to 1.05.
1537 .IP \(bu 4
1538 diagnostics has been upgraded from version 1.19 to 1.22.
1539 .Sp
1540 It now renders pod links slightly better, and has been taught to find
1541 descriptions for messages that share their descriptions with other
1542 messages.
1543 .IP \(bu 4
1544 Digest::MD5 has been upgraded from version 2.39 to 2.51.
1545 .Sp
1546 It is now safe to use this module in combination with threads.
1547 .IP \(bu 4
1548 Digest::SHA has been upgraded from version 5.47 to 5.61.
1549 .Sp
1550 \&\f(CW\*(C`shasum\*(C'\fR now more closely mimics \fBsha1sum\fR\|(1)/\fBmd5sum\fR\|(1).
1551 .Sp
1552 \&\f(CW\*(C`addfile\*(C'\fR accepts all POSIX filenames.
1553 .Sp
1554 New SHA\-512/224 and SHA\-512/256 transforms (ref. NIST Draft FIPS 180\-4
1555 [February 2011])
1556 .IP \(bu 4
1557 DirHandle has been upgraded from version 1.03 to 1.04.
1558 .IP \(bu 4
1559 Dumpvalue has been upgraded from version 1.13 to 1.16.
1560 .IP \(bu 4
1561 DynaLoader has been upgraded from version 1.10 to 1.13.
1562 .Sp
1563 It fixes a buffer overflow when passed a very long file name.
1564 .Sp
1565 It no longer inherits from AutoLoader; hence it no longer
1566 produces weird error messages for unsuccessful method calls on classes that
1567 inherit from DynaLoader [perl #84358].
1568 .IP \(bu 4
1569 Encode has been upgraded from version 2.39 to 2.42.
1570 .Sp
1571 Now, all 66 Unicode non-characters are treated the same way U+FFFF has
1572 always been treated: in cases when it was disallowed, all 66 are
1573 disallowed, and in cases where it warned, all 66 warn.
1574 .IP \(bu 4
1575 Env has been upgraded from version 1.01 to 1.02.
1576 .IP \(bu 4
1577 Errno has been upgraded from version 1.11 to 1.13.
1578 .Sp
1579 The implementation of Errno has been refactored to use about 55% less memory.
1580 .Sp
1581 On some platforms with unusual header files, like Win32 \fBgcc\fR\|(1) using \f(CW\*(C`mingw64\*(C'\fR
1582 headers, some constants that weren't actually error numbers have been exposed
1583 by Errno. This has been fixed [perl #77416].
1584 .IP \(bu 4
1585 Exporter has been upgraded from version 5.64_01 to 5.64_03.
1586 .Sp
1587 Exporter no longer overrides \f(CW$SIG{_\|_WARN_\|_}\fR [perl #74472]
1588 .IP \(bu 4
1589 ExtUtils::CBuilder has been upgraded from version 0.27 to 0.280203.
1590 .IP \(bu 4
1591 ExtUtils::Command has been upgraded from version 1.16 to 1.17.
1592 .IP \(bu 4
1593 ExtUtils::Constant has been upgraded from 0.22 to 0.23.
1594 .Sp
1595 The AUTOLOAD helper code generated by \f(CW\*(C`ExtUtils::Constant::ProxySubs\*(C'\fR
1596 can now \fBcroak()\fR for missing constants, or generate a complete \f(CW\*(C`AUTOLOAD\*(C'\fR
1597 subroutine in XS, allowing simplification of many modules that use it
1598 (Fcntl, File::Glob, GDBM_File, I18N::Langinfo, POSIX,
1599 Socket).
1600 .Sp
1601 ExtUtils::Constant::ProxySubs can now optionally push the names of all
1602 constants onto the package's \f(CW@EXPORT_OK\fR.
1603 .IP \(bu 4
1604 ExtUtils::Install has been upgraded from version 1.55 to 1.56.
1605 .IP \(bu 4
1606 ExtUtils::MakeMaker has been upgraded from version 6.56 to 6.57_05.
1607 .IP \(bu 4
1608 ExtUtils::Manifest has been upgraded from version 1.57 to 1.58.
1609 .IP \(bu 4
1610 ExtUtils::ParseXS has been upgraded from version 2.21 to 2.2210.
1611 .IP \(bu 4
1612 Fcntl has been upgraded from version 1.06 to 1.11.
1613 .IP \(bu 4
1614 File::Basename has been upgraded from version 2.78 to 2.82.
1615 .IP \(bu 4
1616 File::CheckTree has been upgraded from version 4.4 to 4.41.
1617 .IP \(bu 4
1618 File::Copy has been upgraded from version 2.17 to 2.21.
1619 .IP \(bu 4
1620 File::DosGlob has been upgraded from version 1.01 to 1.04.
1621 .Sp
1622 It allows patterns containing literal parentheses: they no longer need to
1623 be escaped. On Windows, it no longer
1624 adds an extra \fI./\fR to file names
1625 returned when the pattern is a relative glob with a drive specification,
1626 like \fIC:*.pl\fR [perl #71712].
1627 .IP \(bu 4
1628 File::Fetch has been upgraded from version 0.24 to 0.32.
1629 .Sp
1630 HTTP::Lite is now supported for the "http" scheme.
1631 .Sp
1632 The \fBfetch\fR\|(1) utility is supported on FreeBSD, NetBSD, and
1633 Dragonfly BSD for the \f(CW\*(C`http\*(C'\fR and \f(CW\*(C`ftp\*(C'\fR schemes.
1634 .IP \(bu 4
1635 File::Find has been upgraded from version 1.15 to 1.19.
1636 .Sp
1637 It improves handling of backslashes on Windows, so that paths like
1638 \&\fIC:\edir\e/file\fR are no longer generated [perl #71710].
1639 .IP \(bu 4
1640 File::Glob has been upgraded from version 1.07 to 1.12.
1641 .IP \(bu 4
1642 File::Spec has been upgraded from version 3.31 to 3.33.
1643 .Sp
1644 Several portability fixes were made in File::Spec::VMS: a colon is now
1645 recognized as a delimiter in native filespecs; caret-escaped delimiters are
1646 recognized for better handling of extended filespecs; \fBcatpath()\fR returns
1647 an empty directory rather than the current directory if the input directory
1648 name is empty; and \fBabs2rel()\fR properly handles Unix-style input (5.12.2).
1649 .IP \(bu 4
1650 File::stat has been upgraded from 1.02 to 1.05.
1651 .Sp
1652 The \f(CW\*(C`\-x\*(C'\fR and \f(CW\*(C`\-X\*(C'\fR file test operators now work correctly when run
1653 by the superuser.
1654 .IP \(bu 4
1655 Filter::Simple has been upgraded from version 0.84 to 0.86.
1656 .IP \(bu 4
1657 GDBM_File has been upgraded from 1.10 to 1.14.
1658 .Sp
1659 This fixes a memory leak when DBM filters are used.
1660 .IP \(bu 4
1661 Hash::Util has been upgraded from 0.07 to 0.11.
1662 .Sp
1663 Hash::Util no longer emits spurious "uninitialized" warnings when
1664 recursively locking hashes that have undefined values [perl #74280].
1665 .IP \(bu 4
1666 Hash::Util::FieldHash has been upgraded from version 1.04 to 1.09.
1667 .IP \(bu 4
1668 I18N::Collate has been upgraded from version 1.01 to 1.02.
1669 .IP \(bu 4
1670 I18N::Langinfo has been upgraded from version 0.03 to 0.08.
1671 .Sp
1672 \&\fBlanginfo()\fR now defaults to using \f(CW$_\fR if there is no argument given, just
1673 as the documentation has always claimed.
1674 .IP \(bu 4
1675 I18N::LangTags has been upgraded from version 0.35 to 0.35_01.
1676 .IP \(bu 4
1677 if has been upgraded from version 0.05 to 0.0601.
1678 .IP \(bu 4
1679 IO has been upgraded from version 1.25_02 to 1.25_04.
1680 .Sp
1681 This version of IO includes a new IO::Select, which now allows IO::Handle
1682 objects (and objects in derived classes) to be removed from an IO::Select set
1683 even if the underlying file descriptor is closed or invalid.
1684 .IP \(bu 4
1685 IPC::Cmd has been upgraded from version 0.54 to 0.70.
1686 .Sp
1687 Resolves an issue with splitting Win32 command lines. An argument
1688 consisting of the single character "0" used to be omitted (CPAN RT #62961).
1689 .IP \(bu 4
1690 IPC::Open3 has been upgraded from 1.05 to 1.09.
1691 .Sp
1692 \&\fBopen3()\fR now produces an error if the \f(CW\*(C`exec\*(C'\fR call fails, allowing this
1693 condition to be distinguished from a child process that exited with a
1694 non-zero status [perl #72016].
1695 .Sp
1696 The internal \fBxclose()\fR routine now knows how to handle file descriptors as
1697 documented, so duplicating \f(CW\*(C`STDIN\*(C'\fR in a child process using its file
1698 descriptor now works [perl #76474].
1699 .IP \(bu 4
1700 IPC::SysV has been upgraded from version 2.01 to 2.03.
1701 .IP \(bu 4
1702 lib has been upgraded from version 0.62 to 0.63.
1703 .IP \(bu 4
1704 Locale::Maketext has been upgraded from version 1.14 to 1.19.
1705 .Sp
1706 Locale::Maketext now supports external caches.
1707 .Sp
1708 This upgrade also fixes an infinite loop in
1709 \&\f(CWLocale::Maketext::Guts::_compile()\fR when
1710 working with tainted values (CPAN RT #40727).
1711 .Sp
1712 \&\f(CW\*(C`\->maketext\*(C'\fR calls now back up and restore \f(CW$@\fR so error
1713 messages are not suppressed (CPAN RT #34182).
1714 .IP \(bu 4
1715 Log::Message has been upgraded from version 0.02 to 0.04.
1716 .IP \(bu 4
1717 Log::Message::Simple has been upgraded from version 0.06 to 0.08.
1718 .IP \(bu 4
1719 Math::BigInt has been upgraded from version 1.89_01 to 1.994.
1720 .Sp
1721 This fixes, among other things, incorrect results when computing binomial
1722 coefficients [perl #77640].
1723 .Sp
1724 It also prevents \f(CWsqrt($int)\fR from crashing under \f(CW\*(C`use bigrat\*(C'\fR.
1725 [perl #73534].
1726 .IP \(bu 4
1727 Math::BigInt::FastCalc has been upgraded from version 0.19 to 0.28.
1728 .IP \(bu 4
1729 Math::BigRat has been upgraded from version 0.24 to 0.26_02.
1730 .IP \(bu 4
1731 Memoize has been upgraded from version 1.01_03 to 1.02.
1732 .IP \(bu 4
1733 MIME::Base64 has been upgraded from 3.08 to 3.13.
1734 .Sp
1735 Includes new functions to calculate the length of encoded and decoded
1736 base64 strings.
1737 .Sp
1738 Now provides \fBencode_base64url()\fR and \fBdecode_base64url()\fR functions to process
1739 the base64 scheme for "URL applications".
1740 .IP \(bu 4
1741 Module::Build has been upgraded from version 0.3603 to 0.3800.
1742 .Sp
1743 A notable change is the deprecation of several modules.
1744 Module::Build::Version has been deprecated and Module::Build now
1745 relies on the version pragma directly. Module::Build::ModuleInfo has
1746 been deprecated in favor of a standalone copy called Module::Metadata.
1747 Module::Build::YAML has been deprecated in favor of CPAN::Meta::YAML.
1748 .Sp
1749 Module::Build now also generates \fIMETA.json\fR and \fIMYMETA.json\fR files
1750 in accordance with version 2 of the CPAN distribution metadata specification,
1751 CPAN::Meta::Spec. The older format \fIMETA.yml\fR and \fIMYMETA.yml\fR files are
1752 still generated.
1753 .IP \(bu 4
1754 Module::CoreList has been upgraded from version 2.29 to 2.47.
1755 .Sp
1756 Besides listing the updated core modules of this release, it also stops listing
1757 the \f(CW\*(C`Filespec\*(C'\fR module. That module never existed in core. The scripts
1758 generating Module::CoreList confused it with VMS::Filespec, which actually
1759 is a core module as of Perl 5.8.7.
1760 .IP \(bu 4
1761 Module::Load has been upgraded from version 0.16 to 0.18.
1762 .IP \(bu 4
1763 Module::Load::Conditional has been upgraded from version 0.34 to 0.44.
1764 .IP \(bu 4
1765 The mro pragma has been upgraded from version 1.02 to 1.07.
1766 .IP \(bu 4
1767 NDBM_File has been upgraded from version 1.08 to 1.12.
1768 .Sp
1769 This fixes a memory leak when DBM filters are used.
1770 .IP \(bu 4
1771 Net::Ping has been upgraded from version 2.36 to 2.38.
1772 .IP \(bu 4
1773 NEXT has been upgraded from version 0.64 to 0.65.
1774 .IP \(bu 4
1775 Object::Accessor has been upgraded from version 0.36 to 0.38.
1776 .IP \(bu 4
1777 ODBM_File has been upgraded from version 1.07 to 1.10.
1778 .Sp
1779 This fixes a memory leak when DBM filters are used.
1780 .IP \(bu 4
1781 Opcode has been upgraded from version 1.15 to 1.18.
1782 .IP \(bu 4
1783 The overload pragma has been upgraded from 1.10 to 1.13.
1784 .Sp
1785 \&\f(CW\*(C`overload::Method\*(C'\fR can now handle subroutines that are themselves blessed
1786 into overloaded classes [perl #71998].
1787 .Sp
1788 The documentation has greatly improved. See "Documentation" below.
1789 .IP \(bu 4
1790 Params::Check has been upgraded from version 0.26 to 0.28.
1791 .IP \(bu 4
1792 The parent pragma has been upgraded from version 0.223 to 0.225.
1793 .IP \(bu 4
1794 Parse::CPAN::Meta has been upgraded from version 1.40 to 1.4401.
1795 .Sp
1796 The latest Parse::CPAN::Meta can now read YAML and JSON files using
1797 CPAN::Meta::YAML and JSON::PP, which are now part of the Perl core.
1798 .IP \(bu 4
1799 PerlIO::encoding has been upgraded from version 0.12 to 0.14.
1800 .IP \(bu 4
1801 PerlIO::scalar has been upgraded from 0.07 to 0.11.
1802 .Sp
1803 A \fBread()\fR after a \fBseek()\fR beyond the end of the string no longer thinks it
1804 has data to read [perl #78716].
1805 .IP \(bu 4
1806 PerlIO::via has been upgraded from version 0.09 to 0.11.
1807 .IP \(bu 4
1808 Pod::Html has been upgraded from version 1.09 to 1.11.
1809 .IP \(bu 4
1810 Pod::LaTeX has been upgraded from version 0.58 to 0.59.
1811 .IP \(bu 4
1812 Pod::Perldoc has been upgraded from version 3.15_02 to 3.15_03.
1813 .IP \(bu 4
1814 Pod::Simple has been upgraded from version 3.13 to 3.16.
1815 .IP \(bu 4
1816 POSIX has been upgraded from 1.19 to 1.24.
1817 .Sp
1818 It now includes constants for POSIX signal constants.
1819 .IP \(bu 4
1820 The re pragma has been upgraded from version 0.11 to 0.18.
1821 .Sp
1822 The \f(CW\*(C`use re \*(Aq/flags\*(Aq\*(C'\fR subpragma is new.
1823 .Sp
1824 The \fBregmust()\fR function used to crash when called on a regular expression
1825 belonging to a pluggable engine. Now it croaks instead.
1826 .Sp
1827 \&\fBregmust()\fR no longer leaks memory.
1828 .IP \(bu 4
1829 Safe has been upgraded from version 2.25 to 2.29.
1830 .Sp
1831 Coderefs returned by \fBreval()\fR and \fBrdo()\fR are now wrapped via
1832 \&\fBwrap_code_refs()\fR (5.12.1).
1833 .Sp
1834 This fixes a possible infinite loop when looking for coderefs.
1835 .Sp
1836 It adds several \f(CW\*(C`version::vxs::*\*(C'\fR routines to the default share.
1837 .IP \(bu 4
1838 SDBM_File has been upgraded from version 1.06 to 1.09.
1839 .IP \(bu 4
1840 SelfLoader has been upgraded from 1.17 to 1.18.
1841 .Sp
1842 It now works in taint mode [perl #72062].
1843 .IP \(bu 4
1844 The sigtrap pragma has been upgraded from version 1.04 to 1.05.
1845 .Sp
1846 It no longer tries to modify read-only arguments when generating a
1847 backtrace [perl #72340].
1848 .IP \(bu 4
1849 Socket has been upgraded from version 1.87 to 1.94.
1850 .Sp
1851 See "Improved IPv6 support" above.
1852 .IP \(bu 4
1853 Storable has been upgraded from version 2.22 to 2.27.
1854 .Sp
1855 Includes performance improvement for overloaded classes.
1856 .Sp
1857 This adds support for serialising code references that contain UTF\-8 strings
1858 correctly. The Storable minor version
1859 number changed as a result, meaning that
1860 Storable users who set \f(CW$Storable::accept_future_minor\fR to a \f(CW\*(C`FALSE\*(C'\fR value
1861 will see errors (see "FORWARD COMPATIBILITY" in Storable for more details).
1862 .Sp
1863 Freezing no longer gets confused if the Perl stack gets reallocated
1864 during freezing [perl #80074].
1865 .IP \(bu 4
1866 Sys::Hostname has been upgraded from version 1.11 to 1.16.
1867 .IP \(bu 4
1868 Term::ANSIColor has been upgraded from version 2.02 to 3.00.
1869 .IP \(bu 4
1870 Term::UI has been upgraded from version 0.20 to 0.26.
1871 .IP \(bu 4
1872 Test::Harness has been upgraded from version 3.17 to 3.23.
1873 .IP \(bu 4
1874 Test::Simple has been upgraded from version 0.94 to 0.98.
1875 .Sp
1876 Among many other things, subtests without a \f(CW\*(C`plan\*(C'\fR or \f(CW\*(C`no_plan\*(C'\fR now have an
1877 implicit \fBdone_testing()\fR added to them.
1878 .IP \(bu 4
1879 Thread::Semaphore has been upgraded from version 2.09 to 2.12.
1880 .Sp
1881 It provides two new methods that give more control over the decrementing of
1882 semaphores: \f(CW\*(C`down_nb\*(C'\fR and \f(CW\*(C`down_force\*(C'\fR.
1883 .IP \(bu 4
1884 Thread::Queue has been upgraded from version 2.11 to 2.12.
1885 .IP \(bu 4
1886 The threads pragma has been upgraded from version 1.75 to 1.83.
1887 .IP \(bu 4
1888 The threads::shared pragma has been upgraded from version 1.32 to 1.37.
1889 .IP \(bu 4
1890 Tie::Hash has been upgraded from version 1.03 to 1.04.
1891 .Sp
1892 Calling \f(CW\*(C`Tie::Hash\->TIEHASH()\*(C'\fR used to loop forever. Now it \f(CW\*(C`croak\*(C'\fRs.
1893 .IP \(bu 4
1894 Tie::Hash::NamedCapture has been upgraded from version 0.06 to 0.08.
1895 .IP \(bu 4
1896 Tie::RefHash has been upgraded from version 1.38 to 1.39.
1897 .IP \(bu 4
1898 Time::HiRes has been upgraded from version 1.9719 to 1.9721_01.
1899 .IP \(bu 4
1900 Time::Local has been upgraded from version 1.1901_01 to 1.2000.
1901 .IP \(bu 4
1902 Time::Piece has been upgraded from version 1.15_01 to 1.20_01.
1903 .IP \(bu 4
1904 Unicode::Collate has been upgraded from version 0.52_01 to 0.73.
1905 .Sp
1906 Unicode::Collate has been updated to use Unicode 6.0.0.
1907 .Sp
1908 Unicode::Collate::Locale now supports a plethora of new locales: \fIar, be,
1909 bg, de_\|_phonebook, hu, hy, kk, mk, nso, om, tn, vi, hr, ig, ja, ko, ru, sq,
1910 se, sr, to, uk, zh, zh_\|_big5han, zh_\|_gb2312han, zh_\|_pinyin\fR, and \fIzh_\|_stroke\fR.
1911 .Sp
1912 The following modules have been added:
1913 .Sp
1914 Unicode::Collate::CJK::Big5 for \f(CW\*(C`zh_\|_big5han\*(C'\fR which makes
1915 tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering.
1916 .Sp
1917 Unicode::Collate::CJK::GB2312 for \f(CW\*(C`zh_\|_gb2312han\*(C'\fR which makes
1918 tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering.
1919 .Sp
1920 Unicode::Collate::CJK::JISX0208 which makes tailoring of 6355 kanji
1921 (CJK Unified Ideographs) in the JIS X 0208 order.
1922 .Sp
1923 Unicode::Collate::CJK::Korean which makes tailoring of CJK Unified Ideographs
1924 in the order of CLDR's Korean ordering.
1925 .Sp
1926 Unicode::Collate::CJK::Pinyin for \f(CW\*(C`zh_\|_pinyin\*(C'\fR which makes
1927 tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering.
1928 .Sp
1929 Unicode::Collate::CJK::Stroke for \f(CW\*(C`zh_\|_stroke\*(C'\fR which makes
1930 tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering.
1931 .Sp
1932 This also sees the switch from using the pure-Perl version of this
1933 module to the XS version.
1934 .IP \(bu 4
1935 Unicode::Normalize has been upgraded from version 1.03 to 1.10.
1936 .IP \(bu 4
1937 Unicode::UCD has been upgraded from version 0.27 to 0.32.
1938 .Sp
1939 A new function, \fBUnicode::UCD::num()\fR, has been added. This function
1940 returns the numeric value of the string passed it or \f(CW\*(C`undef\*(C'\fR if the string
1941 in its entirety has no "safe" numeric value. (For more detail, and for the
1942 definition of "safe", see "\fBnum()\fR" in Unicode::UCD.)
1943 .Sp
1944 This upgrade also includes several bug fixes:
1945 .RS 4
1946 .IP \fBcharinfo()\fR 4
1947 .IX Item "charinfo()"
1948 .RS 4
1949 .PD 0
1950 .IP \(bu 4
1951 .PD
1952 It is now updated to Unicode Version 6.0.0 with \fICorrigendum #8\fR,
1953 excepting that, just as with Perl 5.14, the code point at U+1F514 has no name.
1954 .IP \(bu 4
1955 Hangul syllable code points have the correct names, and their
1956 decompositions are always output without requiring Lingua::KO::Hangul::Util
1957 to be installed.
1958 .IP \(bu 4
1959 CJK (Chinese-Japanese-Korean) code points U+2A700 to U+2B734
1960 and U+2B740 to U+2B81D are now properly handled.
1961 .IP \(bu 4
1962 Numeric values are now output for those CJK code points that have them.
1963 .IP \(bu 4
1964 Names output for code points with multiple aliases are now the
1965 corrected ones.
1966 .RE
1967 .RS 4
1968 .RE
1969 .IP \fBcharscript()\fR 4
1970 .IX Item "charscript()"
1971 This now correctly returns "Unknown" instead of \f(CW\*(C`undef\*(C'\fR for the script
1972 of a code point that hasn't been assigned another one.
1973 .IP \fBcharblock()\fR 4
1974 .IX Item "charblock()"
1975 This now correctly returns "No_Block" instead of \f(CW\*(C`undef\*(C'\fR for the block
1976 of a code point that hasn't been assigned to another one.
1977 .RE
1978 .RS 4
1979 .RE
1980 .IP \(bu 4
1981 The version pragma has been upgraded from 0.82 to 0.88.
1982 .Sp
1983 Because of a bug, now fixed, the \fBis_strict()\fR and \fBis_lax()\fR functions did not
1984 work when exported (5.12.1).
1985 .IP \(bu 4
1986 The warnings pragma has been upgraded from version 1.09 to 1.12.
1987 .Sp
1988 Calling \f(CW\*(C`use warnings\*(C'\fR without arguments is now significantly more efficient.
1989 .IP \(bu 4
1990 The warnings::register pragma has been upgraded from version 1.01 to 1.02.
1991 .Sp
1992 It is now possible to register warning categories other than the names of
1993 packages using warnings::register. See \fBperllexwarn\fR\|(1) for more information.
1994 .IP \(bu 4
1995 XSLoader has been upgraded from version 0.10 to 0.13.
1996 .IP \(bu 4
1997 VMS::DCLsym has been upgraded from version 1.03 to 1.05.
1998 .Sp
1999 Two bugs have been fixed [perl #84086]:
2000 .Sp
2001 The symbol table name was lost when tying a hash, due to a thinko in
2002 \&\f(CW\*(C`TIEHASH\*(C'\fR. The result was that all tied hashes interacted with the
2003 local symbol table.
2004 .Sp
2005 Unless a symbol table name had been explicitly specified in the call
2006 to the constructor, querying the special key \f(CW\*(C`:LOCAL\*(C'\fR failed to
2007 identify objects connected to the local symbol table.
2008 .IP \(bu 4
2009 The Win32 module has been upgraded from version 0.39 to 0.44.
2010 .Sp
2011 This release has several new functions: \fBWin32::GetSystemMetrics()\fR,
2012 \&\fBWin32::GetProductInfo()\fR, \fBWin32::GetOSDisplayName()\fR.
2013 .Sp
2014 The names returned by \fBWin32::GetOSName()\fR and \fBWin32::GetOSDisplayName()\fR
2015 have been corrected.
2016 .IP \(bu 4
2017 XS::Typemap has been upgraded from version 0.03 to 0.05.
2018 .SS "Removed Modules and Pragmata"
2019 .IX Subsection "Removed Modules and Pragmata"
2020 As promised in Perl 5.12.0's release notes, the following modules have
2021 been removed from the core distribution, and if needed should be installed
2022 from CPAN instead.
2023 .IP \(bu 4
2024 Class::ISA has been removed from the Perl core. Prior version was 0.36.
2025 .IP \(bu 4
2026 Pod::Plainer has been removed from the Perl core. Prior version was 1.02.
2027 .IP \(bu 4
2028 Switch has been removed from the Perl core. Prior version was 2.16.
2029 .PP
2030 The removal of Shell has been deferred until after 5.14, as the
2031 implementation of Shell shipped with 5.12.0 did not correctly issue the
2032 warning that it was to be removed from core.
2033 .SH Documentation
2034 .IX Header "Documentation"
2035 .SS "New Documentation"
2036 .IX Subsection "New Documentation"
2037 \fIperlgpl\fR
2038 .IX Subsection "perlgpl"
2039 .PP
2040 perlgpl has been updated to contain GPL version 1, as is included in the
2041 \&\fIREADME\fR distributed with Perl (5.12.1).
2042 .PP
2043 \fIPerl 5.12.x delta files\fR
2044 .IX Subsection "Perl 5.12.x delta files"
2045 .PP
2046 The perldelta files for Perl 5.12.1 to 5.12.3 have been added from the
2047 maintenance branch: perl5121delta, perl5122delta, perl5123delta.
2048 .PP
2049 \fIperlpodstyle\fR
2050 .IX Subsection "perlpodstyle"
2051 .PP
2052 New style guide for POD documentation,
2053 split mostly from the NOTES section of the \fBpod2man\fR\|(1) manpage.
2054 .PP
2055 \fIperlsource, perlinterp, perlhacktut, and perlhacktips\fR
2056 .IX Subsection "perlsource, perlinterp, perlhacktut, and perlhacktips"
2057 .PP
2058 See "perlhack and perlrepository revamp", below.
2059 .SS "Changes to Existing Documentation"
2060 .IX Subsection "Changes to Existing Documentation"
2061 \fIperlmodlib is now complete\fR
2062 .IX Subsection "perlmodlib is now complete"
2063 .PP
2064 The perlmodlib manpage that came with Perl 5.12.0 was missing several
2065 modules due to a bug in the script that generates the list. This has been
2066 fixed [perl #74332] (5.12.1).
2067 .PP
2068 \fIReplace incorrect tr/// table in perlebcdic\fR
2069 .IX Subsection "Replace incorrect tr/// table in perlebcdic"
2070 .PP
2071 perlebcdic contains a helpful table to use in \f(CW\*(C`tr///\*(C'\fR to convert
2072 between EBCDIC and Latin1/ASCII. The table was the inverse of the one
2073 it describes, though the code that used the table worked correctly for
2074 the specific example given.
2075 .PP
2076 The table has been corrected and the sample code changed to correspond.
2077 .PP
2078 The table has also been changed to hex from octal, and the recipes in the
2079 pod have been altered to print out leading zeros to make all values
2080 the same length.
2081 .PP
2082 \fITricks for user-defined casing\fR
2083 .IX Subsection "Tricks for user-defined casing"
2084 .PP
2085 perlunicode now contains an explanation of how to override, mangle
2086 and otherwise tweak the way Perl handles upper\-, lower\- and other-case
2087 conversions on Unicode data, and how to provide scoped changes to alter
2088 one's own code's behaviour without stomping on anybody else's.
2089 .PP
2090 \fIINSTALL explicitly states that Perl requires a C89 compiler\fR
2091 .IX Subsection "INSTALL explicitly states that Perl requires a C89 compiler"
2092 .PP
2093 This was already true, but it's now Officially Stated For The Record
2094 (5.12.2).
2095 .PP
2096 \fIExplanation of \fR\f(CI\*(C`\exHH\*(C'\fR\fI and \fR\f(CI\*(C`\eoOOO\*(C'\fR\fI escapes\fR
2097 .IX Subsection "Explanation of xHH and oOOO escapes"
2098 .PP
2099 perlop has been updated with more detailed explanation of these two
2100 character escapes.
2101 .PP
2102 \fR\f(BI\-0NNN\fR\fI switch\fR
2103 .IX Subsection "-0NNN switch"
2104 .PP
2105 In perlrun, the behaviour of the \fB\-0NNN\fR switch for \fB\-0400\fR or higher
2106 has been clarified (5.12.2).
2107 .PP
2108 \fIMaintenance policy\fR
2109 .IX Subsection "Maintenance policy"
2110 .PP
2111 perlpolicy now contains the policy on what patches are acceptable for
2112 maintenance branches (5.12.1).
2113 .PP
2114 \fIDeprecation policy\fR
2115 .IX Subsection "Deprecation policy"
2116 .PP
2117 perlpolicy now contains the policy on compatibility and deprecation
2118 along with definitions of terms like "deprecation" (5.12.2).
2119 .PP
2120 \fINew descriptions in perldiag\fR
2121 .IX Subsection "New descriptions in perldiag"
2122 .PP
2123 The following existing diagnostics are now documented:
2124 .IP \(bu 4
2125 Ambiguous use of \f(CW%c\fR resolved as operator \f(CW%c\fR
2126 .IP \(bu 4
2127 Ambiguous use of \f(CW%c\fR{%s} resolved to \f(CW%c\fR%s
2128 .IP \(bu 4
2129 Ambiguous use of \f(CW%c\fR{%s[...]} resolved to \f(CW%c\fR%s[...]
2130 .IP \(bu 4
2131 Ambiguous use of \f(CW%c\fR{%s{...}} resolved to \f(CW%c\fR%s{...}
2132 .IP \(bu 4
2133 Ambiguous use of \-%s resolved as \-&%s()
2134 .IP \(bu 4
2135 Invalid strict version format (%s)
2136 .IP \(bu 4
2137 Invalid version format (%s)
2138 .IP \(bu 4
2139 Invalid version object
2140 .PP
2141 \fIperlbook\fR
2142 .IX Subsection "perlbook"
2143 .PP
2144 perlbook has been expanded to cover many more popular books.
2145 .PP
2146 \fR\f(CI\*(C`SvTRUE\*(C'\fR\fI macro\fR
2147 .IX Subsection "SvTRUE macro"
2148 .PP
2149 The documentation for the \f(CW\*(C`SvTRUE\*(C'\fR macro in
2150 perlapi was simply wrong in stating that
2151 get-magic is not processed. It has been corrected.
2152 .PP
2153 \fIop manipulation functions\fR
2154 .IX Subsection "op manipulation functions"
2155 .PP
2156 Several API functions that process optrees have been newly documented.
2157 .PP
2158 \fIperlvar revamp\fR
2159 .IX Subsection "perlvar revamp"
2160 .PP
2161 perlvar reorders the variables and groups them by topic. Each variable
2162 introduced after Perl 5.000 notes the first version in which it is
2163 available. perlvar also has a new section for deprecated variables to
2164 note when they were removed.
2165 .PP
2166 \fIArray and hash slices in scalar context\fR
2167 .IX Subsection "Array and hash slices in scalar context"
2168 .PP
2169 These are now documented in perldata.
2170 .PP
2171 \fR\f(CI\*(C`use locale\*(C'\fR\fI and formats\fR
2172 .IX Subsection "use locale and formats"
2173 .PP
2174 perlform and perllocale have been corrected to state that
2175 \&\f(CW\*(C`use locale\*(C'\fR affects formats.
2176 .PP
2177 \fIoverload\fR
2178 .IX Subsection "overload"
2179 .PP
2180 overload's documentation has practically undergone a rewrite. It
2181 is now much more straightforward and clear.
2182 .PP
2183 \fIperlhack and perlrepository revamp\fR
2184 .IX Subsection "perlhack and perlrepository revamp"
2185 .PP
2186 The perlhack document is now much shorter, and focuses on the Perl 5
2187 development process and submitting patches to Perl. The technical content
2188 has been moved to several new documents, perlsource, perlinterp,
2189 perlhacktut, and perlhacktips. This technical content has
2190 been only lightly edited.
2191 .PP
2192 The perlrepository document has been renamed to perlgit. This new
2193 document is just a how-to on using git with the Perl source code.
2194 Any other content that used to be in perlrepository has been moved
2195 to perlhack.
2196 .PP
2197 \fITime::Piece examples\fR
2198 .IX Subsection "Time::Piece examples"
2199 .PP
2200 Examples in perlfaq4 have been updated to show the use of
2201 Time::Piece.
2202 .SH Diagnostics
2203 .IX Header "Diagnostics"
2204 The following additions or changes have been made to diagnostic output,
2205 including warnings and fatal error messages. For the complete list of
2206 diagnostic messages, see perldiag.
2207 .SS "New Diagnostics"
2208 .IX Subsection "New Diagnostics"
2209 \fINew Errors\fR
2210 .IX Subsection "New Errors"
2211 .IP "Closure prototype called" 4
2212 .IX Item "Closure prototype called"
2213 This error occurs when a subroutine reference passed to an attribute
2214 handler is called, if the subroutine is a closure [perl #68560].
2215 .ie n .IP "Insecure user-defined property %s" 4
2216 .el .IP "Insecure user-defined property \f(CW%s\fR" 4
2217 .IX Item "Insecure user-defined property %s"
2218 Perl detected tainted data when trying to compile a regular
2219 expression that contains a call to a user-defined character property
2220 function, meaning \f(CW\*(C`\ep{IsFoo}\*(C'\fR or \f(CW\*(C`\ep{InFoo}\*(C'\fR.
2221 See "User-Defined Character Properties" in perlunicode and perlsec.
2222 .IP "panic: gp_free failed to free glob pointer \- something is repeatedly re-creating entries" 4
2223 .IX Item "panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries"
2224 This new error is triggered if a destructor called on an object in a
2225 typeglob that is being freed creates a new typeglob entry containing an
2226 object with a destructor that creates a new entry containing an object etc.
2227 .IP "Parsing code internal error (%s)" 4
2228 .IX Item "Parsing code internal error (%s)"
2229 This new fatal error is produced when parsing
2230 code supplied by an extension violates the
2231 parser's API in a detectable way.
2232 .ie n .IP "refcnt: fd %d%s" 4
2233 .el .IP "refcnt: fd \f(CW%d\fR%s" 4
2234 .IX Item "refcnt: fd %d%s"
2235 This new error only occurs if an internal consistency check fails when a
2236 pipe is about to be closed.
2237 .IP "Regexp modifier ""/%c"" may not appear twice" 4
2238 .IX Item "Regexp modifier ""/%c"" may not appear twice"
2239 The regular expression pattern has one of the
2240 mutually exclusive modifiers repeated.
2241 .IP "Regexp modifiers ""/%c"" and ""/%c"" are mutually exclusive" 4
2242 .IX Item "Regexp modifiers ""/%c"" and ""/%c"" are mutually exclusive"
2243 The regular expression pattern has more than one of the mutually
2244 exclusive modifiers.
2245 .ie n .IP "Using !~ with %s doesn't make sense" 4
2246 .el .IP "Using !~ with \f(CW%s\fR doesn't make sense" 4
2247 .IX Item "Using !~ with %s doesn't make sense"
2248 This error occurs when \f(CW\*(C`!~\*(C'\fR is used with \f(CW\*(C`s///r\*(C'\fR or \f(CW\*(C`y///r\*(C'\fR.
2249 .PP
2250 \fINew Warnings\fR
2251 .IX Subsection "New Warnings"
2252 .IP """\eb{"" is deprecated; use ""\eb\e{"" instead" 4
2253 .IX Item """b{"" is deprecated; use ""b{"" instead"
2254 .PD 0
2255 .IP """\eB{"" is deprecated; use ""\eB\e{"" instead" 4
2256 .IX Item """B{"" is deprecated; use ""B{"" instead"
2257 .PD
2258 Use of an unescaped "{" immediately following a \f(CW\*(C`\eb\*(C'\fR or \f(CW\*(C`\eB\*(C'\fR is now
2259 deprecated in order to reserve its use for Perl itself in a future release.
2260 .IP "Operation ""%s"" returns its argument for ..." 4
2261 .IX Item "Operation ""%s"" returns its argument for ..."
2262 Performing an operation requiring Unicode semantics (such as case-folding)
2263 on a Unicode surrogate or a non-Unicode character now triggers this
2264 warning.
2265 .IP "Use of qw(...) as parentheses is deprecated" 4
2266 .IX Item "Use of qw(...) as parentheses is deprecated"
2267 See "Use of qw(...) as parentheses", above, for details.
2268 .SS "Changes to Existing Diagnostics"
2269 .IX Subsection "Changes to Existing Diagnostics"
2270 .IP \(bu 4
2271 The "Variable \f(CW$foo\fR is not imported" warning that precedes a
2272 \&\f(CW\*(C`strict \*(Aqvars\*(Aq\*(C'\fR error has now been assigned the "misc" category, so that
2273 \&\f(CW\*(C`no warnings\*(C'\fR will suppress it [perl #73712].
2274 .IP \(bu 4
2275 \&\fBwarn()\fR and \fBdie()\fR now produce "Wide character" warnings when fed a
2276 character outside the byte range if \f(CW\*(C`STDERR\*(C'\fR is a byte-sized handle.
2277 .IP \(bu 4
2278 The "Layer does not match this perl" error message has been replaced with
2279 these more helpful messages [perl #73754]:
2280 .RS 4
2281 .IP \(bu 4
2282 PerlIO layer function table size (%d) does not match size expected by this
2283 perl (%d)
2284 .IP \(bu 4
2285 PerlIO layer instance size (%d) does not match size expected by this perl
2286 (%d)
2287 .RE
2288 .RS 4
2289 .RE
2290 .IP \(bu 4
2291 The "Found = in conditional" warning that is emitted when a constant is
2292 assigned to a variable in a condition is now withheld if the constant is
2293 actually a subroutine or one generated by \f(CW\*(C`use constant\*(C'\fR, since the value
2294 of the constant may not be known at the time the program is written
2295 [perl #77762].
2296 .IP \(bu 4
2297 Previously, if none of the \fBgethostbyaddr()\fR, \fBgethostbyname()\fR and
2298 \&\fBgethostent()\fR functions were implemented on a given platform, they would
2299 all die with the message "Unsupported socket function 'gethostent' called",
2300 with analogous messages for getnet*() and getserv*(). This has been
2301 corrected.
2302 .IP \(bu 4
2303 The warning message about unrecognized regular expression escapes passed
2304 through has been changed to include any literal "{" following the
2305 two-character escape. For example, "\eq{" is now emitted instead of "\eq".
2306 .SH "Utility Changes"
2307 .IX Header "Utility Changes"
2308 \fR\f(BIperlbug\fR\fI\|(1)\fR
2309 .IX Subsection "perlbug"
2310 .IP \(bu 4
2311 perlbug now looks in the EMAIL environment variable for a return address
2312 if the REPLY-TO and REPLYTO variables are empty.
2313 .IP \(bu 4
2314 perlbug did not previously generate a "From:" header, potentially
2315 resulting in dropped mail; it now includes that header.
2316 .IP \(bu 4
2317 The user's address is now used as the Return-Path.
2318 .Sp
2319 Many systems these days don't have a valid Internet domain name, and
2320 [email protected] does not accept email with a return-path that does
2321 not resolve. So the user's address is now passed to sendmail so it's
2322 less likely to get stuck in a mail queue somewhere [perl #82996].
2323 .IP \(bu 4
2324 perlbug now always gives the reporter a chance to change the email
2325 address it guesses for them (5.12.2).
2326 .IP \(bu 4
2327 perlbug should no longer warn about uninitialized values when using the \fB\-d\fR
2328 and \fB\-v\fR options (5.12.2).
2329 .PP
2330 \fIperl5db.pl\fR
2331 .IX Subsection "perl5db.pl"
2332 .IP \(bu 4
2333 The remote terminal works after forking and spawns new sessions, one
2334 per forked process.
2335 .PP
2336 \fIptargrep\fR
2337 .IX Subsection "ptargrep"
2338 .IP \(bu 4
2339 ptargrep is a new utility to apply pattern matching to the contents of
2340 files in a tar archive. It comes with \f(CW\*(C`Archive::Tar\*(C'\fR.
2341 .SH "Configuration and Compilation"
2342 .IX Header "Configuration and Compilation"
2343 See also "Naming fixes in Policy_sh.SH may invalidate Policy.sh",
2344 above.
2345 .IP \(bu 4
2346 CCINCDIR and CCLIBDIR for the mingw64 cross-compiler are now correctly
2347 under \fI$(CCHOME)\emingw\einclude\fR and \fI\elib\fR rather than immediately below
2348 \&\fI$(CCHOME)\fR.
2349 .Sp
2350 This means the "incpath", "libpth", "ldflags", "lddlflags" and
2351 "ldflags_nolargefiles" values in \fIConfig.pm\fR and \fIConfig_heavy.pl\fR are now
2352 set correctly.
2353 .IP \(bu 4
2354 \&\f(CW\*(C`make test.valgrind\*(C'\fR has been adjusted to account for \fIcpan/dist/ext\fR
2355 separation.
2356 .IP \(bu 4
2357 On compilers that support it, \fB\-Wwrite\-strings\fR is now added to cflags by
2358 default.
2359 .IP \(bu 4
2360 The Encode module can now (once again) be included in a static Perl
2361 build. The special-case handling for this situation got broken in Perl
2362 5.11.0, and has now been repaired.
2363 .IP \(bu 4
2364 The previous default size of a PerlIO buffer (4096 bytes) has been increased
2365 to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling
2366 this decade-old default increases read and write performance by around
2367 25% to 50% when using the default layers of perlio on top of unix. To choose
2368 a non-default size, such as to get back the old value or to obtain an even
2369 larger value, configure with:
2370 .Sp
2371 .Vb 1
2372 \& ./Configure \-Accflags=\-DPERLIOBUF_DEFAULT_BUFSIZ=N
2373 .Ve
2374 .Sp
2375 where N is the desired size in bytes; it should probably be a multiple of
2376 your page size.
2377 .IP \(bu 4
2378 An "incompatible operand types" error in ternary expressions when building
2379 with \f(CW\*(C`clang\*(C'\fR has been fixed (5.12.2).
2380 .IP \(bu 4
2381 Perl now skips setuid File::Copy tests on partitions it detects mounted
2382 as \f(CW\*(C`nosuid\*(C'\fR (5.12.2).
2383 .SH "Platform Support"
2384 .IX Header "Platform Support"
2385 .SS "New Platforms"
2386 .IX Subsection "New Platforms"
2387 .IP AIX 4
2388 .IX Item "AIX"
2389 Perl now builds on AIX 4.2 (5.12.1).
2390 .SS "Discontinued Platforms"
2391 .IX Subsection "Discontinued Platforms"
2392 .IP "Apollo DomainOS" 4
2393 .IX Item "Apollo DomainOS"
2394 The last vestiges of support for this platform have been excised from
2395 the Perl distribution. It was officially discontinued in version 5.12.0.
2396 It had not worked for years before that.
2397 .IP "MacOS Classic" 4
2398 .IX Item "MacOS Classic"
2399 The last vestiges of support for this platform have been excised from the
2400 Perl distribution. It was officially discontinued in an earlier version.
2401 .SS "Platform-Specific Notes"
2402 .IX Subsection "Platform-Specific Notes"
2403 \fIAIX\fR
2404 .IX Subsection "AIX"
2405 .IP \(bu 4
2406 \&\fIREADME.aix\fR has been updated with information about the XL C/C++ V11 compiler
2407 suite (5.12.2).
2408 .PP
2409 \fIARM\fR
2410 .IX Subsection "ARM"
2411 .IP \(bu 4
2412 The \f(CW\*(C`d_u32align\*(C'\fR configuration probe on ARM has been fixed (5.12.2).
2413 .PP
2414 \fICygwin\fR
2415 .IX Subsection "Cygwin"
2416 .IP \(bu 4
2417 MakeMaker has been updated to build manpages on cygwin.
2418 .IP \(bu 4
2419 Improved rebase behaviour
2420 .Sp
2421 If a DLL is updated on cygwin the old imagebase address is reused.
2422 This solves most rebase errors, especially when updating on core DLL's.
2423 See <http://www.tishler.net/jason/software/rebase/rebase\-2.4.2.README>
2424 for more information.
2425 .IP \(bu 4
2426 Support for the standard cygwin dll prefix (needed for FFIs)
2427 .IP \(bu 4
2428 Updated build hints file
2429 .PP
2430 \fIFreeBSD 7\fR
2431 .IX Subsection "FreeBSD 7"
2432 .IP \(bu 4
2433 FreeBSD 7 no longer contains \fI/usr/bin/objformat\fR. At build time,
2434 Perl now skips the \fIobjformat\fR check for versions 7 and higher and
2435 assumes ELF (5.12.1).
2436 .PP
2437 \fIHP-UX\fR
2438 .IX Subsection "HP-UX"
2439 .IP \(bu 4
2440 Perl now allows \fB\-Duse64bitint\fR without promoting to \f(CW\*(C`use64bitall\*(C'\fR on HP-UX
2441 (5.12.1).
2442 .PP
2443 \fIIRIX\fR
2444 .IX Subsection "IRIX"
2445 .IP \(bu 4
2446 Conversion of strings to floating-point numbers is now more accurate on
2447 IRIX systems [perl #32380].
2448 .PP
2449 \fIMac OS X\fR
2450 .IX Subsection "Mac OS X"
2451 .IP \(bu 4
2452 Early versions of Mac OS X (Darwin) had buggy implementations of the
2453 \&\fBsetregid()\fR, \fBsetreuid()\fR, setrgid(,) and \fBsetruid()\fR functions, so Perl
2454 would pretend they did not exist.
2455 .Sp
2456 These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and
2457 higher, as they have been fixed [perl #72990].
2458 .PP
2459 \fIMirBSD\fR
2460 .IX Subsection "MirBSD"
2461 .IP \(bu 4
2462 Previously if you built Perl with a shared \fIlibperl.so\fR on MirBSD (the
2463 default config), it would work up to the installation; however, once
2464 installed, it would be unable to find \fIlibperl\fR. Path handling is now
2465 treated as in the other BSD dialects.
2466 .PP
2467 \fINetBSD\fR
2468 .IX Subsection "NetBSD"
2469 .IP \(bu 4
2470 The NetBSD hints file has been changed to make the system malloc the
2471 default.
2472 .PP
2473 \fIOpenBSD\fR
2474 .IX Subsection "OpenBSD"
2475 .IP \(bu 4
2476 OpenBSD > 3.7 has a new malloc implementation which is \fImmap\fR\-based,
2477 and as such can release memory back to the OS; however, Perl's use of
2478 this malloc causes a substantial slowdown, so we now default to using
2479 Perl's malloc instead [perl #75742].
2480 .PP
2481 \fIOpenVOS\fR
2482 .IX Subsection "OpenVOS"
2483 .IP \(bu 4
2484 Perl now builds again with OpenVOS (formerly known as Stratus VOS)
2485 [perl #78132] (5.12.3).
2486 .PP
2487 \fISolaris\fR
2488 .IX Subsection "Solaris"
2489 .IP \(bu 4
2490 DTrace is now supported on Solaris. There used to be build failures, but
2491 these have been fixed [perl #73630] (5.12.3).
2492 .PP
2493 \fIVMS\fR
2494 .IX Subsection "VMS"
2495 .IP \(bu 4
2496 Extension building on older (pre 7.3\-2) VMS systems was broken because
2497 configure.com hit the DCL symbol length limit of 1K. We now work within
2498 this limit when assembling the list of extensions in the core build (5.12.1).
2499 .IP \(bu 4
2500 We fixed configuring and building Perl with \fB\-Uuseperlio\fR (5.12.1).
2501 .IP \(bu 4
2502 \&\f(CW\*(C`PerlIOUnix_open\*(C'\fR now honours the default permissions on VMS.
2503 .Sp
2504 When \f(CW\*(C`perlio\*(C'\fR became the default and \f(CW\*(C`unix\*(C'\fR became the default bottom layer,
2505 the most common path for creating files from Perl became \f(CW\*(C`PerlIOUnix_open\*(C'\fR,
2506 which has always explicitly used \f(CW0666\fR as the permission mask. This prevents
2507 inheriting permissions from RMS defaults and ACLs, so to avoid that problem,
2508 we now pass \f(CW0777\fR to \fBopen()\fR. In the VMS CRTL, \f(CW0777\fR has a special
2509 meaning over and above intersecting with the current umask; specifically, it
2510 allows Unix syscalls to preserve native default permissions (5.12.3).
2511 .IP \(bu 4
2512 The shortening of symbols longer than 31 characters in the core C sources
2513 and in extensions is now by default done by the C compiler rather than by
2514 xsubpp (which could only do so for generated symbols in XS code). You can
2515 reenable xsubpp's symbol shortening by configuring with \-Uuseshortenedsymbols,
2516 but you'll have some work to do to get the core sources to compile.
2517 .IP \(bu 4
2518 Record-oriented files (record format variable or variable with fixed control)
2519 opened for write by the \f(CW\*(C`perlio\*(C'\fR layer will now be line-buffered to prevent the
2520 introduction of spurious line breaks whenever the perlio buffer fills up.
2521 .IP \(bu 4
2522 \&\fIgit_version.h\fR is now installed on VMS. This was an oversight in v5.12.0 which
2523 caused some extensions to fail to build (5.12.2).
2524 .IP \(bu 4
2525 Several memory leaks in \fBstat()\fR have been fixed (5.12.2).
2526 .IP \(bu 4
2527 A memory leak in \fBPerl_rename()\fR due to a double allocation has been
2528 fixed (5.12.2).
2529 .IP \(bu 4
2530 A memory leak in \fBvms_fid_to_name()\fR (used by \fBrealpath()\fR and
2531 \&\fBrealname()\fR> has been fixed (5.12.2).
2532 .PP
2533 \fIWindows\fR
2534 .IX Subsection "Windows"
2535 .PP
2536 See also "\fBfork()\fR emulation will not wait for signalled children" and
2537 "Perl source code is read in text mode on Windows", above.
2538 .IP \(bu 4
2539 Fixed build process for SDK2003SP1 compilers.
2540 .IP \(bu 4
2541 Compilation with Visual Studio 2010 is now supported.
2542 .IP \(bu 4
2543 When using old 32\-bit compilers, the define \f(CW\*(C`_USE_32BIT_TIME_T\*(C'\fR is now
2544 set in \f(CW$Config{ccflags}\fR. This improves portability when compiling
2545 XS extensions using new compilers, but for a Perl compiled with old 32\-bit
2546 compilers.
2547 .IP \(bu 4
2548 \&\f(CW$Config{gccversion}\fR is now set correctly when Perl is built using the
2549 mingw64 compiler from <http://mingw64.org> [perl #73754].
2550 .IP \(bu 4
2551 When building Perl with the mingw64 x64 cross-compiler \f(CW\*(C`incpath\*(C'\fR,
2552 \&\f(CW\*(C`libpth\*(C'\fR, \f(CW\*(C`ldflags\*(C'\fR, \f(CW\*(C`lddlflags\*(C'\fR and \f(CW\*(C`ldflags_nolargefiles\*(C'\fR values
2553 in \fIConfig.pm\fR and \fIConfig_heavy.pl\fR were not previously being set
2554 correctly because, with that compiler, the include and lib directories
2555 are not immediately below \f(CW\*(C`$(CCHOME)\*(C'\fR (5.12.2).
2556 .IP \(bu 4
2557 The build process proceeds more smoothly with mingw and dmake when
2558 \&\fIC:\eMSYS\ebin\fR is in the PATH, due to a \f(CW\*(C`Cwd\*(C'\fR fix.
2559 .IP \(bu 4
2560 Support for building with Visual C++ 2010 is now underway, but is not yet
2561 complete. See \fIREADME.win32\fR or perlwin32 for more details.
2562 .IP \(bu 4
2563 The option to use an externally-supplied \fBcrypt()\fR, or to build with no
2564 \&\fBcrypt()\fR at all, has been removed. Perl supplies its own \fBcrypt()\fR
2565 implementation for Windows, and the political situation that required
2566 this part of the distribution to sometimes be omitted is long gone.
2567 .SH "Internal Changes"
2568 .IX Header "Internal Changes"
2569 .SS "New APIs"
2570 .IX Subsection "New APIs"
2571 \fICLONE_PARAMS structure added to ease correct thread creation\fR
2572 .IX Subsection "CLONE_PARAMS structure added to ease correct thread creation"
2573 .PP
2574 Modules that create threads should now create \f(CW\*(C`CLONE_PARAMS\*(C'\fR structures
2575 by calling the new function \fBPerl_clone_params_new()\fR, and free them with
2576 \&\fBPerl_clone_params_del()\fR. This will ensure compatibility with any future
2577 changes to the internals of the \f(CW\*(C`CLONE_PARAMS\*(C'\fR structure layout, and that
2578 it is correctly allocated and initialised.
2579 .PP
2580 \fINew parsing functions\fR
2581 .IX Subsection "New parsing functions"
2582 .PP
2583 Several functions have been added for parsing Perl statements and
2584 expressions. These functions are meant to be used by XS code invoked
2585 during Perl parsing, in a recursive-descent manner, to allow modules to
2586 augment the standard Perl syntax.
2587 .IP \(bu 4
2588 \&\fBparse_stmtseq()\fR
2589 parses a sequence of statements, up to closing brace or EOF.
2590 .IP \(bu 4
2591 \&\fBparse_fullstmt()\fR
2592 parses a complete Perl statement, including optional label.
2593 .IP \(bu 4
2594 \&\fBparse_barestmt()\fR
2595 parses a statement without a label.
2596 .IP \(bu 4
2597 \&\fBparse_block()\fR
2598 parses a code block.
2599 .IP \(bu 4
2600 \&\fBparse_label()\fR
2601 parses a statement label, separate from statements.
2602 .IP \(bu 4
2603 \&\f(CWparse_fullexpr()\fR,
2604 \&\f(CWparse_listexpr()\fR,
2605 \&\f(CWparse_termexpr()\fR, and
2606 \&\f(CWparse_arithexpr()\fR
2607 parse expressions at various precedence levels.
2608 .PP
2609 \fIHints hash API\fR
2610 .IX Subsection "Hints hash API"
2611 .PP
2612 A new C API for introspecting the hinthash \f(CW\*(C`%^H\*(C'\fR at runtime has been
2613 added. See \f(CW\*(C`cop_hints_2hv\*(C'\fR, \f(CW\*(C`cop_hints_fetchpvn\*(C'\fR, \f(CW\*(C`cop_hints_fetchpvs\*(C'\fR,
2614 \&\f(CW\*(C`cop_hints_fetchsv\*(C'\fR, and \f(CW\*(C`hv_copy_hints_hv\*(C'\fR in perlapi for details.
2615 .PP
2616 A new, experimental API has been added for accessing the internal
2617 structure that Perl uses for \f(CW\*(C`%^H\*(C'\fR. See the functions beginning with
2618 \&\f(CW\*(C`cophh_\*(C'\fR in perlapi.
2619 .PP
2620 \fIC interface to \fR\f(BIcaller()\fR
2621 .IX Subsection "C interface to caller()"
2622 .PP
2623 The \f(CW\*(C`caller_cx\*(C'\fR function has been added as an XSUB-writer's equivalent of
2624 \&\fBcaller()\fR. See perlapi for details.
2625 .PP
2626 \fICustom per-subroutine check hooks\fR
2627 .IX Subsection "Custom per-subroutine check hooks"
2628 .PP
2629 XS code in an extension module can now annotate a subroutine (whether
2630 implemented in XS or in Perl) so that nominated XS code will be called
2631 at compile time (specifically as part of op checking) to change the op
2632 tree of that subroutine. The compile-time check function (supplied by
2633 the extension module) can implement argument processing that can't be
2634 expressed as a prototype, generate customised compile-time warnings,
2635 perform constant folding for a pure function, inline a subroutine
2636 consisting of sufficiently simple ops, replace the whole call with a
2637 custom op, and so on. This was previously all possible by hooking the
2638 \&\f(CW\*(C`entersub\*(C'\fR op checker, but the new mechanism makes it easy to tie the
2639 hook to a specific subroutine. See "cv_set_call_checker" in perlapi.
2640 .PP
2641 To help in writing custom check hooks, several subtasks within standard
2642 \&\f(CW\*(C`entersub\*(C'\fR op checking have been separated out and exposed in the API.
2643 .PP
2644 \fIImproved support for custom OPs\fR
2645 .IX Subsection "Improved support for custom OPs"
2646 .PP
2647 Custom ops can now be registered with the new \f(CW\*(C`custom_op_register\*(C'\fR C
2648 function and the \f(CW\*(C`XOP\*(C'\fR structure. This will make it easier to add new
2649 properties of custom ops in the future. Two new properties have been added
2650 already, \f(CW\*(C`xop_class\*(C'\fR and \f(CW\*(C`xop_peep\*(C'\fR.
2651 .PP
2652 \&\f(CW\*(C`xop_class\*(C'\fR is one of the OA_*OP constants. It allows B and other
2653 introspection mechanisms to work with custom ops
2654 that aren't BASEOPs. \f(CW\*(C`xop_peep\*(C'\fR is a pointer to
2655 a function that will be called for ops of this
2656 type from \f(CW\*(C`Perl_rpeep\*(C'\fR.
2657 .PP
2658 See "Custom Operators" in perlguts and "Custom Operators" in perlapi for more
2659 detail.
2660 .PP
2661 The old \f(CW\*(C`PL_custom_op_names\*(C'\fR/\f(CW\*(C`PL_custom_op_descs\*(C'\fR interface is still
2662 supported but discouraged.
2663 .PP
2664 \fIScope hooks\fR
2665 .IX Subsection "Scope hooks"
2666 .PP
2667 It is now possible for XS code to hook into Perl's lexical scope
2668 mechanism at compile time, using the new \f(CW\*(C`Perl_blockhook_register\*(C'\fR
2669 function. See "Compile-time scope hooks" in perlguts.
2670 .PP
2671 \fIThe recursive part of the peephole optimizer is now hookable\fR
2672 .IX Subsection "The recursive part of the peephole optimizer is now hookable"
2673 .PP
2674 In addition to \f(CW\*(C`PL_peepp\*(C'\fR, for hooking into the toplevel peephole optimizer, a
2675 \&\f(CW\*(C`PL_rpeepp\*(C'\fR is now available to hook into the optimizer recursing into
2676 side-chains of the optree.
2677 .PP
2678 \fINew non-magical variants of existing functions\fR
2679 .IX Subsection "New non-magical variants of existing functions"
2680 .PP
2681 The following functions/macros have been added to the API. The \f(CW*_nomg\fR
2682 macros are equivalent to their non\-\f(CW\*(C`_nomg\*(C'\fR variants, except that they ignore
2683 get-magic. Those ending in \f(CW\*(C`_flags\*(C'\fR allow one to specify whether
2684 get-magic is processed.
2685 .PP
2686 .Vb 8
2687 \& sv_2bool_flags
2688 \& SvTRUE_nomg
2689 \& sv_2nv_flags
2690 \& SvNV_nomg
2691 \& sv_cmp_flags
2692 \& sv_cmp_locale_flags
2693 \& sv_eq_flags
2694 \& sv_collxfrm_flags
2695 .Ve
2696 .PP
2697 In some of these cases, the non\-\f(CW\*(C`_flags\*(C'\fR functions have
2698 been replaced with wrappers around the new functions.
2699 .PP
2700 \fIpv/pvs/sv versions of existing functions\fR
2701 .IX Subsection "pv/pvs/sv versions of existing functions"
2702 .PP
2703 Many functions ending with pvn now have equivalent \f(CW\*(C`pv/pvs/sv\*(C'\fR versions.
2704 .PP
2705 \fIList op-building functions\fR
2706 .IX Subsection "List op-building functions"
2707 .PP
2708 List op-building functions have been added to the
2709 API. See op_append_elem,
2710 op_append_list, and
2711 op_prepend_elem in perlapi.
2712 .PP
2713 \fR\f(CI\*(C`LINKLIST\*(C'\fR\fI\fR
2714 .IX Subsection "LINKLIST"
2715 .PP
2716 The LINKLIST macro, part of op building that
2717 constructs the execution-order op chain, has been added to the API.
2718 .PP
2719 \fILocalisation functions\fR
2720 .IX Subsection "Localisation functions"
2721 .PP
2722 The \f(CW\*(C`save_freeop\*(C'\fR, \f(CW\*(C`save_op\*(C'\fR, \f(CW\*(C`save_pushi32ptr\*(C'\fR and \f(CW\*(C`save_pushptrptr\*(C'\fR
2723 functions have been added to the API.
2724 .PP
2725 \fIStash names\fR
2726 .IX Subsection "Stash names"
2727 .PP
2728 A stash can now have a list of effective names in addition to its usual
2729 name. The first effective name can be accessed via the \f(CW\*(C`HvENAME\*(C'\fR macro,
2730 which is now the recommended name to use in MRO linearisations (\f(CW\*(C`HvNAME\*(C'\fR
2731 being a fallback if there is no \f(CW\*(C`HvENAME\*(C'\fR).
2732 .PP
2733 These names are added and deleted via \f(CW\*(C`hv_ename_add\*(C'\fR and
2734 \&\f(CW\*(C`hv_ename_delete\*(C'\fR. These two functions are \fInot\fR part of the API.
2735 .PP
2736 \fINew functions for finding and removing magic\fR
2737 .IX Subsection "New functions for finding and removing magic"
2738 .PP
2739 The \f(CWmg_findext()\fR and
2740 \&\f(CWsv_unmagicext()\fR
2741 functions have been added to the API.
2742 They allow extension authors to find and remove magic attached to
2743 scalars based on both the magic type and the magic virtual table, similar to how
2744 \&\fBsv_magicext()\fR attaches magic of a certain type and with a given virtual table
2745 to a scalar. This eliminates the need for extensions to walk the list of
2746 \&\f(CW\*(C`MAGIC\*(C'\fR pointers of an \f(CW\*(C`SV\*(C'\fR to find the magic that belongs to them.
2747 .PP
2748 \fR\f(CI\*(C`find_rundefsv\*(C'\fR\fI\fR
2749 .IX Subsection "find_rundefsv"
2750 .PP
2751 This function returns the SV representing \f(CW$_\fR, whether it's lexical
2752 or dynamic.
2753 .PP
2754 \fR\f(CI\*(C`Perl_croak_no_modify\*(C'\fR\fI\fR
2755 .IX Subsection "Perl_croak_no_modify"
2756 .PP
2757 \&\fBPerl_croak_no_modify()\fR is short-hand for
2758 \&\f(CW\*(C`Perl_croak("%s", PL_no_modify)\*(C'\fR.
2759 .PP
2760 \fR\f(CI\*(C`PERL_STATIC_INLINE\*(C'\fR\fI define\fR
2761 .IX Subsection "PERL_STATIC_INLINE define"
2762 .PP
2763 The \f(CW\*(C`PERL_STATIC_INLINE\*(C'\fR define has been added to provide the best-guess
2764 incantation to use for static inline functions, if the C compiler supports
2765 C99\-style static inline. If it doesn't, it'll give a plain \f(CW\*(C`static\*(C'\fR.
2766 .PP
2767 \&\f(CW\*(C`HAS_STATIC_INLINE\*(C'\fR can be used to check if the compiler actually supports
2768 inline functions.
2769 .PP
2770 \fINew \fR\f(CI\*(C`pv_escape\*(C'\fR\fI option for hexadecimal escapes\fR
2771 .IX Subsection "New pv_escape option for hexadecimal escapes"
2772 .PP
2773 A new option, \f(CW\*(C`PERL_PV_ESCAPE_NONASCII\*(C'\fR, has been added to \f(CW\*(C`pv_escape\*(C'\fR to
2774 dump all characters above ASCII in hexadecimal. Before, one could get all
2775 characters as hexadecimal or the Latin1 non-ASCII as octal.
2776 .PP
2777 \fR\f(CI\*(C`lex_start\*(C'\fR\fI\fR
2778 .IX Subsection "lex_start"
2779 .PP
2780 \&\f(CW\*(C`lex_start\*(C'\fR has been added to the API, but is considered experimental.
2781 .PP
2782 \fR\f(BIop_scope()\fR\fI and \fR\f(BIop_lvalue()\fR\fI\fR
2783 .IX Subsection "op_scope() and op_lvalue()"
2784 .PP
2785 The \fBop_scope()\fR and \fBop_lvalue()\fR functions have been added to the API,
2786 but are considered experimental.
2787 .SS "C API Changes"
2788 .IX Subsection "C API Changes"
2789 \fR\f(CI\*(C`PERL_POLLUTE\*(C'\fR\fI has been removed\fR
2790 .IX Subsection "PERL_POLLUTE has been removed"
2791 .PP
2792 The option to define \f(CW\*(C`PERL_POLLUTE\*(C'\fR to expose older 5.005 symbols for
2793 backwards compatibility has been removed. Its use was always discouraged,
2794 and MakeMaker contains a more specific escape hatch:
2795 .PP
2796 .Vb 1
2797 \& perl Makefile.PL POLLUTE=1
2798 .Ve
2799 .PP
2800 This can be used for modules that have not been upgraded to 5.6 naming
2801 conventions (and really should be completely obsolete by now).
2802 .PP
2803 \fICheck API compatibility when loading XS modules\fR
2804 .IX Subsection "Check API compatibility when loading XS modules"
2805 .PP
2806 When Perl's API changes in incompatible ways (which usually happens between
2807 major releases), XS modules compiled for previous versions of Perl will no
2808 longer work. They need to be recompiled against the new Perl.
2809 .PP
2810 The \f(CW\*(C`XS_APIVERSION_BOOTCHECK\*(C'\fR macro has been added to ensure that modules
2811 are recompiled and to prevent users from accidentally loading modules
2812 compiled for old perls into newer perls. That macro, which is called when
2813 loading every newly compiled extension, compares the API version of the
2814 running perl with the version a module has been compiled for and raises an
2815 exception if they don't match.
2816 .PP
2817 \fIPerl_fetch_cop_label\fR
2818 .IX Subsection "Perl_fetch_cop_label"
2819 .PP
2820 The first argument of the C API function \f(CW\*(C`Perl_fetch_cop_label\*(C'\fR has changed
2821 from \f(CW\*(C`struct refcounted_he *\*(C'\fR to \f(CW\*(C`COP *\*(C'\fR, to insulate the user from
2822 implementation details.
2823 .PP
2824 This API function was marked as "may change", and likely isn't in use outside
2825 the core. (Neither an unpacked CPAN nor Google's codesearch finds any other
2826 references to it.)
2827 .PP
2828 \fR\f(BIGvCV()\fR\fI and \fR\f(BIGvGP()\fR\fI are no longer lvalues\fR
2829 .IX Subsection "GvCV() and GvGP() are no longer lvalues"
2830 .PP
2831 The new \fBGvCV_set()\fR and \fBGvGP_set()\fR macros are now provided to replace
2832 assignment to those two macros.
2833 .PP
2834 This allows a future commit to eliminate some backref magic between GV
2835 and CVs, which will require complete control over assignment to the
2836 \&\f(CW\*(C`gp_cv\*(C'\fR slot.
2837 .PP
2838 \fR\f(BICvGV()\fR\fI is no longer an lvalue\fR
2839 .IX Subsection "CvGV() is no longer an lvalue"
2840 .PP
2841 Under some circumstances, the \fBCvGV()\fR field of a CV is now
2842 reference-counted. To ensure consistent behaviour, direct assignment to
2843 it, for example \f(CW\*(C`CvGV(cv) = gv\*(C'\fR is now a compile-time error. A new macro,
2844 \&\f(CW\*(C`CvGV_set(cv,gv)\*(C'\fR has been introduced to run this operation
2845 safely. Note that modification of this field is not part of the public
2846 API, regardless of this new macro (and despite its being listed in this section).
2847 .PP
2848 \fR\f(BICvSTASH()\fR\fI is no longer an lvalue\fR
2849 .IX Subsection "CvSTASH() is no longer an lvalue"
2850 .PP
2851 The \fBCvSTASH()\fR macro can now only be used as an rvalue. \fBCvSTASH_set()\fR
2852 has been added to replace assignment to \fBCvSTASH()\fR. This is to ensure
2853 that backreferences are handled properly. These macros are not part of the
2854 API.
2855 .PP
2856 \fICalling conventions for \fR\f(CI\*(C`newFOROP\*(C'\fR\fI and \fR\f(CI\*(C`newWHILEOP\*(C'\fR
2857 .IX Subsection "Calling conventions for newFOROP and newWHILEOP"
2858 .PP
2859 The way the parser handles labels has been cleaned up and refactored. As a
2860 result, the \fBnewFOROP()\fR constructor function no longer takes a parameter
2861 stating what label is to go in the state op.
2862 .PP
2863 The \fBnewWHILEOP()\fR and \fBnewFOROP()\fR functions no longer accept a line
2864 number as a parameter.
2865 .PP
2866 \fIFlags passed to \fR\f(CI\*(C`uvuni_to_utf8_flags\*(C'\fR\fI and \fR\f(CI\*(C`utf8n_to_uvuni\*(C'\fR
2867 .IX Subsection "Flags passed to uvuni_to_utf8_flags and utf8n_to_uvuni"
2868 .PP
2869 Some of the flags parameters to \fBuvuni_to_utf8_flags()\fR and
2870 \&\fButf8n_to_uvuni()\fR have changed. This is a result of Perl's now allowing
2871 internal storage and manipulation of code points that are problematic
2872 in some situations. Hence, the default actions for these functions has
2873 been complemented to allow these code points. The new flags are
2874 documented in perlapi. Code that requires the problematic code
2875 points to be rejected needs to change to use the new flags. Some flag
2876 names are retained for backward source compatibility, though they do
2877 nothing, as they are now the default. However the flags
2878 \&\f(CW\*(C`UNICODE_ALLOW_FDD0\*(C'\fR, \f(CW\*(C`UNICODE_ALLOW_FFFF\*(C'\fR, \f(CW\*(C`UNICODE_ILLEGAL\*(C'\fR, and
2879 \&\f(CW\*(C`UNICODE_IS_ILLEGAL\*(C'\fR have been removed, as they stem from a
2880 fundamentally broken model of how the Unicode non-character code points
2881 should be handled, which is now described in
2882 "Non-character code points" in perlunicode. See also the Unicode section
2883 under "Selected Bug Fixes".
2884 .SS "Deprecated C APIs"
2885 .IX Subsection "Deprecated C APIs"
2886 .ie n .IP """Perl_ptr_table_clear""" 4
2887 .el .IP \f(CWPerl_ptr_table_clear\fR 4
2888 .IX Item "Perl_ptr_table_clear"
2889 \&\f(CW\*(C`Perl_ptr_table_clear\*(C'\fR is no longer part of Perl's public API. Calling it
2890 now generates a deprecation warning, and it will be removed in a future
2891 release.
2892 .ie n .IP """sv_compile_2op""" 4
2893 .el .IP \f(CWsv_compile_2op\fR 4
2894 .IX Item "sv_compile_2op"
2895 The \fBsv_compile_2op()\fR API function is now deprecated. Searches suggest
2896 that nothing on CPAN is using it, so this should have zero impact.
2897 .Sp
2898 It attempted to provide an API to compile code down to an optree, but failed
2899 to bind correctly to lexicals in the enclosing scope. It's not possible to
2900 fix this problem within the constraints of its parameters and return value.
2901 .ie n .IP """find_rundefsvoffset""" 4
2902 .el .IP \f(CWfind_rundefsvoffset\fR 4
2903 .IX Item "find_rundefsvoffset"
2904 The \f(CW\*(C`find_rundefsvoffset\*(C'\fR function has been deprecated. It appeared that
2905 its design was insufficient for reliably getting the lexical \f(CW$_\fR at
2906 run-time.
2907 .Sp
2908 Use the new \f(CW\*(C`find_rundefsv\*(C'\fR function or the \f(CW\*(C`UNDERBAR\*(C'\fR macro
2909 instead. They directly return the right SV
2910 representing \f(CW$_\fR, whether it's
2911 lexical or dynamic.
2912 .ie n .IP """CALL_FPTR"" and ""CPERLscope""" 4
2913 .el .IP "\f(CWCALL_FPTR\fR and \f(CWCPERLscope\fR" 4
2914 .IX Item "CALL_FPTR and CPERLscope"
2915 Those are left from an old implementation of \f(CW\*(C`MULTIPLICITY\*(C'\fR using C++ objects,
2916 which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so
2917 they shouldn't be used anymore.
2918 .Sp
2919 For compatibility, they are still defined for external \f(CW\*(C`XS\*(C'\fR code. Only
2920 extensions defining \f(CW\*(C`PERL_CORE\*(C'\fR must be updated now.
2921 .SS "Other Internal Changes"
2922 .IX Subsection "Other Internal Changes"
2923 \fIStack unwinding\fR
2924 .IX Subsection "Stack unwinding"
2925 .PP
2926 The protocol for unwinding the C stack at the last stage of a \f(CW\*(C`die\*(C'\fR
2927 has changed how it identifies the target stack frame. This now uses
2928 a separate variable \f(CW\*(C`PL_restartjmpenv\*(C'\fR, where previously it relied on
2929 the \f(CW\*(C`blk_eval.cur_top_env\*(C'\fR pointer in the \f(CW\*(C`eval\*(C'\fR context frame that
2930 has nominally just been discarded. This change means that code running
2931 during various stages of Perl-level unwinding no longer needs to take
2932 care to avoid destroying the ghost frame.
2933 .PP
2934 \fIScope stack entries\fR
2935 .IX Subsection "Scope stack entries"
2936 .PP
2937 The format of entries on the scope stack has been changed, resulting in a
2938 reduction of memory usage of about 10%. In particular, the memory used by
2939 the scope stack to record each active lexical variable has been halved.
2940 .PP
2941 \fIMemory allocation for pointer tables\fR
2942 .IX Subsection "Memory allocation for pointer tables"
2943 .PP
2944 Memory allocation for pointer tables has been changed. Previously
2945 \&\f(CW\*(C`Perl_ptr_table_store\*(C'\fR allocated memory from the same arena system as
2946 \&\f(CW\*(C`SV\*(C'\fR bodies and \f(CW\*(C`HE\*(C'\fRs, with freed memory remaining bound to those arenas
2947 until interpreter exit. Now it allocates memory from arenas private to the
2948 specific pointer table, and that memory is returned to the system when
2949 \&\f(CW\*(C`Perl_ptr_table_free\*(C'\fR is called. Additionally, allocation and release are
2950 both less CPU intensive.
2951 .PP
2952 \fR\f(CI\*(C`UNDERBAR\*(C'\fR\fI\fR
2953 .IX Subsection "UNDERBAR"
2954 .PP
2955 The \f(CW\*(C`UNDERBAR\*(C'\fR macro now calls \f(CW\*(C`find_rundefsv\*(C'\fR. \f(CW\*(C`dUNDERBAR\*(C'\fR is now a
2956 noop but should still be used to ensure past and future compatibility.
2957 .PP
2958 \fIString comparison routines renamed\fR
2959 .IX Subsection "String comparison routines renamed"
2960 .PP
2961 The \f(CW\*(C`ibcmp_*\*(C'\fR functions have been renamed and are now called \f(CW\*(C`foldEQ\*(C'\fR,
2962 \&\f(CW\*(C`foldEQ_locale\*(C'\fR, and \f(CW\*(C`foldEQ_utf8\*(C'\fR. The old names are still available as
2963 macros.
2964 .PP
2965 \fR\f(CI\*(C`chop\*(C'\fR\fI and \fR\f(CI\*(C`chomp\*(C'\fR\fI implementations merged\fR
2966 .IX Subsection "chop and chomp implementations merged"
2967 .PP
2968 The opcode bodies for \f(CW\*(C`chop\*(C'\fR and \f(CW\*(C`chomp\*(C'\fR and for \f(CW\*(C`schop\*(C'\fR and \f(CW\*(C`schomp\*(C'\fR
2969 have been merged. The implementation functions \fBPerl_do_chop()\fR and
2970 \&\fBPerl_do_chomp()\fR, never part of the public API, have been merged and
2971 moved to a static function in \fIpp.c\fR. This shrinks the Perl binary
2972 slightly, and should not affect any code outside the core (unless it is
2973 relying on the order of side-effects when \f(CW\*(C`chomp\*(C'\fR is passed a \fIlist\fR of
2974 values).
2975 .SH "Selected Bug Fixes"
2976 .IX Header "Selected Bug Fixes"
2977 .SS I/O
2978 .IX Subsection "I/O"
2979 .IP \(bu 4
2980 Perl no longer produces this warning:
2981 .Sp
2982 .Vb 2
2983 \& $ perl \-we \*(Aqopen(my $f, ">", \emy $x); binmode($f, "scalar")\*(Aq
2984 \& Use of uninitialized value in binmode at \-e line 1.
2985 .Ve
2986 .IP \(bu 4
2987 Opening a glob reference via \f(CW\*(C`open($fh, ">", \e*glob)\*(C'\fR no longer
2988 causes the glob to be corrupted when the filehandle is printed to. This would
2989 cause Perl to crash whenever the glob's contents were accessed
2990 [perl #77492].
2991 .IP \(bu 4
2992 PerlIO no longer crashes when called recursively, such as from a signal
2993 handler. Now it just leaks memory [perl #75556].
2994 .IP \(bu 4
2995 Most I/O functions were not warning for unopened handles unless the
2996 "closed" and "unopened" warnings categories were both enabled. Now only
2997 \&\f(CW\*(C`use warnings \*(Aqunopened\*(Aq\*(C'\fR is necessary to trigger these warnings, as
2998 had always been the intention.
2999 .IP \(bu 4
3000 There have been several fixes to PerlIO layers:
3001 .Sp
3002 When \f(CW\*(C`binmode(FH, ":crlf")\*(C'\fR pushes the \f(CW\*(C`:crlf\*(C'\fR layer on top of the stack,
3003 it no longer enables crlf layers lower in the stack so as to avoid
3004 unexpected results [perl #38456].
3005 .Sp
3006 Opening a file in \f(CW\*(C`:raw\*(C'\fR mode now does what it advertises to do (first
3007 open the file, then \f(CW\*(C`binmode\*(C'\fR it), instead of simply leaving off the top
3008 layer [perl #80764].
3009 .Sp
3010 The three layers \f(CW\*(C`:pop\*(C'\fR, \f(CW\*(C`:utf8\*(C'\fR, and \f(CW\*(C`:bytes\*(C'\fR didn't allow stacking when
3011 opening a file. For example
3012 this:
3013 .Sp
3014 .Vb 1
3015 \& open(FH, ">:pop:perlio", "some.file") or die $!;
3016 .Ve
3017 .Sp
3018 would throw an "Invalid argument" error. This has been fixed in this
3019 release [perl #82484].
3020 .SS "Regular Expression Bug Fixes"
3021 .IX Subsection "Regular Expression Bug Fixes"
3022 .IP \(bu 4
3023 The regular expression engine no longer loops when matching
3024 \&\f(CW\*(C`"\eN{LATIN SMALL LIGATURE FF}" =~ /f+/i\*(C'\fR and similar expressions
3025 [perl #72998] (5.12.1).
3026 .IP \(bu 4
3027 The trie runtime code should no longer allocate massive amounts of memory,
3028 fixing #74484.
3029 .IP \(bu 4
3030 Syntax errors in \f(CW\*(C`(?{...})\*(C'\fR blocks no longer cause panic messages
3031 [perl #2353].
3032 .IP \(bu 4
3033 A pattern like \f(CW\*(C`(?:(o){2})?\*(C'\fR no longer causes a "panic" error
3034 [perl #39233].
3035 .IP \(bu 4
3036 A fatal error in regular expressions containing \f(CW\*(C`(.*?)\*(C'\fR when processing
3037 UTF\-8 data has been fixed [perl #75680] (5.12.2).
3038 .IP \(bu 4
3039 An erroneous regular expression engine optimisation that caused regex verbs like
3040 \&\f(CW*COMMIT\fR sometimes to be ignored has been removed.
3041 .IP \(bu 4
3042 The regular expression bracketed character class \f(CW\*(C`[\e8\e9]\*(C'\fR was effectively the
3043 same as \f(CW\*(C`[89\e000]\*(C'\fR, incorrectly matching a NULL character. It also gave
3044 incorrect warnings that the \f(CW8\fR and \f(CW9\fR were ignored. Now \f(CW\*(C`[\e8\e9]\*(C'\fR is the
3045 same as \f(CW\*(C`[89]\*(C'\fR and gives legitimate warnings that \f(CW\*(C`\e8\*(C'\fR and \f(CW\*(C`\e9\*(C'\fR are
3046 unrecognized escape sequences, passed-through.
3047 .IP \(bu 4
3048 A regular expression match in the right-hand side of a global substitution
3049 (\f(CW\*(C`s///g\*(C'\fR) that is in the same scope will no longer cause match variables
3050 to have the wrong values on subsequent iterations. This can happen when an
3051 array or hash subscript is interpolated in the right-hand side, as in
3052 \&\f(CW\*(C`s|(.)|@a{ print($1), /./ }|g\*(C'\fR [perl #19078].
3053 .IP \(bu 4
3054 Several cases in which characters in the Latin\-1 non-ASCII range (0x80 to
3055 0xFF) used not to match themselves, or used to match both a character class
3056 and its complement, have been fixed. For instance, U+00E2 could match both
3057 \&\f(CW\*(C`\ew\*(C'\fR and \f(CW\*(C`\eW\*(C'\fR [perl #78464] [perl #18281] [perl #60156].
3058 .IP \(bu 4
3059 Matching a Unicode character against an alternation containing characters
3060 that happened to match continuation bytes in the former's UTF8
3061 representation (like \f(CW\*(C`qq{\ex{30ab}} =~ /\exab|\exa9/\*(C'\fR) would cause erroneous
3062 warnings [perl #70998].
3063 .IP \(bu 4
3064 The trie optimisation was not taking empty groups into account, preventing
3065 "foo" from matching \f(CW\*(C`/\eA(?:(?:)foo|bar|zot)\ez/\*(C'\fR [perl #78356].
3066 .IP \(bu 4
3067 A pattern containing a \f(CW\*(C`+\*(C'\fR inside a lookahead would sometimes cause an
3068 incorrect match failure in a global match (for example, \f(CW\*(C`/(?=(\eS+))/g\*(C'\fR)
3069 [perl #68564].
3070 .IP \(bu 4
3071 A regular expression optimisation would sometimes cause a match with a
3072 \&\f(CW\*(C`{n,m}\*(C'\fR quantifier to fail when it should have matched [perl #79152].
3073 .IP \(bu 4
3074 Case-insensitive matching in regular expressions compiled under
3075 \&\f(CW\*(C`use locale\*(C'\fR now works much more sanely when the pattern or target
3076 string is internally encoded in UTF8. Previously, under these
3077 conditions the localeness was completely lost. Now, code points
3078 above 255 are treated as Unicode, but code points between 0 and 255
3079 are treated using the current locale rules, regardless of whether
3080 the pattern or the string is encoded in UTF8. The few case-insensitive
3081 matches that cross the 255/256 boundary are not allowed. For
3082 example, 0xFF does not caselessly match the character at 0x178,
3083 LATIN CAPITAL LETTER Y WITH DIAERESIS, because 0xFF may not be LATIN
3084 SMALL LETTER Y in the current locale, and Perl has no way of knowing
3085 if that character even exists in the locale, much less what code
3086 point it is.
3087 .IP \(bu 4
3088 The \f(CW\*(C`(?|...)\*(C'\fR regular expression construct no longer crashes if the final
3089 branch has more sets of capturing parentheses than any other branch. This
3090 was fixed in Perl 5.10.1 for the case of a single branch, but that fix did
3091 not take multiple branches into account [perl #84746].
3092 .IP \(bu 4
3093 A bug has been fixed in the implementation of \f(CW\*(C`{...}\*(C'\fR quantifiers in
3094 regular expressions that prevented the code block in
3095 \&\f(CW\*(C`/((\ew+)(?{ print $2 })){2}/\*(C'\fR from seeing the \f(CW$2\fR sometimes
3096 [perl #84294].
3097 .SS "Syntax/Parsing Bugs"
3098 .IX Subsection "Syntax/Parsing Bugs"
3099 .IP \(bu 4
3100 \&\f(CW\*(C`when (scalar) {...}\*(C'\fR no longer crashes, but produces a syntax error
3101 [perl #74114] (5.12.1).
3102 .IP \(bu 4
3103 A label right before a string eval (\f(CW\*(C`foo: eval $string\*(C'\fR) no longer causes
3104 the label to be associated also with the first statement inside the eval
3105 [perl #74290] (5.12.1).
3106 .IP \(bu 4
3107 The \f(CW\*(C`no 5.13.2\*(C'\fR form of \f(CW\*(C`no\*(C'\fR no longer tries to turn on features or
3108 pragmata (like strict) [perl #70075] (5.12.2).
3109 .IP \(bu 4
3110 \&\f(CW\*(C`BEGIN {require 5.12.0}\*(C'\fR now behaves as documented, rather than behaving
3111 identically to \f(CW\*(C`use 5.12.0\*(C'\fR. Previously, \f(CW\*(C`require\*(C'\fR in a \f(CW\*(C`BEGIN\*(C'\fR block
3112 was erroneously executing the \f(CW\*(C`use feature \*(Aq:5.12.0\*(Aq\*(C'\fR and
3113 \&\f(CW\*(C`use strict\*(C'\fR behaviour, which only \f(CW\*(C`use\*(C'\fR was documented to
3114 provide [perl #69050].
3115 .IP \(bu 4
3116 A regression introduced in Perl 5.12.0, making
3117 \&\f(CW\*(C`my $x = 3; $x = length(undef)\*(C'\fR result in \f(CW$x\fR set to \f(CW3\fR has been
3118 fixed. \f(CW$x\fR will now be \f(CW\*(C`undef\*(C'\fR [perl #85508] (5.12.2).
3119 .IP \(bu 4
3120 When strict "refs" mode is off, \f(CW\*(C`%{...}\*(C'\fR in rvalue context returns
3121 \&\f(CW\*(C`undef\*(C'\fR if its argument is undefined. An optimisation introduced in Perl
3122 5.12.0 to make \f(CW\*(C`keys %{...}\*(C'\fR faster when used as a boolean did not take
3123 this into account, causing \f(CW\*(C`keys %{+undef}\*(C'\fR (and \f(CW\*(C`keys %$foo\*(C'\fR when
3124 \&\f(CW$foo\fR is undefined) to be an error, which it should be so in strict
3125 mode only [perl #81750].
3126 .IP \(bu 4
3127 Constant-folding used to cause
3128 .Sp
3129 .Vb 1
3130 \& $text =~ ( 1 ? /phoo/ : /bear/)
3131 .Ve
3132 .Sp
3133 to turn into
3134 .Sp
3135 .Vb 1
3136 \& $text =~ /phoo/
3137 .Ve
3138 .Sp
3139 at compile time. Now it correctly matches against \f(CW$_\fR [perl #20444].
3140 .IP \(bu 4
3141 Parsing Perl code (either with string \f(CW\*(C`eval\*(C'\fR or by loading modules) from
3142 within a \f(CW\*(C`UNITCHECK\*(C'\fR block no longer causes the interpreter to crash
3143 [perl #70614].
3144 .IP \(bu 4
3145 String \f(CW\*(C`eval\*(C'\fRs no longer fail after 2 billion scopes have been
3146 compiled [perl #83364].
3147 .IP \(bu 4
3148 The parser no longer hangs when encountering certain Unicode characters,
3149 such as U+387 [perl #74022].
3150 .IP \(bu 4
3151 Defining a constant with the same name as one of Perl's special blocks
3152 (like \f(CW\*(C`INIT\*(C'\fR) stopped working in 5.12.0, but has now been fixed
3153 [perl #78634].
3154 .IP \(bu 4
3155 A reference to a literal value used as a hash key (\f(CW$hash{\e"foo"}\fR) used
3156 to be stringified, even if the hash was tied [perl #79178].
3157 .IP \(bu 4
3158 A closure containing an \f(CW\*(C`if\*(C'\fR statement followed by a constant or variable
3159 is no longer treated as a constant [perl #63540].
3160 .IP \(bu 4
3161 \&\f(CW\*(C`state\*(C'\fR can now be used with attributes. It
3162 used to mean the same thing as
3163 \&\f(CW\*(C`my\*(C'\fR if any attributes were present [perl #68658].
3164 .IP \(bu 4
3165 Expressions like \f(CW\*(C`@$a > 3\*(C'\fR no longer cause \f(CW$a\fR to be mentioned in
3166 the "Use of uninitialized value in numeric gt" warning when \f(CW$a\fR is
3167 undefined (since it is not part of the \f(CW\*(C`>\*(C'\fR expression, but the operand
3168 of the \f(CW\*(C`@\*(C'\fR) [perl #72090].
3169 .IP \(bu 4
3170 Accessing an element of a package array with a hard-coded number (as
3171 opposed to an arbitrary expression) would crash if the array did not exist.
3172 Usually the array would be autovivified during compilation, but typeglob
3173 manipulation could remove it, as in these two cases which used to crash:
3174 .Sp
3175 .Vb 2
3176 \& *d = *a; print $d[0];
3177 \& undef *d; print $d[0];
3178 .Ve
3179 .IP \(bu 4
3180 The \fB\-C\fR command-line option, when used on the shebang line, can now be
3181 followed by other options [perl #72434].
3182 .IP \(bu 4
3183 The \f(CW\*(C`B\*(C'\fR module was returning \f(CW\*(C`B::OP\*(C'\fRs instead of \f(CW\*(C`B::LOGOP\*(C'\fRs for
3184 \&\f(CW\*(C`entertry\*(C'\fR [perl #80622]. This was due to a bug in the Perl core,
3185 not in \f(CW\*(C`B\*(C'\fR itself.
3186 .SS "Stashes, Globs and Method Lookup"
3187 .IX Subsection "Stashes, Globs and Method Lookup"
3188 Perl 5.10.0 introduced a new internal mechanism for caching MROs (method
3189 resolution orders, or lists of parent classes; aka "isa" caches) to make
3190 method lookup faster (so \f(CW@ISA\fR arrays would not have to be searched
3191 repeatedly). Unfortunately, this brought with it quite a few bugs. Almost
3192 all of these have been fixed now, along with a few MRO-related bugs that
3193 existed before 5.10.0:
3194 .IP \(bu 4
3195 The following used to have erratic effects on method resolution, because
3196 the "isa" caches were not reset or otherwise ended up listing the wrong
3197 classes. These have been fixed.
3198 .RS 4
3199 .IP "Aliasing packages by assigning to globs [perl #77358]" 4
3200 .IX Item "Aliasing packages by assigning to globs [perl #77358]"
3201 .PD 0
3202 .IP "Deleting packages by deleting their containing stash elements" 4
3203 .IX Item "Deleting packages by deleting their containing stash elements"
3204 .ie n .IP "Undefining the glob containing a package (""undef *Foo::"")" 4
3205 .el .IP "Undefining the glob containing a package (\f(CWundef *Foo::\fR)" 4
3206 .IX Item "Undefining the glob containing a package (undef *Foo::)"
3207 .ie n .IP "Undefining an ISA glob (""undef *Foo::ISA"")" 4
3208 .el .IP "Undefining an ISA glob (\f(CWundef *Foo::ISA\fR)" 4
3209 .IX Item "Undefining an ISA glob (undef *Foo::ISA)"
3210 .ie n .IP "Deleting an ISA stash element (""delete $Foo::{ISA}"")" 4
3211 .el .IP "Deleting an ISA stash element (\f(CWdelete $Foo::{ISA}\fR)" 4
3212 .IX Item "Deleting an ISA stash element (delete $Foo::{ISA})"
3213 .ie n .IP "Sharing @ISA arrays between classes (via ""*Foo::ISA = \e@Bar::ISA"" or ""*Foo::ISA = *Bar::ISA"") [perl #77238]" 4
3214 .el .IP "Sharing \f(CW@ISA\fR arrays between classes (via \f(CW*Foo::ISA = \e@Bar::ISA\fR or \f(CW*Foo::ISA = *Bar::ISA\fR) [perl #77238]" 4
3215 .IX Item "Sharing @ISA arrays between classes (via *Foo::ISA = @Bar::ISA or *Foo::ISA = *Bar::ISA) [perl #77238]"
3216 .RE
3217 .RS 4
3218 .PD
3219 .Sp
3220 \&\f(CW\*(C`undef *Foo::ISA\*(C'\fR would even stop a new \f(CW@Foo::ISA\fR array from updating
3221 caches.
3222 .RE
3223 .IP \(bu 4
3224 Typeglob assignments would crash if the glob's stash no longer existed, so
3225 long as the glob assigned to were named \f(CW\*(C`ISA\*(C'\fR or the glob on either side of
3226 the assignment contained a subroutine.
3227 .IP \(bu 4
3228 \&\f(CW\*(C`PL_isarev\*(C'\fR, which is accessible to Perl via \f(CW\*(C`mro::get_isarev\*(C'\fR is now
3229 updated properly when packages are deleted or removed from the \f(CW@ISA\fR of
3230 other classes. This allows many packages to be created and deleted without
3231 causing a memory leak [perl #75176].
3232 .PP
3233 In addition, various other bugs related to typeglobs and stashes have been
3234 fixed:
3235 .IP \(bu 4
3236 Some work has been done on the internal pointers that link between symbol
3237 tables (stashes), typeglobs, and subroutines. This has the effect that
3238 various edge cases related to deleting stashes or stash entries (for example,
3239 <%FOO:: = ()>), and complex typeglob or code-reference aliasing, will no
3240 longer crash the interpreter.
3241 .IP \(bu 4
3242 Assigning a reference to a glob copy now assigns to a glob slot instead of
3243 overwriting the glob with a scalar [perl #1804] [perl #77508].
3244 .IP \(bu 4
3245 A bug when replacing the glob of a loop variable within the loop has been fixed
3246 [perl #21469]. This
3247 means the following code will no longer crash:
3248 .Sp
3249 .Vb 3
3250 \& for $x (...) {
3251 \& *x = *y;
3252 \& }
3253 .Ve
3254 .IP \(bu 4
3255 Assigning a glob to a PVLV used to convert it to a plain string. Now it
3256 works correctly, and a PVLV can hold a glob. This would happen when a
3257 nonexistent hash or array element was passed to a subroutine:
3258 .Sp
3259 .Vb 2
3260 \& sub { $_[0] = *foo }\->($hash{key});
3261 \& # $_[0] would have been the string "*main::foo"
3262 .Ve
3263 .Sp
3264 It also happened when a glob was assigned to, or returned from, an element
3265 of a tied array or hash [perl #36051].
3266 .IP \(bu 4
3267 When trying to report \f(CW\*(C`Use of uninitialized value $Foo::BAR\*(C'\fR, crashes could
3268 occur if the glob holding the global variable in question had been detached
3269 from its original stash by, for example, \f(CW\*(C`delete $::{"Foo::"}\*(C'\fR. This has
3270 been fixed by disabling the reporting of variable names in those
3271 cases.
3272 .IP \(bu 4
3273 During the restoration of a localised typeglob on scope exit, any
3274 destructors called as a result would be able to see the typeglob in an
3275 inconsistent state, containing freed entries, which could result in a
3276 crash. This would affect code like this:
3277 .Sp
3278 .Vb 5
3279 \& local *@;
3280 \& eval { die bless [] }; # puts an object in $@
3281 \& sub DESTROY {
3282 \& local $@; # boom
3283 \& }
3284 .Ve
3285 .Sp
3286 Now the glob entries are cleared before any destructors are called. This
3287 also means that destructors can vivify entries in the glob. So Perl tries
3288 again and, if the entries are re-created too many times, dies with a
3289 "panic: gp_free ..." error message.
3290 .IP \(bu 4
3291 If a typeglob is freed while a subroutine attached to it is still
3292 referenced elsewhere, the subroutine is renamed to \f(CW\*(C`_\|_ANON_\|_\*(C'\fR in the same
3293 package, unless the package has been undefined, in which case the \f(CW\*(C`_\|_ANON_\|_\*(C'\fR
3294 package is used. This could cause packages to be sometimes autovivified,
3295 such as if the package had been deleted. Now this no longer occurs.
3296 The \f(CW\*(C`_\|_ANON_\|_\*(C'\fR package is also now used when the original package is
3297 no longer attached to the symbol table. This avoids memory leaks in some
3298 cases [perl #87664].
3299 .IP \(bu 4
3300 Subroutines and package variables inside a package whose name ends with
3301 \&\f(CW\*(C`::\*(C'\fR can now be accessed with a fully qualified name.
3302 .SS Unicode
3303 .IX Subsection "Unicode"
3304 .IP \(bu 4
3305 What has become known as "the Unicode Bug" is almost completely resolved in
3306 this release. Under \f(CW\*(C`use feature \*(Aqunicode_strings\*(Aq\*(C'\fR (which is
3307 automatically selected by \f(CW\*(C`use 5.012\*(C'\fR and above), the internal
3308 storage format of a string no longer affects the external semantics.
3309 [perl #58182].
3310 .Sp
3311 There are two known exceptions:
3312 .RS 4
3313 .IP 1. 4
3314 The now-deprecated, user-defined case-changing
3315 functions require utf8\-encoded strings to operate. The CPAN module
3316 Unicode::Casing has been written to replace this feature without its
3317 drawbacks, and the feature is scheduled to be removed in 5.16.
3318 .IP 2. 4
3319 \&\fBquotemeta()\fR (and its in-line equivalent \f(CW\*(C`\eQ\*(C'\fR) can also give different
3320 results depending on whether a string is encoded in UTF\-8. See
3321 "The "Unicode Bug"" in perlunicode.
3322 .RE
3323 .RS 4
3324 .RE
3325 .IP \(bu 4
3326 Handling of Unicode non-character code points has changed.
3327 Previously they were mostly considered illegal, except that in some
3328 place only one of the 66 of them was known. The Unicode Standard
3329 considers them all legal, but forbids their "open interchange".
3330 This is part of the change to allow internal use of any code
3331 point (see "Core Enhancements"). Together, these changes resolve
3332 [perl #38722], [perl #51918], [perl #51936], and [perl #63446].
3333 .IP \(bu 4
3334 Case-insensitive \f(CW"/i"\fR regular expression matching of Unicode
3335 characters that match multiple characters now works much more as
3336 intended. For example
3337 .Sp
3338 .Vb 1
3339 \& "\eN{LATIN SMALL LIGATURE FFI}" =~ /ffi/ui
3340 .Ve
3341 .Sp
3342 and
3343 .Sp
3344 .Vb 1
3345 \& "ffi" =~ /\eN{LATIN SMALL LIGATURE FFI}/ui
3346 .Ve
3347 .Sp
3348 are both true. Previously, there were many bugs with this feature.
3349 What hasn't been fixed are the places where the pattern contains the
3350 multiple characters, but the characters are split up by other things,
3351 such as in
3352 .Sp
3353 .Vb 1
3354 \& "\eN{LATIN SMALL LIGATURE FFI}" =~ /(f)(f)i/ui
3355 .Ve
3356 .Sp
3357 or
3358 .Sp
3359 .Vb 1
3360 \& "\eN{LATIN SMALL LIGATURE FFI}" =~ /ffi*/ui
3361 .Ve
3362 .Sp
3363 or
3364 .Sp
3365 .Vb 1
3366 \& "\eN{LATIN SMALL LIGATURE FFI}" =~ /[a\-f][f\-m][g\-z]/ui
3367 .Ve
3368 .Sp
3369 None of these match.
3370 .Sp
3371 Also, this matching doesn't fully conform to the current Unicode
3372 Standard, which asks that the matching be made upon the NFD
3373 (Normalization Form Decomposed) of the text. However, as of this
3374 writing (April 2010), the Unicode Standard is currently in flux about
3375 what they will recommend doing with regard in such scenarios. It may be
3376 that they will throw out the whole concept of multi-character matches.
3377 [perl #71736].
3378 .IP \(bu 4
3379 Naming a deprecated character in \f(CW\*(C`\eN{\fR\f(CINAME\fR\f(CW}\*(C'\fR no longer leaks memory.
3380 .IP \(bu 4
3381 We fixed a bug that could cause \f(CW\*(C`\eN{\fR\f(CINAME\fR\f(CW}\*(C'\fR constructs followed by
3382 a single \f(CW"."\fR to be parsed incorrectly [perl #74978] (5.12.1).
3383 .IP \(bu 4
3384 \&\f(CW\*(C`chop\*(C'\fR now correctly handles characters above \f(CW"\ex{7fffffff}"\fR
3385 [perl #73246].
3386 .IP \(bu 4
3387 Passing to \f(CW\*(C`index\*(C'\fR an offset beyond the end of the string when the string
3388 is encoded internally in UTF8 no longer causes panics [perl #75898].
3389 .IP \(bu 4
3390 \&\fBwarn()\fR and \fBdie()\fR now respect utf8\-encoded scalars [perl #45549].
3391 .IP \(bu 4
3392 Sometimes the UTF8 length cache would not be reset on a value
3393 returned by substr, causing \f(CW\*(C`length(substr($uni_string, ...))\*(C'\fR to give
3394 wrong answers. With \f(CW\*(C`${^UTF8CACHE}\*(C'\fR set to \-1, it would also produce
3395 a "panic" error message [perl #77692].
3396 .SS "Ties, Overloading and Other Magic"
3397 .IX Subsection "Ties, Overloading and Other Magic"
3398 .IP \(bu 4
3399 Overloading now works properly in conjunction with tied
3400 variables. What formerly happened was that most ops checked their
3401 arguments for overloading \fIbefore\fR checking for magic, so for example
3402 an overloaded object returned by a tied array access would usually be
3403 treated as not overloaded [RT #57012].
3404 .IP \(bu 4
3405 Various instances of magic (like tie methods) being called on tied variables
3406 too many or too few times have been fixed:
3407 .RS 4
3408 .IP \(bu 4
3409 \&\f(CW$tied\->()\fR did not always call FETCH [perl #8438].
3410 .IP \(bu 4
3411 Filetest operators and \f(CW\*(C`y///\*(C'\fR and \f(CW\*(C`tr///\*(C'\fR were calling FETCH too
3412 many times.
3413 .IP \(bu 4
3414 The \f(CW\*(C`=\*(C'\fR operator used to ignore magic on its right-hand side if the
3415 scalar happened to hold a typeglob (if a typeglob was the last thing
3416 returned from or assigned to a tied scalar) [perl #77498].
3417 .IP \(bu 4
3418 Dereference operators used to ignore magic if the argument was a
3419 reference already (such as from a previous FETCH) [perl #72144].
3420 .IP \(bu 4
3421 \&\f(CW\*(C`splice\*(C'\fR now calls set-magic (so changes made
3422 by \f(CW\*(C`splice @ISA\*(C'\fR are respected by method calls) [perl #78400].
3423 .IP \(bu 4
3424 In-memory files created by \f(CW\*(C`open($fh, ">", \e$buffer)\*(C'\fR were not calling
3425 FETCH/STORE at all [perl #43789] (5.12.2).
3426 .IP \(bu 4
3427 \&\fButf8::is_utf8()\fR now respects get-magic (like \f(CW$1\fR) (5.12.1).
3428 .RE
3429 .RS 4
3430 .RE
3431 .IP \(bu 4
3432 Non-commutative binary operators used to swap their operands if the same
3433 tied scalar was used for both operands and returned a different value for
3434 each FETCH. For instance, if \f(CW$t\fR returned 2 the first time and 3 the
3435 second, then \f(CW\*(C`$t/$t\*(C'\fR would evaluate to 1.5. This has been fixed
3436 [perl #87708].
3437 .IP \(bu 4
3438 String \f(CW\*(C`eval\*(C'\fR now detects taintedness of overloaded or tied
3439 arguments [perl #75716].
3440 .IP \(bu 4
3441 String \f(CW\*(C`eval\*(C'\fR and regular expression matches against objects with string
3442 overloading no longer cause memory corruption or crashes [perl #77084].
3443 .IP \(bu 4
3444 readline now honors \f(CW\*(C`<>\*(C'\fR overloading on tied
3445 arguments.
3446 .IP \(bu 4
3447 \&\f(CW\*(C`<expr>\*(C'\fR always respects overloading now if the expression is
3448 overloaded.
3449 .Sp
3450 Because "<>\ as glob" was parsed differently from
3451 "<>\ as filehandle" from 5.6 onwards, something like \f(CW\*(C`<$foo[0]>\*(C'\fR did
3452 not handle overloading, even if \f(CW$foo[0]\fR was an overloaded object. This
3453 was contrary to the documentation for overload, and meant that \f(CW\*(C`<>\*(C'\fR
3454 could not be used as a general overloaded iterator operator.
3455 .IP \(bu 4
3456 The fallback behaviour of overloading on binary operators was asymmetric
3457 [perl #71286].
3458 .IP \(bu 4
3459 Magic applied to variables in the main package no longer affects other packages.
3460 See "Magic variables outside the main package" above [perl #76138].
3461 .IP \(bu 4
3462 Sometimes magic (ties, taintedness, etc.) attached to variables could cause
3463 an object to last longer than it should, or cause a crash if a tied
3464 variable were freed from within a tie method. These have been fixed
3465 [perl #81230].
3466 .IP \(bu 4
3467 DESTROY methods of objects implementing ties are no longer able to crash by
3468 accessing the tied variable through a weak reference [perl #86328].
3469 .IP \(bu 4
3470 Fixed a regression of \fBkill()\fR when a match variable is used for the
3471 process ID to kill [perl #75812].
3472 .IP \(bu 4
3473 \&\f(CW$AUTOLOAD\fR used to remain tainted forever if it ever became tainted. Now
3474 it is correctly untainted if an autoloaded method is called and the method
3475 name was not tainted.
3476 .IP \(bu 4
3477 \&\f(CW\*(C`sprintf\*(C'\fR now dies when passed a tainted scalar for the format. It did
3478 already die for arbitrary expressions, but not for simple scalars
3479 [perl #82250].
3480 .IP \(bu 4
3481 \&\f(CW\*(C`lc\*(C'\fR, \f(CW\*(C`uc\*(C'\fR, \f(CW\*(C`lcfirst\*(C'\fR, and \f(CW\*(C`ucfirst\*(C'\fR no longer return untainted strings
3482 when the argument is tainted. This has been broken since perl 5.8.9
3483 [perl #87336].
3484 .SS "The Debugger"
3485 .IX Subsection "The Debugger"
3486 .IP \(bu 4
3487 The Perl debugger now also works in taint mode [perl #76872].
3488 .IP \(bu 4
3489 Subroutine redefinition works once more in the debugger [perl #48332].
3490 .IP \(bu 4
3491 When \fB\-d\fR is used on the shebang (\f(CW\*(C`#!\*(C'\fR) line, the debugger now has access
3492 to the lines of the main program. In the past, this sometimes worked and
3493 sometimes did not, depending on the order in which things happened to be
3494 arranged in memory [perl #71806].
3495 .IP \(bu 4
3496 A possible memory leak when using \fBcaller()\fR to set
3497 \&\f(CW@DB::args\fR has been fixed (5.12.2).
3498 .IP \(bu 4
3499 Perl no longer stomps on \f(CW$DB::single\fR, \f(CW$DB::trace\fR, and \f(CW$DB::signal\fR
3500 if these variables already have values when \f(CW$^P\fR is assigned to [perl #72422].
3501 .IP \(bu 4
3502 \&\f(CW\*(C`#line\*(C'\fR directives in string evals were not properly updating the arrays
3503 of lines of code (\f(CW\*(C`@{"_< ..."}\*(C'\fR) that the debugger (or any debugging or
3504 profiling module) uses. In threaded builds, they were not being updated at
3505 all. In non-threaded builds, the line number was ignored, so any change to
3506 the existing line number would cause the lines to be misnumbered
3507 [perl #79442].
3508 .SS Threads
3509 .IX Subsection "Threads"
3510 .IP \(bu 4
3511 Perl no longer accidentally clones lexicals in scope within active stack
3512 frames in the parent when creating a child thread [perl #73086].
3513 .IP \(bu 4
3514 Several memory leaks in cloning and freeing threaded Perl interpreters have been
3515 fixed [perl #77352].
3516 .IP \(bu 4
3517 Creating a new thread when directory handles were open used to cause a
3518 crash, because the handles were not cloned, but simply passed to the new
3519 thread, resulting in a double free.
3520 .Sp
3521 Now directory handles are cloned properly on Windows
3522 and on systems that have a \f(CW\*(C`fchdir\*(C'\fR function. On other
3523 systems, new threads simply do not inherit directory
3524 handles from their parent threads [perl #75154].
3525 .IP \(bu 4
3526 The typeglob \f(CW\*(C`*,\*(C'\fR, which holds the scalar variable \f(CW$,\fR (output field
3527 separator), had the wrong reference count in child threads.
3528 .IP \(bu 4
3529 [perl #78494] When pipes are shared between threads, the \f(CW\*(C`close\*(C'\fR function
3530 (and any implicit close, such as on thread exit) no longer blocks.
3531 .IP \(bu 4
3532 Perl now does a timely cleanup of SVs that are cloned into a new
3533 thread but then discovered to be orphaned (that is, their owners
3534 are \fInot\fR cloned). This eliminates several "scalars leaked"
3535 warnings when joining threads.
3536 .SS "Scoping and Subroutines"
3537 .IX Subsection "Scoping and Subroutines"
3538 .IP \(bu 4
3539 Lvalue subroutines are again able to return copy-on-write scalars. This
3540 had been broken since version 5.10.0 [perl #75656] (5.12.3).
3541 .IP \(bu 4
3542 \&\f(CW\*(C`require\*(C'\fR no longer causes \f(CW\*(C`caller\*(C'\fR to return the wrong file name for
3543 the scope that called \f(CW\*(C`require\*(C'\fR and other scopes higher up that had the
3544 same file name [perl #68712].
3545 .IP \(bu 4
3546 \&\f(CW\*(C`sort\*(C'\fR with a \f(CW\*(C`($$)\*(C'\fR\-prototyped comparison routine used to cause the value
3547 of \f(CW@_\fR to leak out of the sort. Taking a reference to \f(CW@_\fR within the
3548 sorting routine could cause a crash [perl #72334].
3549 .IP \(bu 4
3550 Match variables (like \f(CW$1\fR) no longer persist between calls to a sort
3551 subroutine [perl #76026].
3552 .IP \(bu 4
3553 Iterating with \f(CW\*(C`foreach\*(C'\fR over an array returned by an lvalue sub now works
3554 [perl #23790].
3555 .IP \(bu 4
3556 \&\f(CW$@\fR is now localised during calls to \f(CW\*(C`binmode\*(C'\fR to prevent action at a
3557 distance [perl #78844].
3558 .IP \(bu 4
3559 Calling a closure prototype (what is passed to an attribute handler for a
3560 closure) now results in a "Closure prototype called" error message instead
3561 of a crash [perl #68560].
3562 .IP \(bu 4
3563 Mentioning a read-only lexical variable from the enclosing scope in a
3564 string \f(CW\*(C`eval\*(C'\fR no longer causes the variable to become writable
3565 [perl #19135].
3566 .SS Signals
3567 .IX Subsection "Signals"
3568 .IP \(bu 4
3569 Within signal handlers, \f(CW$!\fR is now implicitly localized.
3570 .IP \(bu 4
3571 CHLD signals are no longer unblocked after a signal handler is called if
3572 they were blocked before by \f(CW\*(C`POSIX::sigprocmask\*(C'\fR [perl #82040].
3573 .IP \(bu 4
3574 A signal handler called within a signal handler could cause leaks or
3575 double-frees. Now fixed [perl #76248].
3576 .SS "Miscellaneous Memory Leaks"
3577 .IX Subsection "Miscellaneous Memory Leaks"
3578 .IP \(bu 4
3579 Several memory leaks when loading XS modules were fixed (5.12.2).
3580 .IP \(bu 4
3581 \&\fBsubstr()\fR,
3582 \&\fBpos()\fR, \fBkeys()\fR,
3583 and \fBvec()\fR could, when used in combination
3584 with lvalues, result in leaking the scalar value they operate on, and cause its
3585 destruction to happen too late. This has now been fixed.
3586 .IP \(bu 4
3587 The postincrement and postdecrement operators, \f(CW\*(C`++\*(C'\fR and \f(CW\*(C`\-\-\*(C'\fR, used to cause
3588 leaks when used on references. This has now been fixed.
3589 .IP \(bu 4
3590 Nested \f(CW\*(C`map\*(C'\fR and \f(CW\*(C`grep\*(C'\fR blocks no longer leak memory when processing
3591 large lists [perl #48004].
3592 .IP \(bu 4
3593 \&\f(CW\*(C`use \fR\f(CIVERSION\fR\f(CW\*(C'\fR and \f(CW\*(C`no \fR\f(CIVERSION\fR\f(CW\*(C'\fR no longer leak memory [perl #78436]
3594 [perl #69050].
3595 .IP \(bu 4
3596 \&\f(CW\*(C`.=\*(C'\fR followed by \f(CW\*(C`<>\*(C'\fR or \f(CW\*(C`readline\*(C'\fR would leak memory if \f(CW$/\fR
3597 contained characters beyond the octet range and the scalar assigned to
3598 happened to be encoded as UTF8 internally [perl #72246].
3599 .IP \(bu 4
3600 \&\f(CW\*(C`eval \*(AqBEGIN{die}\*(Aq\*(C'\fR no longer leaks memory on non-threaded builds.
3601 .SS "Memory Corruption and Crashes"
3602 .IX Subsection "Memory Corruption and Crashes"
3603 .IP \(bu 4
3604 \&\fBglob()\fR no longer crashes when \f(CW%File::Glob::\fR is empty and
3605 \&\f(CW\*(C`CORE::GLOBAL::glob\*(C'\fR isn't present [perl #75464] (5.12.2).
3606 .IP \(bu 4
3607 \&\fBreadline()\fR has been fixed when interrupted by signals so it no longer
3608 returns the "same thing" as before or random memory.
3609 .IP \(bu 4
3610 When assigning a list with duplicated keys to a hash, the assignment used to
3611 return garbage and/or freed values:
3612 .Sp
3613 .Vb 1
3614 \& @a = %h = (list with some duplicate keys);
3615 .Ve
3616 .Sp
3617 This has now been fixed [perl #31865].
3618 .IP \(bu 4
3619 The mechanism for freeing objects in globs used to leave dangling
3620 pointers to freed SVs, meaning Perl users could see corrupted state
3621 during destruction.
3622 .Sp
3623 Perl now frees only the affected slots of the GV, rather than freeing
3624 the GV itself. This makes sure that there are no dangling refs or
3625 corrupted state during destruction.
3626 .IP \(bu 4
3627 The interpreter no longer crashes when freeing deeply-nested arrays of
3628 arrays. Hashes have not been fixed yet [perl #44225].
3629 .IP \(bu 4
3630 Concatenating long strings under \f(CW\*(C`use encoding\*(C'\fR no longer causes Perl to
3631 crash [perl #78674].
3632 .IP \(bu 4
3633 Calling \f(CW\*(C`\->import\*(C'\fR on a class lacking an import method could corrupt
3634 the stack, resulting in strange behaviour. For instance,
3635 .Sp
3636 .Vb 1
3637 \& push @a, "foo", $b = bar\->import;
3638 .Ve
3639 .Sp
3640 would assign "foo" to \f(CW$b\fR [perl #63790].
3641 .IP \(bu 4
3642 The \f(CW\*(C`recv\*(C'\fR function could crash when called with the MSG_TRUNC flag
3643 [perl #75082].
3644 .IP \(bu 4
3645 \&\f(CW\*(C`formline\*(C'\fR no longer crashes when passed a tainted format picture. It also
3646 taints \f(CW$^A\fR now if its arguments are tainted [perl #79138].
3647 .IP \(bu 4
3648 A bug in how we process filetest operations could cause a segfault.
3649 Filetests don't always expect an op on the stack, so we now use
3650 TOPs only if we're sure that we're not \f(CW\*(C`stat\*(C'\fRing the \f(CW\*(C`_\*(C'\fR filehandle.
3651 This is indicated by \f(CW\*(C`OPf_KIDS\*(C'\fR (as checked in ck_ftst) [perl #74542]
3652 (5.12.1).
3653 .IP \(bu 4
3654 \&\fBunpack()\fR now handles scalar context correctly for \f(CW%32H\fR and \f(CW%32u\fR,
3655 fixing a potential crash. \fBsplit()\fR would crash because the third item
3656 on the stack wasn't the regular expression it expected. \f(CW\*(C`unpack("%2H",
3657 \&...)\*(C'\fR would return both the unpacked result and the checksum on the stack,
3658 as would \f(CW\*(C`unpack("%2u", ...)\*(C'\fR [perl #73814] (5.12.2).
3659 .SS "Fixes to Various Perl Operators"
3660 .IX Subsection "Fixes to Various Perl Operators"
3661 .IP \(bu 4
3662 The \f(CW\*(C`&\*(C'\fR, \f(CW\*(C`|\*(C'\fR, and \f(CW\*(C`^\*(C'\fR bitwise operators no longer coerce read-only arguments
3663 [perl #20661].
3664 .IP \(bu 4
3665 Stringifying a scalar containing "\-0.0" no longer has the effect of turning
3666 false into true [perl #45133].
3667 .IP \(bu 4
3668 Some numeric operators were converting integers to floating point,
3669 resulting in loss of precision on 64\-bit platforms [perl #77456].
3670 .IP \(bu 4
3671 \&\fBsprintf()\fR was ignoring locales when called with constant arguments
3672 [perl #78632].
3673 .IP \(bu 4
3674 Combining the vector (\f(CW%v\fR) flag and dynamic precision would
3675 cause \f(CW\*(C`sprintf\*(C'\fR to confuse the order of its arguments, making it
3676 treat the string as the precision and vice-versa [perl #83194].
3677 .SS "Bugs Relating to the C API"
3678 .IX Subsection "Bugs Relating to the C API"
3679 .IP \(bu 4
3680 The C\-level \f(CW\*(C`lex_stuff_pvn\*(C'\fR function would sometimes cause a spurious
3681 syntax error on the last line of the file if it lacked a final semicolon
3682 [perl #74006] (5.12.1).
3683 .IP \(bu 4
3684 The \f(CW\*(C`eval_sv\*(C'\fR and \f(CW\*(C`eval_pv\*(C'\fR C functions now set \f(CW$@\fR correctly when
3685 there is a syntax error and no \f(CW\*(C`G_KEEPERR\*(C'\fR flag, and never set it if the
3686 \&\f(CW\*(C`G_KEEPERR\*(C'\fR flag is present [perl #3719].
3687 .IP \(bu 4
3688 The XS multicall API no longer causes subroutines to lose reference counts
3689 if called via the multicall interface from within those very subroutines.
3690 This affects modules like List::Util. Calling one of its functions with an
3691 active subroutine as the first argument could cause a crash [perl #78070].
3692 .IP \(bu 4
3693 The \f(CW\*(C`SvPVbyte\*(C'\fR function available to XS modules now calls magic before
3694 downgrading the SV, to avoid warnings about wide characters [perl #72398].
3695 .IP \(bu 4
3696 The ref types in the typemap for XS bindings now support magical variables
3697 [perl #72684].
3698 .IP \(bu 4
3699 \&\f(CW\*(C`sv_catsv_flags\*(C'\fR no longer calls \f(CW\*(C`mg_get\*(C'\fR on its second argument (the
3700 source string) if the flags passed to it do not include SV_GMAGIC. So it
3701 now matches the documentation.
3702 .IP \(bu 4
3703 \&\f(CW\*(C`my_strftime\*(C'\fR no longer leaks memory. This fixes a memory leak in
3704 \&\f(CW\*(C`POSIX::strftime\*(C'\fR [perl #73520].
3705 .IP \(bu 4
3706 \&\fIXSUB.h\fR now correctly redefines fgets under PERL_IMPLICIT_SYS [perl #55049]
3707 (5.12.1).
3708 .IP \(bu 4
3709 XS code using \fBfputc()\fR or \fBfputs()\fR on Windows could cause an error
3710 due to their arguments being swapped [perl #72704] (5.12.1).
3711 .IP \(bu 4
3712 A possible segfault in the \f(CW\*(C`T_PTROBJ\*(C'\fR default typemap has been fixed
3713 (5.12.2).
3714 .IP \(bu 4
3715 A bug that could cause "Unknown error" messages when
3716 \&\f(CW\*(C`call_sv(code, G_EVAL)\*(C'\fR is called from an XS destructor has been fixed
3717 (5.12.2).
3718 .SH "Known Problems"
3719 .IX Header "Known Problems"
3720 This is a list of significant unresolved issues which are regressions
3721 from earlier versions of Perl or which affect widely-used CPAN modules.
3722 .IP \(bu 4
3723 \&\f(CW\*(C`List::Util::first\*(C'\fR misbehaves in the presence of a lexical \f(CW$_\fR
3724 (typically introduced by \f(CW\*(C`my $_\*(C'\fR or implicitly by \f(CW\*(C`given\*(C'\fR). The variable
3725 that gets set for each iteration is the package variable \f(CW$_\fR, not the
3726 lexical \f(CW$_\fR.
3727 .Sp
3728 A similar issue may occur in other modules that provide functions which
3729 take a block as their first argument, like
3730 .Sp
3731 .Vb 1
3732 \& foo { ... $_ ...} list
3733 .Ve
3734 .Sp
3735 See also: <https://github.com/Perl/perl5/issues/9798>
3736 .IP \(bu 4
3737 \&\fBreadline()\fR returns an empty string instead of a cached previous value
3738 when it is interrupted by a signal
3739 .IP \(bu 4
3740 The changes in prototype handling break Switch. A patch has been sent
3741 upstream and will hopefully appear on CPAN soon.
3742 .IP \(bu 4
3743 The upgrade to \fIExtUtils\-MakeMaker\-6.57_05\fR has caused
3744 some tests in the \fIModule-Install\fR distribution on CPAN to
3745 fail. (Specifically, \fI02_mymeta.t\fR tests 5 and 21; \fI18_all_from.t\fR
3746 tests 6 and 15; \fI19_authors.t\fR tests 5, 13, 21, and 29; and
3747 \&\fI20_authors_with_special_characters.t\fR tests 6, 15, and 23 in version
3748 1.00 of that distribution now fail.)
3749 .IP \(bu 4
3750 On VMS, \f(CW\*(C`Time::HiRes\*(C'\fR tests will fail due to a bug in the CRTL's
3751 implementation of \f(CW\*(C`setitimer\*(C'\fR: previous timer values would be cleared
3752 if a timer expired but not if the timer was reset before expiring. HP
3753 OpenVMS Engineering have corrected the problem and will release a patch
3754 in due course (Quix case # QXCM1001115136).
3755 .IP \(bu 4
3756 On VMS, there were a handful of \f(CW\*(C`Module::Build\*(C'\fR test failures we didn't
3757 get to before the release; please watch CPAN for updates.
3758 .SH Errata
3759 .IX Header "Errata"
3760 .SS "\fBkeys()\fP, \fBvalues()\fP, and \fBeach()\fP work on arrays"
3761 .IX Subsection "keys(), values(), and each() work on arrays"
3762 You can now use the \fBkeys()\fR, \fBvalues()\fR, and \fBeach()\fR builtins on arrays;
3763 previously you could use them only on hashes. See perlfunc for details.
3764 This is actually a change introduced in perl 5.12.0, but it was missed from
3765 that release's perl5120delta.
3766 .ie n .SS "\fBsplit()\fP and @_"
3767 .el .SS "\fBsplit()\fP and \f(CW@_\fP"
3768 .IX Subsection "split() and @_"
3769 \&\fBsplit()\fR no longer modifies \f(CW@_\fR when called in scalar or void context.
3770 In void context it now produces a "Useless use of split" warning.
3771 This was also a perl 5.12.0 change that missed the perldelta.
3772 .SH Obituary
3773 .IX Header "Obituary"
3774 Randy Kobes, creator of http://kobesearch.cpan.org/ and
3775 contributor/maintainer to several core Perl toolchain modules, passed
3776 away on September 18, 2010 after a battle with lung cancer. The community
3777 was richer for his involvement. He will be missed.
3778 .SH Acknowledgements
3779 .IX Header "Acknowledgements"
3780 Perl 5.14.0 represents one year of development since
3781 Perl 5.12.0 and contains nearly 550,000 lines of changes across nearly
3782 3,000 files from 150 authors and committers.
3783 .PP
3784 Perl continues to flourish into its third decade thanks to a vibrant
3785 community of users and developers. The following people are known to
3786 have contributed the improvements that became Perl 5.14.0:
3787 .PP
3788 Aaron Crane, Abhijit Menon-Sen, Abigail, Ævar Arnfjörð Bjarmason,
3789 Alastair Douglas, Alexander Alekseev, Alexander Hartmaier, Alexandr
3790 Ciornii, Alex Davies, Alex Vandiver, Ali Polatel, Allen Smith, Andreas
3791 König, Andrew Rodland, Andy Armstrong, Andy Dougherty, Aristotle
3792 Pagaltzis, Arkturuz, Arvan, A. Sinan Unur, Ben Morrow, Bo Lindbergh,
3793 Boris Ratner, Brad Gilbert, Bram, brian d foy, Brian Phillips, Casey
3794 West, Charles Bailey, Chas. Owens, Chip Salzenberg, Chris 'BinGOs'
3795 Williams, chromatic, Craig A. Berry, Curtis Jewell, Dagfinn Ilmari
3796 Mannsåker, Dan Dascalescu, Dave Rolsky, David Caldwell, David Cantrell,
3797 David Golden, David Leadbeater, David Mitchell, David Wheeler, Eric
3798 Brine, Father Chrysostomos, Fingle Nark, Florian Ragwitz, Frank Wiegand,
3799 Franz Fasching, Gene Sullivan, George Greer, Gerard Goossen, Gisle Aas,
3800 Goro Fuji, Grant McLean, gregor herrmann, H.Merijn Brand, Hongwen Qiu,
3801 Hugo van der Sanden, Ian Goodacre, James E Keenan, James Mastros, Jan
3802 Dubois, Jay Hannah, Jerry D. Hedden, Jesse Vincent, Jim Cromie, Jirka
3803 Hruška, John Peacock, Joshua ben Jore, Joshua Pritikin, Karl Williamson,
3804 Kevin Ryde, kmx, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯, Larwan Berke, Leon Brocard, Leon
3805 Timmermans, Lubomir Rintel, Lukas Mai, Maik Hentsche, Marty Pauley,
3806 Marvin Humphrey, Matt Johnson, Matt S Trout, Max Maischein, Michael
3807 Breen, Michael Fig, Michael G Schwern, Michael Parker, Michael Stevens,
3808 Michael Witten, Mike Kelly, Moritz Lenz, Nicholas Clark, Nick Cleaton,
3809 Nick Johnston, Nicolas Kaiser, Niko Tyni, Noirin Shirley, Nuno Carvalho,
3810 Paul Evans, Paul Green, Paul Johnson, Paul Marquess, Peter J. Holzer,
3811 Peter John Acklam, Peter Martini, Philippe Bruhat (BooK), Piotr Fusik,
3812 Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Renee Baecker, Ricardo
3813 Signes, Richard Möhn, Richard Soderberg, Rob Hoelz, Robin Barker, Ruslan
3814 Zakirov, Salvador Fandiño, Salvador Ortiz Garcia, Shlomi Fish, Sinan
3815 Unur, Sisyphus, Slaven Rezic, Steffen Müller, Steve Hay, Steven
3816 Schubiger, Steve Peters, Sullivan Beck, Tatsuhiko Miyagawa, Tim Bunce,
3817 Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, Tye McQueen,
3818 Vadim Konovalov, Vernon Lyon, Vincent Pit, Walt Mankowski, Wolfram
3819 Humann, Yves Orton, Zefram, and Zsbán Ambrus.
3820 .PP
3821 This is woefully incomplete as it's automatically generated from version
3822 control history. In particular, it doesn't include the names of the
3823 (very much appreciated) contributors who reported issues in previous
3824 versions of Perl that helped make Perl 5.14.0 better. For a more complete
3825 list of all of Perl's historical contributors, please see the \f(CW\*(C`AUTHORS\*(C'\fR
3826 file in the Perl 5.14.0 distribution.
3827 .PP
3828 Many of the changes included in this version originated in the CPAN
3829 modules included in Perl's core. We're grateful to the entire CPAN
3830 community for helping Perl to flourish.
3831 .SH "Reporting Bugs"
3832 .IX Header "Reporting Bugs"
3833 If you find what you think is a bug, you might check the articles
3834 recently posted to the comp.lang.perl.misc newsgroup and the Perl
3835 bug database at http://rt.perl.org/perlbug/ . There may also be
3836 information at http://www.perl.org/ , the Perl Home Page.
3837 .PP
3838 If you believe you have an unreported bug, please run the perlbug
3839 program included with your release. Be sure to trim your bug down
3840 to a tiny but sufficient test case. Your bug report, along with the
3841 output of \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to [email protected] to be
3842 analysed by the Perl porting team.
3843 .PP
3844 If the bug you are reporting has security implications, which make it
3845 inappropriate to send to a publicly archived mailing list, then please send
3846 it to perl5\-security\[email protected]. This points to a closed subscription
3847 unarchived mailing list, which includes all the core committers, who are able
3848 to help assess the impact of issues, figure out a resolution, and help
3849 co-ordinate the release of patches to mitigate or fix the problem across all
3850 platforms on which Perl is supported. Please use this address for
3851 security issues in the Perl core \fIonly\fR, not for modules independently
3852 distributed on CPAN.
3853 .SH "SEE ALSO"
3854 .IX Header "SEE ALSO"
3855 The \fIChanges\fR file for an explanation of how to view exhaustive details
3856 on what changed.
3857 .PP
3858 The \fIINSTALL\fR file for how to build Perl.
3859 .PP
3860 The \fIREADME\fR file for general stuff.
3861 .PP
3862 The \fIArtistic\fR and \fICopying\fR files for copyright information.