Debian Codegraph @

upstream/mageia-cauldron/man1/perl5140delta.1

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