Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
5076a392 | 5 | perldelta - what is new for perl v5.14.0 |
c71a852f | 6 | |
5076a392 FC |
7 | =head1 DESCRIPTION |
8 | ||
9 | This document describes differences between the 5.12.0 release and | |
10 | the 5.14.0 release. | |
11 | ||
0980abf1 FC |
12 | If you are upgrading from an earlier release such as 5.10.0, first read |
13 | L<perl5120delta>, which describes differences between 5.10.0 and | |
14 | 5.12.0. | |
15 | ||
5076a392 | 16 | Some of the bug fixes in this release have been backported to subsequent |
40bd7639 | 17 | releases of 5.12.x. Those are indicated with the 5.12.x version in |
5076a392 FC |
18 | parentheses. |
19 | ||
5076a392 FC |
20 | =head1 Notice |
21 | ||
1c7f7822 JV |
22 | As described in L<perlpolicy>, the release of Perl 5.14.0 marks the |
23 | official end of support for Perl 5.10. Users of Perl 5.10 or earlier | |
24 | should consider upgrading to a more recent release of Perl. | |
5076a392 FC |
25 | |
26 | =head1 Core Enhancements | |
27 | ||
1f539a1a | 28 | =head2 Unicode |
5076a392 | 29 | |
1f539a1a | 30 | =head3 Unicode Version 6.0 is now supported (mostly) |
5076a392 | 31 | |
1f539a1a FC |
32 | Perl comes with the Unicode 6.0 data base updated with |
33 | L<Corrigendum #8|http://www.unicode.org/versions/corrigendum8.html>, | |
34 | with one exception noted below. | |
c2b7148f | 35 | See L<http://unicode.org/versions/Unicode6.0.0/> for details on the new |
1f539a1a | 36 | release. Perl does not support any Unicode provisional properties, |
a3c24add | 37 | including the new ones for this release. |
5076a392 | 38 | |
1f539a1a | 39 | Unicode 6.0 has chosen to use the name C<BELL> for the character at U+1F514, |
e1b1739f | 40 | which is a symbol that looks like a bell, and is used in Japanese cell |
1f539a1a FC |
41 | phones. This conflicts with the long-standing Perl usage of having |
42 | C<BELL> mean the ASCII C<BEL> character, U+0007. In Perl 5.14, | |
43 | C<\N{BELL}> will continue to mean U+0007, but its use will generate a | |
1c7f7822 | 44 | deprecation warning message, unless such warnings are turned off. The |
12f3ad4e FC |
45 | new name for U+0007 in Perl is C<ALERT>, which corresponds nicely |
46 | with the existing shorthand sequence for it, C<"\a">. C<\N{BEL}> | |
47 | means U+0007, with no warning given. The character at U+1F514 will not | |
1c7f7822 JV |
48 | have a name in 5.14, but can be referred to by C<\N{U+1F514}>. |
49 | In Perl 5.16, C<\N{BELL}> will refer to U+1F514; all code | |
50 | that uses C<\N{BELL}> should be converted to use C<\N{ALERT}>, | |
51 | C<\N{BEL}>, or C<"\a"> before upgrading. | |
5076a392 | 52 | |
1f539a1a | 53 | =head3 Full functionality for C<use feature 'unicode_strings'> |
5076a392 | 54 | |
1f539a1a FC |
55 | This release provides full functionality for C<use feature |
56 | 'unicode_strings'>. Under its scope, all string operations executed and | |
57 | regular expressions compiled (even if executed outside its scope) have | |
52594064 | 58 | Unicode semantics. See L<feature/"the 'unicode_strings' feature">. |
5076a392 | 59 | |
c2b7148f R |
60 | This feature avoids most forms of the "Unicode Bug" (see |
61 | L<perlunicode/The "Unicode Bug"> for details). If there is a | |
1f539a1a FC |
62 | possibility that your code will process Unicode strings, you are |
63 | B<strongly> encouraged to use this subpragma to avoid nasty surprises. | |
5076a392 | 64 | |
1f539a1a | 65 | =head3 C<\N{I<name>}> and C<charnames> enhancements |
5076a392 | 66 | |
1f539a1a | 67 | =over |
5076a392 | 68 | |
1f539a1a | 69 | =item * |
5076a392 FC |
70 | |
71 | C<\N{}> and C<charnames::vianame> now know about the abbreviated | |
e1b1739f FC |
72 | character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., all |
73 | the customary abbreviations for the C0 and C1 control characters (such as | |
74 | ACK, BEL, CAN, etc.), and a few new variants of some C1 full names that | |
75 | are in common usage. | |
5076a392 | 76 | |
1f539a1a FC |
77 | =item * |
78 | ||
959ad7d5 FC |
79 | Unicode has a number of named character sequences, in which particular sequences |
80 | of code points are given names. C<\N{...}> now recognizes these. | |
81 | ||
1f539a1a FC |
82 | =item * |
83 | ||
c2b7148f | 84 | C<\N{}>, C<charnames::vianame> and C<charnames::viacode> now know about every |
1c7f7822 | 85 | character in Unicode. In earlier releases of Perl, they didn't know about the Hangul syllables |
959ad7d5 FC |
86 | nor a number of CJK (Chinese/Japanese/Korean) characters. |
87 | ||
1f539a1a FC |
88 | =item * |
89 | ||
1c7f7822 | 90 | It is now possible to override Perl's abbreviations with your own custom aliases. |
5076a392 | 91 | |
1f539a1a FC |
92 | =item * |
93 | ||
1c7f7822 | 94 | You can now create a custom alias of the ordinal of a |
5076a392 | 95 | character, known by C<\N{...}>, C<charnames::vianame()>, and |
1c7f7822 JV |
96 | C<charnames::viacode()>. Previously, aliases had to be to official |
97 | Unicode character names. This made it impossible to create an alias for | |
98 | unnamed code points, such as those reserved for private | |
e1b1739f | 99 | use. |
5076a392 | 100 | |
1f539a1a FC |
101 | =item * |
102 | ||
1c7f7822 JV |
103 | The new function C<charnames::string_vianame()> |
104 | is a run-time version of C<\N{...}>, returning the string | |
959ad7d5 FC |
105 | of characters whose Unicode name is its parameter. It can handle |
106 | Unicode named character sequences, whereas the pre-existing | |
107 | C<charnames::vianame()> cannot, as the latter returns a single code | |
108 | point. | |
109 | ||
1f539a1a FC |
110 | =back |
111 | ||
5076a392 FC |
112 | See L<charnames> for details on all these changes. |
113 | ||
22349846 KW |
114 | =head3 New warnings categories for problematic (non-)Unicode code points. |
115 | ||
116 | Three new warnings subcategories of "utf8" have been added. These | |
117 | allow you to turn off some "utf8" warnings, while allowing | |
c2b7148f | 118 | other warnings to remain on. The three categories are: |
22349846 KW |
119 | C<surrogate> when UTF-16 surrogates are encountered; |
120 | C<nonchar> when Unicode non-character code points are encountered; | |
121 | and C<non_unicode> when code points that are above the legal Unicode | |
122 | maximum of 0x10FFFF are encountered. | |
123 | ||
1f539a1a | 124 | =head3 Any unsigned value can be encoded as a character |
5076a392 | 125 | |
1f539a1a FC |
126 | With this release, Perl is adopting a model that any unsigned value can |
127 | be treated as a code point and encoded internally (as utf8) without | |
54c7bb16 | 128 | warnings - not just the code points that are legal in Unicode. |
22349846 KW |
129 | However, unless utf8 or the corresponding sub-category (see previous |
130 | item) warnings have been | |
1f539a1a FC |
131 | explicitly lexically turned off, outputting or performing a |
132 | Unicode-defined operation (such as upper-casing) on such a code point | |
133 | will generate a warning. Attempting to input these using strict rules | |
134 | (such as with the C<:encoding('UTF-8')> layer) will continue to fail. | |
135 | Prior to this release the handling was very inconsistent, and incorrect | |
1c7f7822 JV |
136 | in places. |
137 | ||
138 | Unicode non-characters, some of which previously were erroneously | |
139 | considered illegal in places by Perl, contrary to the Unicode standard, | |
140 | are now always legal internally. Inputting or outputting them will | |
141 | work the same as for the non-legal Unicode code points, as the Unicode | |
142 | standard says they are illegal for "open interchange". | |
5076a392 | 143 | |
daef9d5b KW |
144 | =head3 Unicode database files not installed |
145 | ||
146 | The Unicode database files are no longer installed with Perl. This | |
147 | doesn't affect any functionality in Perl and saves significant disk | |
1c7f7822 | 148 | space. If you need these files, you can download them from |
daef9d5b KW |
149 | L<http://www.unicode.org/Public/zipped/6.0.0/>. |
150 | ||
1f539a1a | 151 | =head2 Regular Expressions |
5076a392 | 152 | |
1c7f7822 | 153 | =head3 C<(?^...)> construct signifies default modifiers |
5076a392 | 154 | |
c2b7148f | 155 | An ASCII caret C<"^"> immediately following a C<"(?"> in a regular |
1c7f7822 JV |
156 | expression now means that the subexpression does not inherit surrounding |
157 | modifiers such as C</i>, but reverts to the Perl defaults. Any modifiers | |
158 | following the caret override the defaults. | |
5076a392 | 159 | |
1c7f7822 JV |
160 | Stringification of regular expressions now uses this notation. E.g., |
161 | before, C<qr/hlagh/i> would be stringified as C<(?i-xsm:hlagh)>, but | |
162 | now it's stringified as C<(?^i:hlagh)>. | |
5076a392 FC |
163 | |
164 | The main purpose of this is to allow tests that rely on the | |
e1b1739f | 165 | stringification not to have to change when new modifiers are added. |
5076a392 FC |
166 | See L<perlre/Extended Patterns>. |
167 | ||
1c7f7822 JV |
168 | This change is likely to break code which compares stringified regular |
169 | expressions with fixed strings containing C<?-xism>. | |
170 | ||
171 | ||
1f539a1a | 172 | =head3 C</d>, C</l>, C</u>, C</a>, and C</aa> modifiers |
5076a392 | 173 | |
40bd7639 | 174 | Four new regular expression modifiers have been added. These are mutually |
959ad7d5 | 175 | exclusive; one only can be turned on at a time. |
5076a392 | 176 | |
959ad7d5 | 177 | The C</l> modifier says to compile the regular expression as if it were |
5076a392 FC |
178 | in the scope of C<use locale>, even if it is not. |
179 | ||
959ad7d5 | 180 | The C</u> modifier says to compile the regular expression as if it were |
5076a392 FC |
181 | in the scope of a C<use feature "unicode_strings"> pragma. |
182 | ||
e1b1739f | 183 | The C</d> (default) modifier is used to override any C<use locale> and |
5076a392 FC |
184 | C<use feature "unicode_strings"> pragmas that are in effect at the time |
185 | of compiling the regular expression. | |
186 | ||
959ad7d5 | 187 | The C</a> regular expression modifier restricts C<\s>, C<\d> and C<\w> and |
122c7b7d | 188 | the POSIX (C<[[:posix:]]>) character classes to the ASCII range. Their |
959ad7d5 FC |
189 | complements and C<\b> and C<\B> are correspondingly |
190 | affected. Otherwise, C</a> behaves like the C</u> modifier, in that | |
e1b1739f | 191 | case-insensitive matching uses Unicode semantics. |
5076a392 | 192 | |
1c7f7822 JV |
193 | The C</aa> modifier is like C</a>, except that, in case-insensitive |
194 | matching, no ASCII character will match a non-ASCII character. | |
195 | For example, | |
5076a392 | 196 | |
959ad7d5 | 197 | 'k' =~ /\N{KELVIN SIGN}/ai |
5076a392 | 198 | |
1c7f7822 JV |
199 | will match. |
200 | ||
201 | 'k' =~ /\N{KELVIN SIGN}/aai | |
202 | ||
203 | will not match. | |
5076a392 | 204 | |
959ad7d5 | 205 | See L<perlre/Modifiers> for more detail. |
5076a392 | 206 | |
1f539a1a | 207 | =head3 Non-destructive substitution |
5076a392 | 208 | |
1f539a1a FC |
209 | The substitution (C<s///>) and transliteration |
210 | (C<y///>) operators now support an C</r> option that | |
211 | copies the input variable, carries out the substitution on | |
212 | the copy and returns the result. The original remains unmodified. | |
5076a392 | 213 | |
1f539a1a FC |
214 | my $old = 'cat'; |
215 | my $new = $old =~ s/cat/dog/r; | |
216 | # $old is 'cat' and $new is 'dog' | |
5076a392 | 217 | |
1f539a1a | 218 | This is particularly useful with C<map>. See L<perlop> for more examples. |
5076a392 | 219 | |
1f539a1a | 220 | =head3 Reentrant regular expression engine |
5076a392 | 221 | |
1f539a1a FC |
222 | It is now safe to use regular expressions within C<(?{...})> and |
223 | C<(??{...})> code blocks inside regular expressions. | |
5076a392 | 224 | |
c2b7148f | 225 | These blocks are still experimental, however, and still have problems with |
e1b1739f | 226 | lexical (C<my>) variables and abnormal exiting. |
5076a392 | 227 | |
1f539a1a | 228 | =head3 C<use re '/flags';> |
5076a392 FC |
229 | |
230 | The C<re> pragma now has the ability to turn on regular expression flags | |
231 | till the end of the lexical scope: | |
232 | ||
233 | use re '/x'; | |
234 | "foo" =~ / (.+) /; # /x implied | |
235 | ||
236 | See L<re/"'/flags' mode"> for details. | |
237 | ||
1f539a1a | 238 | =head3 \o{...} for octals |
5076a392 | 239 | |
e1b1739f FC |
240 | There is a new octal escape sequence, C<"\o">, in double-quote-like |
241 | contexts. This construct allows large octal ordinals beyond the | |
1f539a1a FC |
242 | current max of 0777 to be represented. It also allows you to specify a |
243 | character in octal which can safely be concatenated with other regex | |
244 | snippets and which won't be confused with being a backreference to | |
245 | a regex capture group. See L<perlre/Capture groups>. | |
246 | ||
247 | =head3 Add C<\p{Titlecase}> as a synonym for C<\p{Title}> | |
248 | ||
249 | This synonym is added for symmetry with the Unicode property names | |
250 | C<\p{Uppercase}> and C<\p{Lowercase}>. | |
5076a392 | 251 | |
1f539a1a FC |
252 | =head3 Regular expression debugging output improvement |
253 | ||
254 | Regular expression debugging output (turned on by C<use re 'debug';>) now | |
255 | uses hexadecimal when escaping non-ASCII characters, instead of octal. | |
256 | ||
1e463951 FC |
257 | =head3 Return value of C<delete $+{...}> |
258 | ||
259 | Custom regular expression engines can now determine the return value of | |
260 | C<delete> on an entry of C<%+> or C<%->. | |
261 | ||
1f539a1a FC |
262 | =head2 Syntactical Enhancements |
263 | ||
264 | =head3 Array and hash container functions accept references | |
5076a392 FC |
265 | |
266 | All built-in functions that operate directly on array or hash | |
1c7f7822 JV |
267 | containers now also accept unblessed hard references to arrays |
268 | or hashes: | |
5076a392 FC |
269 | |
270 | |----------------------------+---------------------------| | |
271 | | Traditional syntax | Terse syntax | | |
272 | |----------------------------+---------------------------| | |
273 | | push @$arrayref, @stuff | push $arrayref, @stuff | | |
274 | | unshift @$arrayref, @stuff | unshift $arrayref, @stuff | | |
275 | | pop @$arrayref | pop $arrayref | | |
276 | | shift @$arrayref | shift $arrayref | | |
277 | | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 | | |
278 | | keys %$hashref | keys $hashref | | |
279 | | keys @$arrayref | keys $arrayref | | |
280 | | values %$hashref | values $hashref | | |
281 | | values @$arrayref | values $arrayref | | |
282 | | ($k,$v) = each %$hashref | ($k,$v) = each $hashref | | |
283 | | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref | | |
284 | |----------------------------+---------------------------| | |
285 | ||
286 | This allows these built-in functions to act on long dereferencing chains | |
287 | or on the return value of subroutines without needing to wrap them in | |
288 | C<@{}> or C<%{}>: | |
289 | ||
290 | push @{$obj->tags}, $new_tag; # old way | |
291 | push $obj->tags, $new_tag; # new way | |
292 | ||
293 | for ( keys %{$hoh->{genres}{artists}} ) {...} # old way | |
294 | for ( keys $hoh->{genres}{artists} ) {...} # new way | |
295 | ||
296 | For C<push>, C<unshift> and C<splice>, the reference will auto-vivify | |
297 | if it is not defined, just as if it were wrapped with C<@{}>. | |
298 | ||
5076a392 FC |
299 | For C<keys>, C<values>, C<each>, when overloaded dereferencing is |
300 | present, the overloaded dereference is used instead of dereferencing the | |
e1b1739f FC |
301 | underlying reftype. Warnings are issued about assumptions made in |
302 | ambiguous cases. | |
5076a392 | 303 | |
1c7f7822 JV |
304 | XXX TODO - fix this once the code is fixed |
305 | ||
1f539a1a FC |
306 | =head3 Single term prototype |
307 | ||
308 | The C<+> prototype is a special alternative to C<$> that will act like | |
309 | C<\[@%]> when given a literal array or hash variable, but will otherwise | |
e1b1739f | 310 | force scalar context on the argument. See L<perlsub/Prototypes>. |
1f539a1a FC |
311 | |
312 | =head3 C<package> block syntax | |
313 | ||
314 | A package declaration can now contain a code block, in which case the | |
315 | declaration is in scope only inside that block. So C<package Foo { ... }> | |
316 | is precisely equivalent to C<{ package Foo; ... }>. It also works with | |
317 | a version number in the declaration, as in C<package Foo 1.2 { ... }>. | |
e1b1739f | 318 | See L<perlfunc>. |
1f539a1a FC |
319 | |
320 | =head3 Statement labels can appear in more places | |
321 | ||
322 | Statement labels can now occur before any type of statement or declaration, | |
323 | such as C<package>. | |
324 | ||
325 | =head3 Stacked labels | |
326 | ||
327 | Multiple statement labels can now appear before a single statement. | |
328 | ||
329 | =head3 Uppercase X/B allowed in hexadecimal/binary literals | |
330 | ||
331 | Literals may now use either upper case C<0X...> or C<0B...> prefixes, | |
332 | in addition to the already supported C<0x...> and C<0b...> | |
e1b1739f | 333 | syntax [perl #76296]. |
1f539a1a FC |
334 | |
335 | C, Ruby, Python and PHP already supported this syntax, and it makes | |
40bd7639 | 336 | Perl more internally consistent. A round-trip with C<eval sprintf |
e1b1739f | 337 | "%#X", 0x10> now returns C<16>, the way C<eval sprintf "%#x", 0x10> does. |
1f539a1a | 338 | |
1e463951 FC |
339 | =head3 Overridable tie functions |
340 | ||
341 | C<tie>, C<tied> and C<untie> can now be overridden [perl #75902]. | |
342 | ||
1f539a1a FC |
343 | =head2 Exception Handling |
344 | ||
345 | Several changes have been made to the way C<die>, C<warn>, and C<$@> | |
346 | behave, in order to make them more reliable and consistent. | |
347 | ||
1c7f7822 JV |
348 | =over |
349 | ||
350 | =item * | |
351 | ||
1f539a1a FC |
352 | When an exception is thrown inside an C<eval>, the exception is no |
353 | longer at risk of being clobbered by code running during unwinding | |
354 | (e.g., destructors). Previously, the exception was written into C<$@> | |
355 | early in the throwing process, and would be overwritten if C<eval> was | |
356 | used internally in the destructor for an object that had to be freed | |
357 | while exiting from the outer C<eval>. Now the exception is written | |
358 | into C<$@> last thing before exiting the outer C<eval>, so the code | |
359 | running immediately thereafter can rely on the value in C<$@> correctly | |
360 | corresponding to that C<eval>. (C<$@> is still also set before exiting the | |
361 | C<eval>, for the sake of destructors that rely on this.) | |
362 | ||
363 | Likewise, a C<local $@> inside an C<eval> will no longer clobber any | |
364 | exception thrown in its scope. Previously, the restoration of C<$@> upon | |
365 | unwinding would overwrite any exception being thrown. Now the exception | |
366 | gets to the C<eval> anyway. So C<local $@> is safe before a C<die>. | |
367 | ||
368 | Exceptions thrown from object destructors no longer modify the C<$@> | |
369 | of the surrounding context. (If the surrounding context was exception | |
370 | unwinding, this used to be another way to clobber the exception being | |
371 | thrown.) Previously such an exception was | |
372 | sometimes emitted as a warning, and then either was | |
373 | string-appended to the surrounding C<$@> or completely replaced the | |
374 | surrounding C<$@>, depending on whether that exception and the surrounding | |
375 | C<$@> were strings or objects. Now, an exception in this situation is | |
376 | always emitted as a warning, leaving the surrounding C<$@> untouched. | |
377 | In addition to object destructors, this also affects any function call | |
378 | performed by XS code using the C<G_KEEPERR> flag. | |
379 | ||
1c7f7822 JV |
380 | =item * |
381 | ||
1f539a1a FC |
382 | Warnings for C<warn> can now be objects, in the same way as exceptions |
383 | for C<die>. If an object-based warning gets the default handling, | |
384 | of writing to standard error, it is stringified as | |
385 | before, with the file and line number appended. But | |
386 | a C<$SIG{__WARN__}> handler will now receive an | |
387 | object-based warning as an object, where previously it was passed the | |
388 | result of stringifying the object. | |
389 | ||
1c7f7822 JV |
390 | =back |
391 | ||
1f539a1a FC |
392 | =head2 Other Enhancements |
393 | ||
394 | =head3 Assignment to C<$0> sets the legacy process name with C<prctl()> on Linux | |
395 | ||
1c7f7822 | 396 | On Linux the legacy process name is now set with C<prctl(2)>, in |
1f539a1a | 397 | addition to altering the POSIX name via C<argv[0]> as perl has done |
12f3ad4e | 398 | since version 4.000. Now system utilities that read the legacy process |
1f539a1a | 399 | name such as ps, top and killall will recognize the name you set when |
12f3ad4e | 400 | assigning to C<$0>. The string you supply will be cut off at 16 bytes; |
1f539a1a FC |
401 | this is a limitation imposed by Linux. |
402 | ||
403 | =head3 C<srand()> now returns the seed | |
404 | ||
e1b1739f FC |
405 | This allows programs that need to have repeatable results not to have to come |
406 | up with their own seed-generating mechanism. Instead, they can use C<srand()> | |
1c7f7822 | 407 | and stash the return value for future use. One example is a test program which |
1f539a1a | 408 | has too many combinations to test comprehensively in the time available to it |
e1b1739f | 409 | each run. It can test a random subset each time and, should there be a failure, |
1f539a1a | 410 | log the seed used for that run so that it can later be used to reproduce the |
e1b1739f | 411 | same results. |
1f539a1a FC |
412 | |
413 | =head3 printf-like functions understand post-1980 size modifiers | |
414 | ||
415 | Perl's printf and sprintf operators, and Perl's internal printf replacement | |
416 | function, now understand the C90 size modifiers "hh" (C<char>), "z" | |
417 | (C<size_t>), and "t" (C<ptrdiff_t>). Also, when compiled with a C99 | |
418 | compiler, Perl now understands the size modifier "j" (C<intmax_t>). | |
419 | ||
420 | So, for example, on any modern machine, C<sprintf('%hhd', 257)> returns '1'. | |
421 | ||
422 | =head3 New global variable C<${^GLOBAL_PHASE}> | |
5076a392 FC |
423 | |
424 | A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow | |
40bd7639 | 425 | introspection of the current phase of the perl interpreter. It's explained in |
5076a392 FC |
426 | detail in L<perlvar/"${^GLOBAL_PHASE}"> and |
427 | L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">. | |
428 | ||
1f539a1a | 429 | =head3 C<-d:-foo> calls C<Devel::foo::unimport> |
5076a392 FC |
430 | |
431 | The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>> | |
432 | equivalent to C<-MDevel::foo=bar>, which expands | |
433 | internally to C<use Devel::foo 'bar';>. | |
c2b7148f | 434 | Perl now allows prefixing the module name with C<->, with the same |
5076a392 FC |
435 | semantics as C<-M>, I<i.e.> |
436 | ||
437 | =over 4 | |
438 | ||
439 | =item C<-d:-foo> | |
440 | ||
441 | Equivalent to C<-M-Devel::foo>, expands to | |
442 | C<no Devel::foo;>, calls C<< Devel::foo->unimport() >> | |
443 | if the method exists. | |
444 | ||
445 | =item C<-d:-foo=bar> | |
446 | ||
447 | Equivalent to C<-M-Devel::foo=bar>, expands to C<no Devel::foo 'bar';>, | |
448 | calls C<< Devel::foo->unimport('bar') >> if the method exists. | |
449 | ||
450 | =back | |
451 | ||
e1b1739f | 452 | This is particularly useful for suppressing the default actions of a |
5076a392 FC |
453 | C<Devel::*> module's C<import> method whilst still loading it for debugging. |
454 | ||
1f539a1a | 455 | =head3 Filehandle method calls load L<IO::File> on demand |
5076a392 FC |
456 | |
457 | When a method call on a filehandle would die because the method cannot | |
458 | be resolved, and L<IO::File> has not been loaded, Perl now loads L<IO::File> | |
459 | via C<require> and attempts method resolution again: | |
460 | ||
461 | open my $fh, ">", $file; | |
462 | $fh->binmode(":raw"); # loads IO::File and succeeds | |
463 | ||
464 | This also works for globs like STDOUT, STDERR and STDIN: | |
465 | ||
466 | STDOUT->autoflush(1); | |
467 | ||
468 | Because this on-demand load only happens if method resolution fails, the | |
469 | legacy approach of manually loading an L<IO::File> parent class for partial | |
470 | method support still works as expected: | |
471 | ||
472 | use IO::Handle; | |
473 | open my $fh, ">", $file; | |
474 | $fh->autoflush(1); # IO::File not loaded | |
475 | ||
1c7f7822 | 476 | =head3 Improved IPv6 support |
1984204c FC |
477 | |
478 | The C<Socket> module provides new affordances for IPv6, | |
479 | including implementations of the C<Socket::getaddrinfo()> and | |
480 | C<Socket::getnameinfo()> functions, along with related constants, and a | |
481 | handful of new functions. See L<Socket>. | |
482 | ||
1f539a1a | 483 | =head3 DTrace probes now include package name |
5076a392 FC |
484 | |
485 | The DTrace probes now include an additional argument (C<arg3>) which contains | |
486 | the package the subroutine being entered or left was compiled in. | |
487 | ||
488 | For example using the following DTrace script: | |
489 | ||
490 | perl$target:::sub-entry | |
491 | { | |
492 | printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3)); | |
493 | } | |
494 | ||
495 | and then running: | |
496 | ||
497 | perl -e'sub test { }; test' | |
498 | ||
499 | DTrace will print: | |
500 | ||
501 | main::test | |
502 | ||
9378886b FC |
503 | =head2 New C APIs |
504 | ||
1e463951 | 505 | See L</Internal Changes>. |
9378886b | 506 | |
5076a392 FC |
507 | =head1 Security |
508 | ||
948b8455 | 509 | =head2 User-defined regular expression properties |
5076a392 | 510 | |
1c7f7822 | 511 | L<perlunicode/"User-Defined Character Properties"> documented that you can |
5076a392 | 512 | create custom properties by defining subroutines whose names begin with |
6369b34f | 513 | "In" or "Is". However, Perl did not actually enforce that naming |
1c7f7822 JV |
514 | restriction, so \p{foo::bar} could call foo::bar() if it existed. The documented |
515 | convention is now enforced. | |
5076a392 | 516 | |
1c7f7822 | 517 | Also, Perl no longer allows tainted regular expressions to invoke a |
6369b34f | 518 | user-defined property. It simply dies instead [perl #82616]. |
5076a392 FC |
519 | |
520 | =head1 Incompatible Changes | |
521 | ||
61752d82 FC |
522 | Perl 5.14.0 is not binary-compatible with any previous stable release. |
523 | ||
1e463951 FC |
524 | In addition to the sections that follow, see L</C API Changes>. |
525 | ||
61752d82 FC |
526 | =head2 Regular Expressions and String Escapes |
527 | ||
54c7bb16 | 528 | =head3 \400-\777 |
5076a392 | 529 | |
1c7f7822 JV |
530 | In certain circumstances, C<\400>-C<\777> in regexes have behaved |
531 | differently than they behave in all other double-quote-like contexts. | |
532 | Since 5.10.1, Perl has issued a deprecation warning when this happens. | |
533 | Now, these literals behave the same in all double-quote-like contexts, | |
534 | namely to be equivalent to C<\x{100}> - C<\x{1FF}>, with no deprecation | |
535 | warning. | |
536 | ||
537 | Use of C<\400>-C<\777> in the command line option C<"-0"> retain their | |
538 | conventional meaning. They slurp whole input files; previously, this | |
539 | was documented only for C<"-0777">. | |
540 | ||
541 | Because of various ambiguities, you should use the new | |
542 | C<\o{...}> construct to represent characters in octal instead. | |
5076a392 | 543 | |
61752d82 | 544 | =head3 Most C<\p{}> properties are now immune to case-insensitive matching |
5076a392 | 545 | |
61752d82 | 546 | For most Unicode properties, it doesn't make sense to have them match |
1c7f7822 JV |
547 | differently under C</i> case-insensitive matching. Doing so can lead |
548 | to unexpected results and potential security holes. For example | |
5076a392 | 549 | |
61752d82 | 550 | m/\p{ASCII_Hex_Digit}+/i |
5076a392 | 551 | |
61752d82 | 552 | could previously match non-ASCII characters because of the Unicode |
4cf6a51f KW |
553 | matching rules (although there were a number of bugs with this). Now |
554 | matching under C</i> gives the same results as non-C</i> matching except | |
555 | for those few properties where people have come to expect differences, | |
556 | namely the ones where casing is an integral part of their meaning, such | |
557 | as C<m/\p{Uppercase}/i> and C<m/\p{Lowercase}/i>, both of which match | |
558 | the exact same code points, namely those matched by C<m/\p{Cased}/i>. | |
559 | Details are in L<perlrecharclass/Unicode Properties>. | |
5076a392 | 560 | |
1c7f7822 JV |
561 | User-defined property handlers that need to match differently under C</i> |
562 | must be changed to read the new boolean parameter passed to them which | |
563 | is non-zero if case-insensitive matching is in effect or 0 otherwise. | |
564 | See L<perluniprops/User-Defined Character Properties>. | |
5076a392 | 565 | |
61752d82 | 566 | =head3 \p{} implies Unicode semantics |
5076a392 | 567 | |
61752d82 FC |
568 | Now, a Unicode property match specified in the pattern will indicate |
569 | that the pattern is meant for matching according to Unicode rules, the way | |
bc15a0a0 | 570 | C<\N{}> does. |
5076a392 | 571 | |
61752d82 | 572 | =head3 Regular expressions retain their localeness when interpolated |
5076a392 | 573 | |
61752d82 FC |
574 | Regular expressions compiled under C<"use locale"> now retain this when |
575 | interpolated into a new regular expression compiled outside a | |
576 | C<"use locale">, and vice-versa. | |
5076a392 | 577 | |
61752d82 FC |
578 | Previously, a regular expression interpolated into another one inherited |
579 | the localeness of the surrounding one, losing whatever state it | |
580 | originally had. This is considered a bug fix, but may trip up code that | |
581 | has come to rely on the incorrect behavior. | |
5076a392 | 582 | |
61752d82 | 583 | =head3 Stringification of regexes has changed |
5076a392 FC |
584 | |
585 | Default regular expression modifiers are now notated by using | |
586 | C<(?^...)>. Code relying on the old stringification will fail. The | |
587 | purpose of this is so that when new modifiers are added, such code will | |
588 | not have to change (after this one time), as the stringification will | |
589 | automatically incorporate the new modifiers. | |
590 | ||
591 | Code that needs to work properly with both old- and new-style regexes | |
f318e2e6 | 592 | can avoid the whole issue by using (for Perls since 5.9.5; see L<re>): |
5076a392 FC |
593 | |
594 | use re qw(regexp_pattern); | |
595 | my ($pat, $mods) = regexp_pattern($re_ref); | |
596 | ||
5076a392 FC |
597 | If the actual stringification is important, or older Perls need to be |
598 | supported, you can use something like the following: | |
599 | ||
600 | # Accept both old and new-style stringification | |
601 | my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism'; | |
602 | ||
603 | And then use C<$modifiers> instead of C<-xism>. | |
604 | ||
61752d82 | 605 | =head3 Run-time code blocks in regular expressions inherit pragmata |
5076a392 | 606 | |
1c7f7822 JV |
607 | Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) previously |
608 | did not inherit pragmata (strict, warnings, etc.) if the regular expression | |
61752d82 | 609 | was compiled at run time as happens in cases like these two: |
5076a392 | 610 | |
61752d82 FC |
611 | use re 'eval'; |
612 | $foo =~ $bar; # when $bar contains (?{...}) | |
613 | $foo =~ /$bar(?{ $finished = 1 })/; | |
614 | ||
1c7f7822 JV |
615 | This bug has now been fixed, but code which relied on the buggy behavior |
616 | may need to be fixed to account for the correct behavior. | |
5076a392 | 617 | |
61752d82 | 618 | =head2 Stashes and Package Variables |
5076a392 | 619 | |
61752d82 | 620 | =head3 Localised tied hashes and arrays are no longed tied |
5076a392 | 621 | |
61752d82 | 622 | In the following: |
5076a392 | 623 | |
61752d82 FC |
624 | tie @a, ...; |
625 | { | |
1c7f7822 JV |
626 | local @a; |
627 | # here, @a is a now a new, untied array | |
61752d82 FC |
628 | } |
629 | # here, @a refers again to the old, tied array | |
5076a392 | 630 | |
1c7f7822 JV |
631 | Earlier versions of perl incorrectly tied the new local array. This has |
632 | now been fixed. This fix could however potentially cause a change in | |
633 | behaviour of some code. | |
5076a392 | 634 | |
61752d82 | 635 | =head3 Stashes are now always defined |
5076a392 | 636 | |
61752d82 FC |
637 | C<defined %Foo::> now always returns true, even when no symbols have yet been |
638 | defined in that package. | |
5076a392 | 639 | |
61752d82 FC |
640 | This is a side effect of removing a special case kludge in the tokeniser, |
641 | added for 5.10.0, to hide side effects of changes to the internal storage of | |
1c7f7822 | 642 | hashes. The fix drastically reduces hashes' memory overhead. |
61752d82 FC |
643 | |
644 | Calling defined on a stash has been deprecated since 5.6.0, warned on | |
645 | lexicals since 5.6.0, and warned for stashes (and other package | |
6369b34f | 646 | variables) since 5.12.0. C<defined %hash> has always exposed an |
61752d82 FC |
647 | implementation detail - emptying a hash by deleting all entries from it does |
648 | not make C<defined %hash> false, hence C<defined %hash> is not valid code to | |
6369b34f | 649 | determine whether an arbitrary hash is empty. Instead, use the behaviour |
61752d82 FC |
650 | that an empty C<%hash> always returns false in a scalar context. |
651 | ||
48b31689 FC |
652 | =head3 Clearing stashes |
653 | ||
654 | Stash list assignment C<%foo:: = ()> used to make the stash anonymous | |
40bd7639 | 655 | temporarily while it was being emptied. Consequently, any of its |
48b31689 | 656 | subroutines referenced elsewhere would become anonymous (showing up as |
40bd7639 | 657 | "(unknown)" in C<caller>). Now they retain their package names, such that |
48b31689 FC |
658 | C<caller> will return the original sub name if there is still a reference |
659 | to its typeglob, or "foo::__ANON__" otherwise [perl #79208]. | |
660 | ||
61752d82 | 661 | =head3 Dereferencing typeglobs |
5076a392 FC |
662 | |
663 | If you assign a typeglob to a scalar variable: | |
664 | ||
665 | $glob = *foo; | |
666 | ||
667 | the glob that is copied to C<$glob> is marked with a special flag | |
1c7f7822 JV |
668 | indicating that the glob is just a copy. This allows subsequent |
669 | assignments to C<$glob> to overwrite the glob. The original glob, | |
670 | however, is immutable. | |
5076a392 | 671 | |
370ff23e | 672 | Some Perl operators did not distinguish between these two types of globs. |
5076a392 | 673 | This would result in strange behaviour in edge cases: C<untie $scalar> |
370ff23e | 674 | would not untie the scalar if the last thing assigned to it was a glob |
5076a392 | 675 | (because it treated it as C<untie *$scalar>, which unties a handle). |
f318e2e6 | 676 | Assignment to a glob slot (e.g., C<*$glob = \@some_array>) would simply |
5076a392 FC |
677 | assign C<\@some_array> to C<$glob>. |
678 | ||
679 | To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms) | |
680 | has been modified to make a new immutable glob if its operand is a glob | |
e262cb24 FC |
681 | copy. This allows operators that make a distinction between globs and |
682 | scalars to be modified to treat only immutable globs as globs. (C<tie>, | |
683 | C<tied> and C<untie> have been left as they are for compatibility's sake, | |
6369b34f | 684 | but will warn. See L</Deprecations>.) |
5076a392 FC |
685 | |
686 | This causes an incompatible change in code that assigns a glob to the | |
6369b34f | 687 | return value of C<*{}> when that operator was passed a glob copy. Take the |
5076a392 FC |
688 | following code, for instance: |
689 | ||
690 | $glob = *foo; | |
691 | *$glob = *bar; | |
692 | ||
40bd7639 R |
693 | The C<*$glob> on the second line returns a new immutable glob. That new |
694 | glob is made an alias to C<*bar>. Then it is discarded. So the second | |
5076a392 FC |
695 | assignment has no effect. |
696 | ||
1c7f7822 | 697 | See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for |
5076a392 FC |
698 | more detail. |
699 | ||
61752d82 FC |
700 | =head3 Magic variables outside the main package |
701 | ||
702 | In previous versions of Perl, magic variables like C<$!>, C<%SIG>, etc. would | |
703 | 'leak' into other packages. So C<%foo::SIG> could be used to access signals, | |
704 | C<${"foo::!"}> (with strict mode off) to access C's C<errno>, etc. | |
705 | ||
706 | This was a bug, or an 'unintentional' feature, which caused various ill effects, | |
707 | such as signal handlers being wiped when modules were loaded, etc. | |
708 | ||
709 | This has been fixed (or the feature has been removed, depending on how you see | |
710 | it). | |
711 | ||
a8bd2968 FC |
712 | =head3 local($_) will strip all magic from $_ |
713 | ||
714 | local() on scalar variables will give them a new value, but keep all | |
715 | their magic intact. This has proven to be problematic for the default | |
716 | scalar variable $_, where L<perlsub> recommends that any subroutine | |
717 | that assigns to $_ should localize it first. This would throw an | |
718 | exception if $_ is aliased to a read-only variable, and could have | |
719 | various unintentional side-effects in general. | |
720 | ||
721 | Therefore, as an exception to the general rule, local($_) will not | |
722 | only assign a new value to $_, but also remove all existing magic from | |
723 | it as well. | |
724 | ||
6e925ecb FC |
725 | =head3 Parsing of package and variable names |
726 | ||
727 | The parsing of the names of packages and package variables has changed, in | |
728 | that multiple adjacent pairs of colons (as in foo::::bar) are all treated | |
729 | as package separators. | |
730 | ||
731 | Regardless of this change, the exact parsing of package separators has | |
732 | never been guaranteed and is subject to change in future Perl versions. | |
733 | ||
61752d82 FC |
734 | =head2 Changes to Syntax or to Perl Operators |
735 | ||
736 | =head3 C<given> return values | |
737 | ||
738 | C<given> blocks now return the last evaluated | |
40bd7639 | 739 | expression, or an empty list if the block was exited by C<break>. Thus you |
61752d82 FC |
740 | can now write: |
741 | ||
742 | my $type = do { | |
743 | given ($num) { | |
744 | break when undef; | |
745 | 'integer' when /^[+-]?[0-9]+$/; | |
746 | 'float' when /^[+-]?[0-9]+(?:\.[0-9]+)?$/; | |
747 | 'unknown'; | |
748 | } | |
749 | }; | |
750 | ||
751 | See L<perlsyn/Return value> for details. | |
752 | ||
753 | =head3 Change in the parsing of certain prototypes | |
754 | ||
755 | Functions declared with the following prototypes now behave correctly as unary | |
756 | functions: | |
757 | ||
758 | * | |
759 | \$ \% \@ \* \& | |
760 | \[...] | |
761 | ;$ ;* | |
762 | ;\$ ;\% etc. | |
763 | ;\[...] | |
764 | ||
765 | Due to this bug fix [perl #75904], functions | |
766 | using the C<(*)>, C<(;$)> and C<(;*)> prototypes | |
179813a8 FC |
767 | are parsed with higher precedence than before. So |
768 | in the following example: | |
61752d82 FC |
769 | |
770 | sub foo($); | |
771 | foo $a < $b; | |
772 | ||
773 | the second line is now parsed correctly as C<< foo($a) < $b >>, rather than | |
179813a8 | 774 | C<< foo($a < $b) >>. This happens when one of these operators is used in |
61752d82 FC |
775 | an unparenthesised argument: |
776 | ||
777 | < > <= >= lt gt le ge | |
778 | == != <=> eq ne cmp ~~ | |
779 | & | |
780 | | ^ | |
781 | && | |
782 | || // | |
783 | .. ... | |
784 | ?: | |
785 | = += -= *= etc. | |
786 | ||
787 | =head3 Smart-matching against array slices | |
788 | ||
789 | Previously, the following code resulted in a successful match: | |
790 | ||
791 | my @a = qw(a y0 z); | |
792 | my @b = qw(a x0 z); | |
793 | @a[0 .. $#b] ~~ @b; | |
794 | ||
795 | This odd behaviour has now been fixed [perl #77468]. | |
796 | ||
797 | =head3 Negation treats strings differently from before | |
798 | ||
799 | The unary negation operator C<-> now treats strings that look like numbers | |
800 | as numbers [perl #57706]. | |
801 | ||
802 | =head3 Negative zero | |
803 | ||
804 | Negative zero (-0.0), when converted to a string, now becomes "0" on all | |
179813a8 | 805 | platforms. It used to become "-0" on some, but "0" on others. |
61752d82 FC |
806 | |
807 | If you still need to determine whether a zero is negative, use | |
808 | C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN. | |
809 | ||
810 | =head3 C<:=> is now a syntax error | |
5076a392 FC |
811 | |
812 | Previously C<my $pi := 4;> was exactly equivalent to C<my $pi : = 4;>, | |
813 | with the C<:> being treated as the start of an attribute list, ending before | |
179813a8 FC |
814 | the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is |
815 | now a syntax error. This will allow the future use of C<:=> as a new | |
816 | token. | |
5076a392 FC |
817 | |
818 | We find no Perl 5 code on CPAN using this construction, outside the core's | |
819 | tests for it, so we believe that this change will have very little impact on | |
820 | real-world codebases. | |
821 | ||
822 | If it is absolutely necessary to have empty attribute lists (for example, | |
823 | because of a code generator) then avoid the error by adding a space before | |
824 | the C<=>. | |
825 | ||
d1ef1aa8 FC |
826 | =head3 Change in the parsing of identifiers |
827 | ||
828 | Characters outside the Unicode "XIDStart" set are no longer allowed at the | |
ac245c6a KW |
829 | beginning of an identifier. This means that certain accents and marks |
830 | that normally follow an alphabetic character may no longer be the first | |
831 | character of an identifier. | |
d1ef1aa8 | 832 | |
61752d82 | 833 | =head2 Threads and Processes |
5076a392 | 834 | |
61752d82 | 835 | =head3 Directory handles not copied to threads |
5076a392 | 836 | |
61752d82 FC |
837 | On systems other than Windows that do not have |
838 | a C<fchdir> function, newly-created threads no | |
179813a8 | 839 | longer inherit directory handles from their parent threads. Such programs |
61752d82 | 840 | would usually have crashed anyway [perl #75154]. |
5076a392 | 841 | |
61752d82 | 842 | =head3 C<close> on shared pipes |
5076a392 | 843 | |
61752d82 FC |
844 | The C<close> function no longer waits for the child process to exit if the |
845 | underlying file descriptor is still in use by another thread, to avoid | |
179813a8 | 846 | deadlocks. It returns true in such cases. |
5076a392 | 847 | |
144b6ea2 FC |
848 | =head3 fork() emulation will not wait for signalled children |
849 | ||
850 | On Windows parent processes would not terminate until all forked | |
851 | childred had terminated first. However, C<kill('KILL', ...)> is | |
852 | inherently unstable on pseudo-processes, and C<kill('TERM', ...)> | |
179813a8 | 853 | might not get delivered if the child is blocked in a system call. |
144b6ea2 FC |
854 | |
855 | To avoid the deadlock and still provide a safe mechanism to terminate | |
856 | the hosting process, Perl will now no longer wait for children that | |
857 | have been sent a SIGTERM signal. It is up to the parent process to | |
858 | waitpid() for these children if child clean-up processing must be | |
179813a8 | 859 | allowed to finish. However, it is also the responsibility of the |
144b6ea2 FC |
860 | parent then to avoid the deadlock by making sure the child process |
861 | can't be blocked on I/O either. | |
862 | ||
863 | See L<perlfork> for more information about the fork() emulation on | |
864 | Windows. | |
865 | ||
61752d82 | 866 | =head2 Configuration |
5076a392 | 867 | |
61752d82 | 868 | =head3 Naming fixes in Policy_sh.SH may invalidate Policy.sh |
5076a392 | 869 | |
61752d82 FC |
870 | Several long-standing typos and naming confusions in Policy_sh.SH have |
871 | been fixed, standardizing on the variable names used in config.sh. | |
5076a392 | 872 | |
61752d82 | 873 | This will change the behavior of Policy.sh if you happen to have been |
179813a8 | 874 | accidentally relying on its incorrect behavior. |
f318e2e6 | 875 | |
5a1f7719 FC |
876 | =head3 Perl source code is read in text mode on Windows |
877 | ||
878 | Perl scripts used to be read in binary mode on Windows for the benefit | |
879 | of the ByteLoader module (which is no longer part of core Perl). This | |
880 | had the side effect of breaking various operations on the DATA filehandle, | |
881 | including seek()/tell(), and even simply reading from DATA after file handles | |
882 | have been flushed by a call to system(), backticks, fork() etc. | |
883 | ||
884 | The default build options for Windows have been changed to read Perl source | |
885 | code on Windows in text mode now. Hopefully ByteLoader will be updated on | |
886 | CPAN to automatically handle this situation [perl #28106]. | |
887 | ||
5076a392 FC |
888 | =head1 Deprecations |
889 | ||
1e463951 FC |
890 | See also L</Deprecated C APIs>. |
891 | ||
5076a392 FC |
892 | =head2 Omitting a space between a regular expression and subsequent word |
893 | ||
18139a1b FC |
894 | Omitting a space between a regular expression operator or |
895 | its modifiers and the following word is deprecated. For | |
896 | example, C<< m/foo/sand $bar >> will still be parsed | |
897 | as C<< m/foo/s and $bar >> but will issue a warning. | |
5076a392 | 898 | |
e683df94 KW |
899 | =head2 C<\cI<X>> |
900 | ||
901 | The backslash-c construct was designed as a way of specifying | |
902 | non-printable characters, but there were no restrictions (on ASCII | |
903 | platforms) on what the character following the C<c> could be. Now, | |
904 | a deprecation warning is raised if that character isn't an ASCII character. | |
905 | Also, a deprecation warning is raised for C<"\c{"> (which is the same | |
906 | as simply saying C<";">). | |
907 | ||
4528361d KW |
908 | =head2 C<"\b{"> and C<"\B{"> |
909 | ||
910 | In regular expressions, a literal C<"{"> immediately following a C<"\b"> | |
911 | (not in a bracketed character class) or a C<"\B{"> is now deprecated | |
912 | to allow for its future use by Perl itself. | |
913 | ||
1c7f7822 | 914 | =head2 Deprecation warning added for deprecated-in-core Perl 4-era .pl libraries |
5076a392 FC |
915 | |
916 | This is a mandatory warning, not obeying -X or lexical warning bits. | |
917 | The warning is modelled on that supplied by deprecate.pm for | |
918 | deprecated-in-core .pm libraries. It points to the specific CPAN | |
1c7f7822 JV |
919 | distribution that contains the .pl libraries. The CPAN versions, of |
920 | course, do not generate the warning. | |
5076a392 FC |
921 | |
922 | =head2 List assignment to C<$[> | |
923 | ||
823d0e46 FC |
924 | Assignment to C<$[> was deprecated and started to give warnings in |
925 | Perl version 5.12.0. This version of perl also starts to emit a warning when | |
926 | assigning to C<$[> in list context. This fixes an oversight in 5.12.0. | |
5076a392 FC |
927 | |
928 | =head2 Use of qw(...) as parentheses | |
929 | ||
930 | Historically the parser fooled itself into thinking that C<qw(...)> literals | |
931 | were always enclosed in parentheses, and as a result you could sometimes omit | |
932 | parentheses around them: | |
933 | ||
934 | for $x qw(a b c) { ... } | |
935 | ||
936 | The parser no longer lies to itself in this way. Wrap the list literal in | |
823d0e46 | 937 | parentheses, like this: |
5076a392 FC |
938 | |
939 | for $x (qw(a b c)) { ... } | |
940 | ||
038c245e | 941 | This is being deprecated because C<qw(a b c)> is supposed to mean |
b6cc6faa | 942 | C<"a", "b", "c"> not C<("a", "b", "c")>. I.e., this doesn't compile: |
038c245e AB |
943 | |
944 | for my $i "a", "b", "c" { } | |
945 | ||
946 | So neither should this: | |
947 | ||
948 | for my $i qw(a b c) {} | |
949 | ||
950 | But these both work: | |
951 | ||
952 | for my $i ("a", "b", "c") { } | |
953 | for my $i (qw(a b c)) {} | |
954 | ||
955 | Note that this does not change the behavior of cases like: | |
956 | ||
957 | use POSIX qw(setlocale localeconv) | |
958 | our @EXPORT = qw(foo bar baz); | |
959 | ||
b6cc6faa | 960 | Where a list with or without parentheses could have been provided. |
038c245e | 961 | |
1c7f7822 | 962 | =head2 C<\N{BELL}> |
5076a392 FC |
963 | |
964 | This is because Unicode is using that name for a different character. | |
965 | See L</Unicode Version 6.0 is now supported (mostly)> for more | |
966 | explanation. | |
967 | ||
1c7f7822 | 968 | =head2 C<?PATTERN?> |
5076a392 FC |
969 | |
970 | C<?PATTERN?> (without the initial m) has been deprecated and now produces | |
971 | a warning. This is to allow future use of C<?> in new operators. | |
972 | The match-once functionality is still available in the form of C<m?PATTERN?>. | |
973 | ||
5076a392 FC |
974 | =head2 Tie functions on scalars holding typeglobs |
975 | ||
976 | Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument | |
977 | acts on a file handle if the scalar happens to hold a typeglob. | |
978 | ||
979 | This is a long-standing bug that will be removed in Perl 5.16, as | |
980 | there is currently no way to tie the scalar itself when it holds | |
981 | a typeglob, and no way to untie a scalar that has had a typeglob | |
982 | assigned to it. | |
983 | ||
823d0e46 | 984 | Now there is a deprecation warning whenever a tie |
5076a392 FC |
985 | function is used on a handle without an explicit C<*>. |
986 | ||
18139a1b | 987 | =head2 User-defined case-mapping |
5076a392 | 988 | |
18139a1b FC |
989 | This feature is being deprecated due to its many issues, as documented in |
990 | L<perlunicode/User-Defined Case Mappings (for serious hackers only)>. | |
1c7f7822 | 991 | This feature will be removed in Perl 5.16. Instead use the CPAN module |
e48f36f0 | 992 | L<Unicode::Casing>, which provides improved functionality. |
823d0e46 | 993 | |
18139a1b | 994 | =head2 Deprecated modules |
5076a392 FC |
995 | |
996 | The following modules will be removed from the core distribution in a | |
40bd7639 | 997 | future release, and should be installed from CPAN instead. Distributions |
a60ea503 | 998 | on CPAN which require these should add them to their prerequisites. The |
823d0e46 | 999 | core versions of these modules will issue a deprecation warning. |
5076a392 FC |
1000 | |
1001 | If you ship a packaged version of Perl, either alone or as part of a | |
1002 | larger system, then you should carefully consider the repercussions of | |
823d0e46 | 1003 | core module deprecations. You may want to consider shipping your default |
5076a392 | 1004 | build of Perl with packages for some or all deprecated modules which |
823d0e46 | 1005 | install into C<vendor> or C<site> perl library directories. This will |
5076a392 FC |
1006 | inhibit the deprecation warnings. |
1007 | ||
1008 | Alternatively, you may want to consider patching F<lib/deprecate.pm> | |
1009 | to provide deprecation warnings specific to your packaging system | |
1010 | or distribution of Perl, consistent with how your packaging system | |
1011 | or distribution manages a staged transition from a release where the | |
1012 | installation of a single package provides the given functionality, to | |
1013 | a later release where the system administrator needs to know to install | |
1014 | multiple packages to get that same functionality. | |
1015 | ||
1016 | You can silence these deprecation warnings by installing the modules | |
1017 | in question from CPAN. To install the latest version of all of them, | |
1018 | just install C<Task::Deprecations::5_14>. | |
1019 | ||
1020 | =over | |
1021 | ||
1022 | =item L<Devel::DProf> | |
1023 | ||
1c7f7822 JV |
1024 | We strongly recommend that you install and used L<Devel::NYTProf> instead |
1025 | of this module, as it offers significantly improved profiling and reporting. | |
5076a392 FC |
1026 | |
1027 | =back | |
1028 | ||
5076a392 FC |
1029 | =head1 Performance Enhancements |
1030 | ||
54c7bb16 | 1031 | =head2 "Safe signals" optimisation |
df91d470 | 1032 | |
a60ea503 | 1033 | Signal dispatch has been moved from the runloop into control ops. This |
df91d470 FC |
1034 | should give a few percent speed increase, and eliminates almost all of |
1035 | the speed penalty caused by the introduction of "safe signals" in | |
a60ea503 | 1036 | 5.8.0. Signals should still be dispatched within the same statement as |
df91d470 FC |
1037 | they were previously - if this is not the case, or it is possible to |
1038 | create uninterruptible loops, this is a bug, and reports are encouraged | |
1039 | of how to recreate such issues. | |
1040 | ||
54c7bb16 | 1041 | =head2 Optimisation of shift; and pop; calls without arguments |
df91d470 | 1042 | |
111b6aa7 | 1043 | Two fewer OPs are used for shift and pop calls with no argument (with |
40bd7639 | 1044 | implicit C<@_>). This change makes C<shift;> 5% faster than C<shift @_;> |
111b6aa7 | 1045 | on non-threaded perls and 25% faster on threaded. |
df91d470 | 1046 | |
fa232254 | 1047 | =head2 Optimisation of regexp engine string comparison work |
df91d470 | 1048 | |
fa232254 FC |
1049 | The foldEQ_utf8 API function for case-insensitive comparison of strings (which |
1050 | is used heavily by the regexp engine) was substantially refactored and | |
1051 | optimised - and its documentation much improved as a free bonus gift. | |
df91d470 | 1052 | |
fa232254 | 1053 | =head2 Regular expression compilation speed-up |
df91d470 | 1054 | |
fa232254 FC |
1055 | Compiling regular expressions has been made faster for the case where upgrading |
1056 | the regex to utf8 is necessary but that isn't known when the compilation begins. | |
df91d470 | 1057 | |
fa232254 | 1058 | =head2 String appending is 100 times faster |
df91d470 | 1059 | |
1c7f7822 JV |
1060 | When doing a lot of string appending, perls built to use the system's |
1061 | C<malloc> could end up allocating a lot more memory than needed in a | |
1062 | very inefficient way. | |
fa232254 | 1063 | |
1c7f7822 JV |
1064 | C<sv_grow>, the function used to allocate more memory if necessary |
1065 | when appending to a string, has been taught how to round up the memory | |
fa232254 FC |
1066 | it requests to a certain geometric progression, making it much faster on |
1067 | certain platforms and configurations. On Win32, it's now about 100 times | |
1068 | faster. | |
1069 | ||
1070 | =head2 Eliminate C<PL_*> accessor functions under ithreads | |
1071 | ||
1072 | When C<MULTIPLICITY> was first developed, and interpreter state moved into | |
1c7f7822 JV |
1073 | an interpreter struct, thread and interpreter local C<PL_*> variables |
1074 | were defined as macros that called accessor functions, returning the | |
1075 | address of the value, outside of the perl core. The intent was to allow | |
1076 | members within the interpreter struct to change size without breaking | |
1077 | binary compatibility, so that bug fixes could be merged to a maintenance | |
1078 | branch that necessitated such a size change. This mechanism was redundant | |
40bd7639 | 1079 | and penalised well-behaved code. It has been removed. |
fa232254 FC |
1080 | |
1081 | =head2 Freeing weak references | |
1082 | ||
1c7f7822 | 1083 | When there are many weak references to an object, freeing that object |
fa232254 | 1084 | can under some some circumstances take O(N^2) time to free (where N is the |
1c7f7822 JV |
1085 | number of references). The number of circumstances in which this can happen |
1086 | has been reduced [perl #75254] | |
fa232254 FC |
1087 | |
1088 | =head2 Lexical array and hash assignments | |
1089 | ||
1090 | An earlier optimisation to speed up C<my @array = ...> and | |
1091 | C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0. | |
1092 | ||
1093 | Now we have found another way to speed up these assignments [perl #82110]. | |
df91d470 | 1094 | |
111b6aa7 | 1095 | =head2 C<@_> uses less memory |
df91d470 | 1096 | |
111b6aa7 FC |
1097 | Previously, C<@_> was allocated for every subroutine at compile time with |
1098 | enough space for four entries. Now this allocation is done on demand when | |
1099 | the subroutine is called [perl #72416]. | |
5076a392 | 1100 | |
5076a392 FC |
1101 | =head2 Size optimisations to SV and HV structures |
1102 | ||
1103 | xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and | |
a60ea503 | 1104 | on some systems will cause struct xpvhv to become cache-aligned. To avoid |
5076a392 FC |
1105 | this memory saving causing a slowdown elsewhere, boolean use of HvFILL |
1106 | now calls HvTOTALKEYS instead (which is equivalent) - so while the fill | |
111b6aa7 FC |
1107 | data when actually required are now calculated on demand, the cases when |
1108 | this needs to be done should be few and far between. | |
5076a392 | 1109 | |
111b6aa7 FC |
1110 | The order of structure elements in SV bodies has changed. Effectively, |
1111 | the NV slot has swapped location with STASH and MAGIC. As all access to | |
1112 | SV members is via macros, this should be completely transparent. This | |
5076a392 FC |
1113 | change allows the space saving for PVHVs documented above, and may reduce |
1114 | the memory allocation needed for PVIVs on some architectures. | |
1115 | ||
fa232254 FC |
1116 | C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body |
1117 | they actually use, saving some space. | |
5076a392 | 1118 | |
fa232254 FC |
1119 | Scalars containing regular expressions now only allocate the part of the C<SV> |
1120 | body they actually use, saving some space. | |
5076a392 FC |
1121 | |
1122 | =head2 Memory consumption improvements to Exporter | |
1123 | ||
1124 | The @EXPORT_FAIL AV is no longer created unless required, hence neither is | |
111b6aa7 FC |
1125 | the typeglob backing it. This saves about 200 bytes for every package that |
1126 | uses Exporter but doesn't use this functionality. | |
5076a392 | 1127 | |
111b6aa7 | 1128 | =head2 Memory savings for weak references |
5076a392 | 1129 | |
1c7f7822 JV |
1130 | For weak references, the common case of just a single weak reference |
1131 | per referent has been optimised to reduce the storage required. In this | |
1132 | case it saves the equivalent of one small Perl array per referent. | |
5076a392 | 1133 | |
111b6aa7 | 1134 | =head2 C<%+> and C<%-> use less memory |
5076a392 FC |
1135 | |
1136 | The bulk of the C<Tie::Hash::NamedCapture> module used to be in the perl | |
111b6aa7 | 1137 | core. It has now been moved to an XS module, to reduce the overhead for |
5076a392 FC |
1138 | programs that do not use C<%+> or C<%->. |
1139 | ||
fa232254 | 1140 | =head2 Multiple small improvements to threads |
5076a392 | 1141 | |
fa232254 FC |
1142 | The internal structures of threading now make fewer API calls and fewer |
1143 | allocations, resulting in noticeably smaller object code. Additionally, | |
1144 | many thread context checks have been deferred so that they're only done | |
1145 | when required (although this is only possible for non-debugging builds). | |
5076a392 | 1146 | |
fa232254 | 1147 | =head2 Adjacent pairs of nextstate opcodes are now optimized away |
5076a392 | 1148 | |
fa232254 | 1149 | Previously, in code such as |
5076a392 | 1150 | |
fa232254 | 1151 | use constant DEBUG => 0; |
5076a392 | 1152 | |
fa232254 FC |
1153 | sub GAK { |
1154 | warn if DEBUG; | |
1155 | print "stuff\n"; | |
1156 | } | |
5076a392 | 1157 | |
fa232254 FC |
1158 | the ops for C<warn if DEBUG;> would be folded to a C<null> op (C<ex-const>), but |
1159 | the C<nextstate> op would remain, resulting in a runtime op dispatch of | |
1160 | C<nextstate>, C<nextstate>, .... | |
5076a392 | 1161 | |
fa232254 FC |
1162 | The execution of a sequence of C<nextstate> ops is indistinguishable from just |
1163 | the last C<nextstate> op so the peephole optimizer now eliminates the first of | |
1164 | a pair of C<nextstate> ops, except where the first carries a label, since labels | |
1165 | must not be eliminated by the optimizer and label usage isn't conclusively known | |
1166 | at compile time. | |
5076a392 FC |
1167 | |
1168 | =head1 Modules and Pragmata | |
1169 | ||
1170 | =head2 New Modules and Pragmata | |
1171 | ||
1172 | =over 4 | |
1173 | ||
1174 | =item * | |
1175 | ||
1176 | C<CPAN::Meta::YAML> 0.003 has been added as a dual-life module. It supports a | |
1177 | subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files | |
1178 | included with CPAN distributions or generated by the module installation | |
a60ea503 | 1179 | toolchain. It should not be used for any other general YAML parsing or |
5076a392 FC |
1180 | generation task. |
1181 | ||
1182 | =item * | |
1183 | ||
a60ea503 | 1184 | C<CPAN::Meta> version 2.110440 has been added as a dual-life module. It |
5076a392 | 1185 | provides a standard library to read, interpret and write CPAN distribution |
497da9da | 1186 | metadata files (e.g., META.json and META.yml) which describes a |
5076a392 | 1187 | distribution, its contents, and the requirements for building it and |
a60ea503 | 1188 | installing it. The latest CPAN distribution metadata specification is |
5076a392 FC |
1189 | included as C<CPAN::Meta::Spec> and notes on changes in the specification |
1190 | over time are given in C<CPAN::Meta::History>. | |
1191 | ||
1192 | =item * | |
1193 | ||
c0331f42 | 1194 | C<HTTP::Tiny> 0.012 has been added as a dual-life module. It is a very |
5076a392 FC |
1195 | small, simple HTTP/1.1 client designed for simple GET requests and file |
1196 | mirroring. It has has been added to enable CPAN.pm and CPANPLUS to | |
1197 | "bootstrap" HTTP access to CPAN using pure Perl without relying on external | |
1198 | binaries like F<curl> or F<wget>. | |
1199 | ||
1200 | =item * | |
1201 | ||
1c7f7822 JV |
1202 | C<JSON::PP> 2.27105 has been added as a dual-life module to allow CPAN |
1203 | clients to read F<META.json> files in CPAN distributions. | |
5076a392 FC |
1204 | |
1205 | =item * | |
1206 | ||
21ef4e45 | 1207 | C<Module::Metadata> 1.000004 has been added as a dual-life module. It gathers |
5076a392 FC |
1208 | package and POD information from Perl module files. It is a standalone module |
1209 | based on Module::Build::ModuleInfo for use by other module installation | |
1210 | toolchain components. Module::Build::ModuleInfo has been deprecated in | |
1211 | favor of this module instead. | |
1212 | ||
1213 | =item * | |
1214 | ||
1215 | C<Perl::OSType> 1.002 has been added as a dual-life module. It maps Perl | |
497da9da R |
1216 | operating system names (e.g., 'dragonfly' or 'MSWin32') to more generic types |
1217 | with standardized names (e.g., "Unix" or "Windows"). It has been refactored | |
5076a392 FC |
1218 | out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into |
1219 | a single location for easier maintenance. | |
1220 | ||
1221 | =item * | |
1222 | ||
1223 | The following modules were added by the C<Unicode::Collate> | |
a60ea503 | 1224 | upgrade. See below for details. |
5076a392 FC |
1225 | |
1226 | C<Unicode::Collate::CJK::Big5> | |
1227 | ||
1228 | C<Unicode::Collate::CJK::GB2312> | |
1229 | ||
1230 | C<Unicode::Collate::CJK::JISX0208> | |
1231 | ||
1232 | C<Unicode::Collate::CJK::Korean> | |
1233 | ||
1234 | C<Unicode::Collate::CJK::Pinyin> | |
1235 | ||
1236 | C<Unicode::Collate::CJK::Stroke> | |
1237 | ||
1238 | =item * | |
1239 | ||
1240 | C<Version::Requirements> version 0.101020 has been added as a dual-life | |
1241 | module. It provides a standard library to model and manipulates module | |
1242 | prerequisites and version constraints as defined in the L<CPAN::Meta::Spec>. | |
1243 | ||
1244 | =back | |
1245 | ||
a5794e94 | 1246 | =head2 Updated Modules and Pragma |
5076a392 FC |
1247 | |
1248 | =over 4 | |
1249 | ||
1250 | =item * | |
1251 | ||
81a53be2 FR |
1252 | C<attributes> has been upgraded from version 0.12 to 0.14. |
1253 | ||
1254 | =item * | |
1255 | ||
5076a392 FC |
1256 | C<Archive::Extract> has been upgraded from version 0.38 to 0.48. |
1257 | ||
1258 | Updates since 0.38 include: a safe print method that guards | |
1259 | Archive::Extract from changes to $\; a fix to the tests when run in core | |
1984204c FC |
1260 | perl; support for TZ files; a modification for the lzma |
1261 | logic to favour IO::Uncompress::Unlzma; and a fix | |
1262 | for an issue with NetBSD-current and its new unzip | |
5076a392 FC |
1263 | executable. |
1264 | ||
1265 | =item * | |
1266 | ||
1267 | C<Archive::Tar> has been upgraded from version 1.54 to 1.76. | |
1268 | ||
1984204c FC |
1269 | Important changes since 1.54 include the following: |
1270 | ||
1271 | =over | |
1272 | ||
1273 | =item * | |
1274 | ||
1275 | Compatibility with busybox implementations of tar | |
1276 | ||
1277 | =item * | |
1278 | ||
1279 | A fix so that C<write()> and C<create_archive()> | |
1280 | close only handles they opened | |
1281 | ||
1282 | =item * | |
1283 | ||
1284 | A bug was fixed regarding the exit code of extract_archive. | |
5076a392 | 1285 | |
1984204c FC |
1286 | =item * |
1287 | ||
4f978a3b | 1288 | The C<ptar> utility has a new option to allow safe |
5076a392 FC |
1289 | creation of tarballs without world-writable files on Windows, allowing those |
1290 | archives to be uploaded to CPAN. | |
1291 | ||
1984204c FC |
1292 | =item * |
1293 | ||
1294 | A new ptargrep utility for using regular expressions against | |
5076a392 FC |
1295 | the contents of files in a tar archive. |
1296 | ||
1984204c FC |
1297 | =item * |
1298 | ||
1299 | Pax extended headers are now skipped. | |
1300 | ||
1301 | =back | |
5076a392 FC |
1302 | |
1303 | =item * | |
1304 | ||
fcd5df6d FR |
1305 | C<Attribute::Handlers> has been upgraded from version 0.87 to 0.89. |
1306 | ||
1307 | =item * | |
1308 | ||
3f5a47e4 FR |
1309 | C<autodie> has been upgraded from version 2.06_01 to 2.1001. |
1310 | ||
1311 | =item * | |
1312 | ||
578e7c9d FR |
1313 | C<AutoLoader> has been upgraded from version 5.70 to 5.71. |
1314 | ||
1315 | =item * | |
1316 | ||
a13baafd | 1317 | C<B> has been upgraded from version 1.23 to 1.29. |
5076a392 FC |
1318 | |
1319 | It no longer crashes when taking apart a C<y///> containing characters | |
1320 | outside the octet range or compiled in a C<use utf8> scope. | |
1321 | ||
1322 | The size of the shared object has been reduced by about 40%, with no | |
1323 | reduction in functionality. | |
1324 | ||
1325 | =item * | |
1326 | ||
4a75fbf5 | 1327 | C<B::Concise> has been upgraded from version 0.78 to 0.83. |
5076a392 FC |
1328 | |
1329 | B::Concise marks rv2sv, rv2av and rv2hv ops with the new OPpDEREF flag | |
1330 | as "DREFed". | |
1331 | ||
1332 | It no longer produces mangled output with the C<-tree> option | |
1333 | [perl #80632]. | |
1334 | ||
1335 | =item * | |
1336 | ||
6bb8c1e3 FR |
1337 | C<B::Debug> has been upgraded from version 1.12 to 1.16. |
1338 | ||
1339 | =item * | |
1340 | ||
c67a4e29 | 1341 | C<B::Deparse> has been upgraded from version 0.96 to 1.03. |
5076a392 | 1342 | |
1984204c | 1343 | The deparsing of a nextstate op has changed when it has both a |
5076a392 FC |
1344 | change of package (relative to the previous nextstate), or a change of |
1345 | C<%^H> or other state, and a label. Previously the label was emitted | |
cdc10f43 | 1346 | first, but now the label is emitted last (5.12.1). |
5076a392 | 1347 | |
5a553547 FC |
1348 | The C<no 5.13.2> or similar form is now correctly handled by B::Deparse |
1349 | (5.12.3). | |
5076a392 FC |
1350 | |
1351 | B::Deparse now properly handles the code that applies a conditional | |
1352 | pattern match against implicit C<$_> as it was fixed in [perl #20444]. | |
1353 | ||
1984204c FC |
1354 | Deparsing of C<our> followed by a variable with funny characters |
1355 | (as permitted under the C<utf8> pragma) has also been fixed [perl #33752]. | |
5076a392 FC |
1356 | |
1357 | =item * | |
1358 | ||
d97c5d3b FR |
1359 | C<B::Lint> has been upgraded from version 1.11_01 to 1.13. |
1360 | ||
1361 | =item * | |
1362 | ||
5aef2c44 FR |
1363 | C<base> has been upgraded from version 2.15 to 2.16. |
1364 | ||
1365 | =item * | |
1366 | ||
876607aa FR |
1367 | C<Benchmark> has been upgraded from version 1.11 to 1.12. |
1368 | ||
1369 | =item * | |
1370 | ||
0f3a8103 | 1371 | C<bignum> has been upgraded from version 0.23 to 0.27. |
e539ae69 FR |
1372 | |
1373 | =item * | |
1374 | ||
c74c1fa8 | 1375 | C<Carp> has been upgraded from version 1.15 to 1.20. |
5076a392 FC |
1376 | |
1377 | L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR"> overrides and | |
d430b8e7 FC |
1378 | avoids using bogus C<@DB::args>. To provide backtraces, |
1379 | Carp relies on particular behaviour of the C<caller> | |
1380 | built-in. Carp now detects if other code has | |
5076a392 | 1381 | overridden this with an incomplete implementation, and modifies its backtrace |
d430b8e7 FC |
1382 | accordingly. Previously incomplete overrides would cause incorrect values |
1383 | in backtraces (best case), or obscure fatal errors (worst case). | |
5076a392 FC |
1384 | |
1385 | This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules | |
d430b8e7 | 1386 | overriding C<caller()> incorrectly (5.12.2). |
5076a392 | 1387 | |
1984204c | 1388 | It now also avoids using regular expressions that cause perl to |
5076a392 FC |
1389 | load its Unicode tables, in order to avoid the 'BEGIN not safe after |
1390 | errors' error that will ensue if there has been a syntax error | |
1391 | [perl #82854]. | |
1392 | ||
1393 | =item * | |
1394 | ||
9eb7ad55 | 1395 | C<CGI> has been upgraded from version 3.48 to 3.52. |
5076a392 FC |
1396 | |
1397 | This provides the following security fixes: the MIME boundary in | |
1984204c FC |
1398 | multipart_init is now random and the handling of |
1399 | newlines embedded in header values has been improved. | |
5076a392 FC |
1400 | |
1401 | =item * | |
1402 | ||
5076a392 FC |
1403 | C<Compress::Raw::Bzip2> has been upgraded from version 2.024 to 2.033. |
1404 | ||
1984204c | 1405 | It has been updated to use bzip2 1.0.6. |
5076a392 FC |
1406 | |
1407 | =item * | |
1408 | ||
51090521 FR |
1409 | C<Compress::Raw::Zlib> has been upgraded from version 2.024 to 2.033. |
1410 | ||
1411 | =item * | |
1412 | ||
87c7b53d FC |
1413 | C<constant> has been upgraded from version 1.20 to 1.21. |
1414 | ||
1415 | Unicode constants work once more. They have been broken since perl 5.10.0 | |
1416 | [CPAN RT #67525]. | |
1417 | ||
1418 | =item * | |
1419 | ||
f75b7efc | 1420 | C<CPAN> has been upgraded from version 1.94_56 to 1.9600. |
1984204c FC |
1421 | |
1422 | Major highlights: | |
5076a392 FC |
1423 | |
1424 | =over 4 | |
1425 | ||
1984204c | 1426 | =item * much less configuration dialog hassle |
5076a392 | 1427 | |
1984204c | 1428 | =item * support for META/MYMETA.json |
5076a392 | 1429 | |
1984204c | 1430 | =item * support for local::lib |
5076a392 | 1431 | |
1984204c | 1432 | =item * support for HTTP::Tiny to reduce the dependency on ftp sites |
5076a392 | 1433 | |
1984204c | 1434 | =item * automatic mirror selection |
5076a392 | 1435 | |
1984204c | 1436 | =item * iron out all known bugs in configure_requires |
5076a392 | 1437 | |
1984204c FC |
1438 | =item * support for distributions compressed with bzip2 |
1439 | ||
1440 | =item * allow Foo/Bar.pm on the commandline to mean Foo::Bar | |
1441 | ||
1442 | =back | |
5076a392 FC |
1443 | |
1444 | =item * | |
1445 | ||
d430b8e7 FC |
1446 | C<CPANPLUS> has been upgraded from version 0.90 to 0.9103. |
1447 | ||
1448 | A change to F<cpanp-run-perl> | |
1449 | resolves L<RT #55964|http://rt.cpan.org/Public/Bug/Display.html?id=55964> | |
1450 | and L<RT #57106|http://rt.cpan.org/Public/Bug/Display.html?id=57106>, both | |
1451 | of which related to failures to install distributions that use | |
1452 | C<Module::Install::DSL> (5.12.2). | |
5076a392 | 1453 | |
1984204c FC |
1454 | A dependency on Config was not recognised as a |
1455 | core module dependency. This has been fixed. | |
5076a392 | 1456 | |
1984204c | 1457 | CPANPLUS now includes support for META.json and MYMETA.json. |
5076a392 FC |
1458 | |
1459 | =item * | |
1460 | ||
4467e8f7 FR |
1461 | C<CPANPLUS::Dist::Build> has been upgraded from version 0.46 to 0.54. |
1462 | ||
1463 | =item * | |
1464 | ||
5076a392 FC |
1465 | C<Data::Dumper> has been upgraded from version 2.125 to 2.130_02. |
1466 | ||
40bd7639 | 1467 | The indentation used to be off when C<$Data::Dumper::Terse> was set. This |
4ed2cea4 FC |
1468 | has been fixed [perl #73604]. |
1469 | ||
1984204c FC |
1470 | This upgrade also fixes a crash when using custom sort functions that might |
1471 | cause the stack to change [perl #74170]. | |
5076a392 FC |
1472 | |
1473 | C<Dumpxs> no longer crashes with globs returned by C<*$io_ref> | |
1474 | [perl #72332]. | |
1475 | ||
1476 | =item * | |
1477 | ||
549d34f5 FR |
1478 | C<DB_File> has been upgraded from version 1.820 to 1.821. |
1479 | ||
1480 | =item * | |
1481 | ||
851dbda2 FR |
1482 | C<DBM_Filter> has been upgraded from version 0.03 to 0.04. |
1483 | ||
1484 | =item * | |
1485 | ||
5076a392 FC |
1486 | C<Devel::DProf> has been upgraded from version 20080331.00 to 20110228.00. |
1487 | ||
1488 | Merely loading C<Devel::DProf> now no longer triggers profiling to start. | |
1489 | C<use Devel::DProf> and C<perl -d:DProf ...> still behave as before and start | |
1490 | the profiler. | |
1491 | ||
1492 | NOTE: C<Devel::DProf> is deprecated and will be removed from a future | |
1984204c | 1493 | version of Perl. We strongly recommend that you install and use |
5076a392 FC |
1494 | L<Devel::NYTProf> instead, as it offers significantly improved |
1495 | profiling and reporting. | |
1496 | ||
1497 | =item * | |
1498 | ||
868625d2 FR |
1499 | C<Devel::Peek> has been upgraded from version 1.04 to 1.07. |
1500 | ||
1501 | =item * | |
1502 | ||
66899ca3 FR |
1503 | C<Devel::SelfStubber> has been upgraded from version 1.03 to 1.05. |
1504 | ||
1505 | =item * | |
1506 | ||
5076a392 FC |
1507 | C<diagnostics> has been upgraded from version 1.19 to 1.22. |
1508 | ||
1509 | It now renders pod links slightly better, and has been taught to find | |
1510 | descriptions for messages that share their descriptions with other | |
1511 | messages. | |
1512 | ||
1513 | =item * | |
1514 | ||
1515 | C<Digest::MD5> has been upgraded from version 2.39 to 2.51. | |
1516 | ||
1517 | It is now safe to use this module in combination with threads. | |
1518 | ||
1519 | =item * | |
1520 | ||
1521 | C<Digest::SHA> has been upgraded from version 5.47 to 5.61. | |
1522 | ||
1523 | C<shasum> now more closely mimics C<sha1sum>/C<md5sum>. | |
1524 | ||
1525 | C<Addfile> accepts all POSIX filenames. | |
1526 | ||
1984204c FC |
1527 | New SHA-512/224 and SHA-512/256 transforms (ref. NIST Draft FIPS 180-4 |
1528 | [February 2011]) | |
5076a392 FC |
1529 | |
1530 | =item * | |
1531 | ||
88410521 FR |
1532 | C<DirHandle> has been upgraded from version 1.03 to 1.04. |
1533 | ||
1534 | =item * | |
1535 | ||
e53cbaa3 FR |
1536 | C<Dumpvalue> has been upgraded from version 1.13 to 1.16. |
1537 | ||
1538 | =item * | |
1539 | ||
31e8b85a | 1540 | C<DynaLoader> has been upgraded from version 1.10 to 1.13. |
5076a392 FC |
1541 | |
1542 | It fixes a buffer overflow when passed a very long file name. | |
1543 | ||
1544 | It no longer inherits from AutoLoader; hence it no longer | |
1545 | produces weird error messages for unsuccessful method calls on classes that | |
1546 | inherit from DynaLoader [perl #84358]. | |
1547 | ||
1548 | =item * | |
1549 | ||
1550 | C<Encode> has been upgraded from version 2.39 to 2.42. | |
1551 | ||
1552 | Now, all 66 Unicode non-characters are treated the same way U+FFFF has | |
1984204c FC |
1553 | always been treated; in cases when it was disallowed, all 66 are |
1554 | disallowed; in those cases where it warned, all 66 warn. | |
5076a392 FC |
1555 | |
1556 | =item * | |
1557 | ||
68f90ac3 FR |
1558 | C<Env> has been upgraded from version 1.01 to 1.02. |
1559 | ||
1560 | =item * | |
1561 | ||
5076a392 FC |
1562 | C<Errno> has been upgraded from version 1.11 to 1.13. |
1563 | ||
1564 | The implementation of C<Errno> has been refactored to use about 55% less memory. | |
5076a392 FC |
1565 | |
1566 | On some platforms with unusual header files, like Win32/gcc using mingw64 | |
1567 | headers, some constants which weren't actually error numbers have been exposed | |
1568 | by C<Errno>. This has been fixed [perl #77416]. | |
1569 | ||
1570 | =item * | |
1571 | ||
1572 | C<Exporter> has been upgraded from version 5.64_01 to 5.64_03. | |
1573 | ||
1574 | Exporter no longer overrides C<$SIG{__WARN__}> [perl #74472] | |
1575 | ||
1576 | =item * | |
1577 | ||
7287d036 | 1578 | C<ExtUtils::CBuilder> has been upgraded from version 0.27 to 0.280203. |
25fe7f8f FR |
1579 | |
1580 | =item * | |
1581 | ||
2292e71e FR |
1582 | C<ExtUtils::Command> has been upgraded from version 1.16 to 1.17. |
1583 | ||
1584 | =item * | |
1585 | ||
5076a392 FC |
1586 | C<ExtUtils::Constant> has been upgraded from 0.22 to 0.23. |
1587 | ||
1588 | The C<AUTOLOAD> helper code generated by C<ExtUtils::Constant::ProxySubs> | |
1589 | can now C<croak> for missing constants, or generate a complete C<AUTOLOAD> | |
1984204c FC |
1590 | subroutine in XS, allowing simplification of many modules that use it |
1591 | (C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<I18N::Langinfo>, C<POSIX>, | |
1592 | C<Socket>). | |
5076a392 FC |
1593 | |
1594 | C<ExtUtils::Constant::ProxySubs> can now optionally push the names of all | |
1984204c | 1595 | constants onto the package's C<@EXPORT_OK>. |
5076a392 FC |
1596 | |
1597 | =item * | |
1598 | ||
588c5853 FR |
1599 | C<ExtUtils::Install> has been upgraded from version 1.55 to 1.56. |
1600 | ||
1601 | =item * | |
1602 | ||
5418ffb3 FR |
1603 | C<ExtUtils::MakeMaker> has been upgraded from version 6.56 to 6.57_05. |
1604 | ||
1605 | =item * | |
1606 | ||
f40ab45f FR |
1607 | C<ExtUtils::Manifest> has been upgraded from version 1.57 to 1.58. |
1608 | ||
1609 | =item * | |
1610 | ||
10fb15d2 | 1611 | C<ExtUtils::ParseXS> has been upgraded from version 2.21 to 2.2210. |
b7064dd7 FR |
1612 | |
1613 | =item * | |
1614 | ||
8b87be80 | 1615 | C<Fcntl> has been upgraded from version 1.06 to 1.11. |
26f7fa64 FR |
1616 | |
1617 | =item * | |
1618 | ||
da25e274 | 1619 | C<File::Basename> has been upgraded from version 2.78 to 2.82. |
8b87be80 FR |
1620 | |
1621 | =item * | |
1622 | ||
05102622 FR |
1623 | C<File::CheckTree> has been upgraded from version 4.4 to 4.41. |
1624 | ||
1625 | =item * | |
1626 | ||
65d78858 FR |
1627 | C<File::Copy> has been upgraded from version 2.17 to 2.21. |
1628 | ||
1629 | =item * | |
1630 | ||
e12786fa | 1631 | C<File::DosGlob> has been upgraded from version 1.01 to 1.04. |
5076a392 FC |
1632 | |
1633 | It allows patterns containing literal parentheses (they no longer need to | |
1984204c FC |
1634 | be escaped). On Windows, it no longer |
1635 | adds an extra F<./> to the file names | |
5076a392 FC |
1636 | returned when the pattern is a relative glob with a drive specification, |
1637 | like F<c:*.pl> [perl #71712]. | |
1638 | ||
1639 | =item * | |
1640 | ||
1641 | C<File::Fetch> has been upgraded from version 0.24 to 0.32. | |
1642 | ||
1643 | C<HTTP::Lite> is now supported for 'http' scheme. | |
1644 | ||
1645 | The C<fetch> utility is supported on FreeBSD, NetBSD and | |
1646 | Dragonfly BSD for the C<http> and C<ftp> schemes. | |
1647 | ||
1648 | =item * | |
1649 | ||
23f2cbb1 | 1650 | C<File::Find> has been upgraded from version 1.15 to 1.19. |
5076a392 | 1651 | |
1984204c | 1652 | It improves handling of backslashes on Windows, so that paths like |
5076a392 FC |
1653 | F<c:\dir\/file> are no longer generated [perl #71710]. |
1654 | ||
1655 | =item * | |
1656 | ||
0ae9f678 FR |
1657 | C<File::Glob> has been upgraded from version 1.07 to 1.12. |
1658 | ||
1659 | =item * | |
1660 | ||
d430b8e7 FC |
1661 | C<File::Spec> has been upgraded from version 3.31 to 3.33. |
1662 | ||
1663 | Several portability fixes were made in C<File::Spec::VMS>: a colon is now | |
1664 | recognized as a delimiter in native filespecs; caret-escaped delimiters are | |
1665 | recognized for better handling of extended filespecs; C<catpath()> returns | |
1666 | an empty directory rather than the current directory if the input directory | |
1667 | name is empty; C<abs2rel()> properly handles Unix-style input (5.12.2). | |
1668 | ||
1669 | =item * | |
1670 | ||
46ba0657 | 1671 | C<File::stat> has been upgraded from 1.02 to 1.05. |
5076a392 FC |
1672 | |
1673 | The C<-x> and C<-X> file test operators now work correctly under the root | |
1674 | user. | |
1675 | ||
1676 | =item * | |
1677 | ||
b7edcc3c FR |
1678 | C<Filter::Simple> has been upgraded from version 0.84 to 0.86. |
1679 | ||
1680 | =item * | |
1681 | ||
dc6857fd | 1682 | C<GDBM_File> has been upgraded from 1.10 to 1.14. |
5076a392 FC |
1683 | |
1684 | This fixes a memory leak when DBM filters are used. | |
1685 | ||
1686 | =item * | |
1687 | ||
6e107b45 | 1688 | C<Hash::Util> has been upgraded from 0.07 to 0.11. |
5076a392 | 1689 | |
1984204c FC |
1690 | Hash::Util no longer emits spurious "uninitialized" warnings when |
1691 | recursively locking hashes that have undefined values [perl #74280]. | |
5076a392 FC |
1692 | |
1693 | =item * | |
1694 | ||
89ce9b34 FR |
1695 | C<Hash::Util::FieldHash> has been upgraded from version 1.04 to 1.09. |
1696 | ||
1697 | =item * | |
1698 | ||
eec33fe6 FR |
1699 | C<I18N::Collate> has been upgraded from version 1.01 to 1.02. |
1700 | ||
1701 | =item * | |
1702 | ||
ad5f8f47 | 1703 | C<I18N::Langinfo> has been upgraded from version 0.03 to 0.08. |
5076a392 FC |
1704 | |
1705 | C<langinfo()> now defaults to using C<$_> if there is no argument given, just | |
5334145a | 1706 | as the documentation has always claimed. |
5076a392 FC |
1707 | |
1708 | =item * | |
1709 | ||
c41635f7 FR |
1710 | C<I18N::LangTags> has been upgraded from version 0.35 to 0.35_01. |
1711 | ||
1712 | =item * | |
1713 | ||
98a6a4ff FR |
1714 | C<if> has been upgraded from version 0.05 to 0.0601. |
1715 | ||
1716 | =item * | |
1717 | ||
f6ff7fb6 FR |
1718 | C<IO> has been upgraded from version 1.25_02 to 1.25_04. |
1719 | ||
582bf58c FR |
1720 | This version of C<IO> includes a new C<IO::Select>, which now allows IO::Handle |
1721 | objects (and objects in derived classes) to be removed from an IO::Select set | |
1722 | even if the underlying file descriptor is closed or invalid. | |
5076a392 FC |
1723 | |
1724 | =item * | |
1725 | ||
d07561d3 | 1726 | C<IPC::Cmd> has been upgraded from version 0.54 to 0.70. |
5076a392 | 1727 | |
1984204c FC |
1728 | Resolves an issue with splitting Win32 command lines. An argument |
1729 | consisting of the single character "0" used to be omitted (CPAN RT #62961). | |
5076a392 FC |
1730 | |
1731 | =item * | |
1732 | ||
3f16e4eb | 1733 | C<IPC::Open3> has been upgraded from 1.05 to 1.09. |
5076a392 | 1734 | |
4ed2cea4 FC |
1735 | C<open3> now produces an error if the C<exec> call fails, allowing this |
1736 | condition to be distinguished from a child process that exited with a | |
1737 | non-zero status [perl #72016]. | |
1738 | ||
5076a392 FC |
1739 | The internal C<xclose> routine now knows how to handle file descriptors, as |
1740 | documented, so duplicating STDIN in a child process using its file | |
1741 | descriptor now works [perl #76474]. | |
1742 | ||
1743 | =item * | |
1744 | ||
c8b41807 FR |
1745 | C<IPC::SysV> has been upgraded from version 2.01 to 2.03. |
1746 | ||
1747 | =item * | |
1748 | ||
ef79f038 FR |
1749 | C<lib> has been upgraded from version 0.62 to 0.63. |
1750 | ||
1751 | =item * | |
1752 | ||
5b1884f4 | 1753 | C<Locale::Maketext> has been upgraded from version 1.14 to 1.19. |
5076a392 | 1754 | |
1984204c | 1755 | Locale::Maketext now supports external caches. |
5076a392 | 1756 | |
1984204c FC |
1757 | This upgrade also fixes an infinite loop in |
1758 | C<Locale::Maketext::Guts::_compile()> when | |
5076a392 FC |
1759 | working with tainted values (CPAN RT #40727). |
1760 | ||
1984204c | 1761 | C<< ->maketext >> calls will now back up and restore C<$@> so that error |
5076a392 FC |
1762 | messages are not suppressed (CPAN RT #34182). |
1763 | ||
1764 | =item * | |
1765 | ||
3811bd2b FR |
1766 | C<Log::Message> has been upgraded from version 0.02 to 0.04. |
1767 | ||
1768 | =item * | |
1769 | ||
8eb65377 FR |
1770 | C<Log::Message::Simple> has been upgraded from version 0.06 to 0.08. |
1771 | ||
1772 | =item * | |
1773 | ||
5076a392 FC |
1774 | C<Math::BigInt> has been upgraded from version 1.89_01 to 1.994. |
1775 | ||
1776 | This fixes, among other things, incorrect results when computing binomial | |
1777 | coefficients [perl #77640]. | |
1778 | ||
1984204c | 1779 | It also prevents C<sqrt($int)> from crashing under C<use bigrat;> |
5076a392 FC |
1780 | [perl #73534]. |
1781 | ||
1782 | =item * | |
1783 | ||
846c1cec FR |
1784 | C<Math::BigInt::FastCalc> has been upgraded from version 0.19 to 0.28. |
1785 | ||
1786 | =item * | |
1787 | ||
fce4aef3 FR |
1788 | C<Math::BigRat> has been upgraded from version 0.24 to 0.26_02. |
1789 | ||
1790 | =item * | |
1791 | ||
12e26027 FR |
1792 | C<Memoize> has been upgraded from version 1.01_03 to 1.02. |
1793 | ||
1794 | =item * | |
1795 | ||
5076a392 FC |
1796 | C<MIME::Base64> has been upgraded from 3.08 to 3.13. |
1797 | ||
1798 | Includes new functions to calculate the length of encoded and decoded | |
1799 | base64 strings. | |
1800 | ||
1801 | Now provides C<encode_base64url> and C<decode_base64url> functions to process | |
1802 | the base64 scheme for "URL applications". | |
1803 | ||
1804 | =item * | |
1805 | ||
1806 | C<Module::Build> has been upgraded from version 0.3603 to 0.3800. | |
1807 | ||
1808 | A notable change is the deprecation of several modules. | |
1809 | Module::Build::Version has been deprecated and Module::Build now relies | |
1810 | directly upon L<version>. Module::Build::ModuleInfo has been deprecated in | |
1811 | favor of a standalone copy of it called L<Module::Metadata>. | |
1812 | Module::Build::YAML has been deprecated in favor of L<CPAN::Meta::YAML>. | |
1813 | ||
1814 | Module::Build now also generates META.json and MYMETA.json files | |
1815 | in accordance with version 2 of the CPAN distribution metadata specification, | |
1816 | L<CPAN::Meta::Spec>. The older format META.yml and MYMETA.yml files are | |
1817 | still generated, as well. | |
1818 | ||
1819 | =item * | |
1820 | ||
7259fe26 | 1821 | C<Module::CoreList> has been upgraded from version 2.29 to 2.47. |
5076a392 FC |
1822 | |
1823 | Besides listing the updated core modules of this release, it also stops listing | |
1984204c | 1824 | the C<Filespec> module. That module never existed in core. The scripts |
5076a392 | 1825 | generating C<Module::CoreList> confused it with C<VMS::Filespec>, which actually |
1984204c | 1826 | is a core module as of perl 5.8.7. |
5076a392 FC |
1827 | |
1828 | =item * | |
1829 | ||
193af05b FR |
1830 | C<Module::Load> has been upgraded from version 0.16 to 0.18. |
1831 | ||
1832 | =item * | |
1833 | ||
5b3a054f FR |
1834 | C<Module::Load::Conditional> has been upgraded from version 0.34 to 0.44. |
1835 | ||
1836 | =item * | |
1837 | ||
01835e3a FR |
1838 | C<mro> has been upgraded from version 1.02 to 1.07. |
1839 | ||
1840 | =item * | |
1841 | ||
bfe7bf96 | 1842 | C<NDBM_File> has been upgraded from version 1.08 to 1.12. |
4f978a3b FR |
1843 | |
1844 | This fixes a memory leak when DBM filters are used. | |
1845 | ||
1846 | =item * | |
1847 | ||
d0aa5c91 FR |
1848 | C<Net::Ping> has been upgraded from version 2.36 to 2.38. |
1849 | ||
1850 | =item * | |
1851 | ||
d44b8a8c FR |
1852 | C<NEXT> has been upgraded from version 0.64 to 0.65. |
1853 | ||
1854 | =item * | |
1855 | ||
678d4fd4 FR |
1856 | C<Object::Accessor> has been upgraded from version 0.36 to 0.38. |
1857 | ||
1858 | =item * | |
1859 | ||
34188656 | 1860 | C<ODBM_File> have been upgraded from version 1.07 to 1.10. |
5076a392 FC |
1861 | |
1862 | This fixes a memory leak when DBM filters are used. | |
1863 | ||
1864 | =item * | |
1865 | ||
4c69840c FR |
1866 | C<Opcode> has been upgraded from version 1.15 to 1.18. |
1867 | ||
1868 | =item * | |
1869 | ||
f4c5ae54 | 1870 | C<overload> has been upgraded from 1.10 to 1.13. |
5076a392 FC |
1871 | |
1872 | C<overload::Method> can now handle subroutines that are themselves blessed | |
1873 | into overloaded classes [perl #71998]. | |
1874 | ||
40bd7639 | 1875 | The documentation has greatly improved. See L</Documentation> below. |
5076a392 FC |
1876 | |
1877 | =item * | |
1878 | ||
f84c796e FR |
1879 | C<Params::Check> has been upgraded from version 0.26 to 0.28. |
1880 | ||
1881 | =item * | |
1882 | ||
550ee92b FR |
1883 | C<parent> has been upgraded from version 0.223 to 0.225. |
1884 | ||
1885 | =item * | |
1886 | ||
5076a392 FC |
1887 | C<Parse::CPAN::Meta> has been upgraded from version 1.40 to 1.4401. |
1888 | ||
1984204c | 1889 | The latest Parse::CPAN::Meta can now read YAML and JSON files using |
5076a392 FC |
1890 | L<CPAN::Meta::YAML> and L<JSON::PP>, which are now part of the Perl core. |
1891 | ||
1892 | =item * | |
1893 | ||
e981cf86 FR |
1894 | C<PerlIO::encoding> has been upgraded from version 0.12 to 0.14. |
1895 | ||
1896 | =item * | |
1897 | ||
5076a392 FC |
1898 | C<PerlIO::scalar> has been upgraded from 0.07 to 0.11. |
1899 | ||
1900 | A C<read> after a C<seek> beyond the end of the string no longer thinks it | |
1901 | has data to read [perl #78716]. | |
1902 | ||
1903 | =item * | |
1904 | ||
776f733b FR |
1905 | C<PerlIO::via> has been upgraded from version 0.09 to 0.11. |
1906 | ||
1907 | =item * | |
1908 | ||
cb1db9bd | 1909 | C<Pod::Html> has been upgraded from version 1.09 to 1.11. |
ae9456cc FR |
1910 | |
1911 | =item * | |
1912 | ||
be3c8498 FR |
1913 | C<Pod::LaTeX> has been upgraded from version 0.58 to 0.59. |
1914 | ||
1915 | =item * | |
1916 | ||
fd8a2e89 FR |
1917 | C<Pod::Perldoc> has been upgraded from version 3.15_02 to 3.15_03. |
1918 | ||
1919 | =item * | |
1920 | ||
5bcb6583 FR |
1921 | C<Pod::Simple> has been upgraded from version 3.13 to 3.16. |
1922 | ||
1923 | =item * | |
1924 | ||
abb8c779 | 1925 | C<POSIX> has been upgraded from 1.19 to 1.24. |
5076a392 FC |
1926 | |
1927 | It now includes constants for POSIX signal constants. | |
1928 | ||
1929 | =item * | |
1930 | ||
aa6faf7a | 1931 | C<re> has been upgraded from version 0.11 to 0.18. |
5076a392 FC |
1932 | |
1933 | New C<use re "/flags"> pragma | |
1934 | ||
5076a392 | 1935 | The C<regmust> function used to crash when called on a regular expression |
1984204c | 1936 | belonging to a pluggable engine. Now it croaks instead. |
5076a392 FC |
1937 | |
1938 | C<regmust> no longer leaks memory. | |
1939 | ||
1940 | =item * | |
1941 | ||
1942 | C<Safe> has been upgraded from version 2.25 to 2.29. | |
1943 | ||
cdc10f43 FC |
1944 | Coderefs returned by C<reval()> and C<rdo()> are now wrapped via |
1945 | C<wrap_code_refs> (5.12.1). | |
1946 | ||
5076a392 FC |
1947 | This fixes a possible infinite loop when looking for coderefs. |
1948 | ||
cdc10f43 | 1949 | It adds several version::vxs::* routines to the default share. |
5076a392 FC |
1950 | |
1951 | =item * | |
1952 | ||
2c19fa42 FR |
1953 | C<SDBM_File> has been upgraded from version 1.06 to 1.09. |
1954 | ||
1955 | =item * | |
1956 | ||
5076a392 FC |
1957 | C<SelfLoader> has been upgraded from 1.17 to 1.18. |
1958 | ||
1959 | It now works in taint mode [perl #72062]. | |
1960 | ||
1961 | =item * | |
1962 | ||
1963 | C<sigtrap> has been upgraded from version 1.04 to 1.05. | |
1964 | ||
1965 | It no longer tries to modify read-only arguments when generating a | |
1966 | backtrace [perl #72340]. | |
1967 | ||
1968 | =item * | |
1969 | ||
1984204c | 1970 | C<Socket> has been upgraded from version 1.87 to 1.94. |
5076a392 | 1971 | |
1c7f7822 | 1972 | See L</Improved IPv6 support>, above. |
5076a392 FC |
1973 | |
1974 | =item * | |
1975 | ||
1976 | C<Storable> has been upgraded from version 2.22 to 2.27. | |
1977 | ||
1978 | Includes performance improvement for overloaded classes. | |
1979 | ||
5076a392 | 1980 | This adds support for serialising code references that contain UTF-8 strings |
1984204c FC |
1981 | correctly. The Storable minor version |
1982 | number changed as a result, meaning that | |
5076a392 FC |
1983 | Storable users who set C<$Storable::accept_future_minor> to a C<FALSE> value |
1984 | will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details). | |
1985 | ||
1986 | Freezing no longer gets confused if the Perl stack gets reallocated | |
1987 | during freezing [perl #80074]. | |
1988 | ||
1989 | =item * | |
1990 | ||
648c3d7d FR |
1991 | C<Sys::Hostname> has been upgraded from version 1.11 to 1.16. |
1992 | ||
1993 | =item * | |
1994 | ||
90c6e78f FR |
1995 | C<Term::ANSIColor> has been upgraded from version 2.02 to 3.00. |
1996 | ||
1997 | =item * | |
1998 | ||
d9f2f059 FR |
1999 | C<Term::UI> has been upgraded from version 0.20 to 0.26. |
2000 | ||
2001 | =item * | |
2002 | ||
80ebb519 FR |
2003 | C<Test::Harness> has been upgraded from version 3.17 to 3.23. |
2004 | ||
2005 | =item * | |
2006 | ||
5076a392 FC |
2007 | C<Test::Simple> has been upgraded from version 0.94 to 0.98. |
2008 | ||
2009 | Among many other things, subtests without a C<plan> or C<no_plan> now have an | |
2010 | implicit C<done_testing()> added to them. | |
2011 | ||
2012 | =item * | |
2013 | ||
5076a392 FC |
2014 | C<Thread::Semaphore> has been upgraded from version 2.09 to 2.12. |
2015 | ||
1984204c FC |
2016 | It provides two new methods that give more control over the decrementing of |
2017 | semaphores: C<down_nb> and C<down_force>. | |
5076a392 FC |
2018 | |
2019 | =item * | |
2020 | ||
f0d895e1 FR |
2021 | C<Thread::Queue> has been upgraded from version 2.11 to 2.12. |
2022 | ||
2023 | =item * | |
2024 | ||
1a6b954e FR |
2025 | C<threads> has been upgraded from version 1.75 to 1.83. |
2026 | ||
2027 | =item * | |
2028 | ||
55816daa FR |
2029 | C<threads::shared> has been upgraded from version 1.32 to 1.36. |
2030 | ||
2031 | =item * | |
2032 | ||
5076a392 FC |
2033 | C<Tie::Hash> has been upgraded from version 1.03 to 1.04. |
2034 | ||
2035 | Calling C<< Tie::Hash-E<gt>TIEHASH() >> used to loop forever. Now it C<croak>s. | |
2036 | ||
2037 | =item * | |
2038 | ||
f2adc546 FR |
2039 | C<Tie::Hash::NamedCapture> has been upgraded from version 0.06 to 0.08. |
2040 | ||
2041 | =item * | |
2042 | ||
ed68b07e FR |
2043 | C<Tie::RefHash> has been upgraded from version 1.38 to 1.39. |
2044 | ||
2045 | =item * | |
2046 | ||
bb3c221a FR |
2047 | C<Time::HiRes> has been upgraded from version 1.9719 to 1.9721_01. |
2048 | ||
2049 | =item * | |
2050 | ||
97fa568b FR |
2051 | C<Time::Local> has been upgraded from version 1.1901_01 to 1.2000. |
2052 | ||
2053 | =item * | |
2054 | ||
a83cb732 FR |
2055 | C<Time::Piece> has been upgraded from version 1.15_01 to 1.20_01. |
2056 | ||
2057 | =item * | |
2058 | ||
5076a392 FC |
2059 | C<Unicode::Collate> has been upgraded from version 0.52_01 to 0.73. |
2060 | ||
1984204c | 2061 | Unicode::Collate has been updated to use Unicode 6.0.0. |
5076a392 | 2062 | |
1984204c FC |
2063 | Unicode::Collate::Locale now supports a plethora of new locales: ar, be, |
2064 | bg, de__phonebook, hu, hy, kk, mk, nso, om, tn, vi, hr, ig, ja, ko, ru, sq, | |
2065 | se, sr, to, uk, zh, zh__big5han, zh__gb2312han, zh__pinyin and zh__stroke. | |
5076a392 FC |
2066 | |
2067 | The following modules have been added: | |
2068 | ||
2069 | C<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes | |
2070 | tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering. | |
2071 | ||
2072 | C<Unicode::Collate::CJK::GB2312> for C<zh__gb2312han> which makes | |
2073 | tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering. | |
2074 | ||
2075 | C<Unicode::Collate::CJK::JISX0208> which makes tailoring of 6355 kanji | |
2076 | (CJK Unified Ideographs) in the JIS X 0208 order. | |
2077 | ||
2078 | C<Unicode::Collate::CJK::Korean> which makes tailoring of CJK Unified Ideographs | |
2079 | in the order of CLDR's Korean ordering. | |
2080 | ||
2081 | C<Unicode::Collate::CJK::Pinyin> for C<zh__pinyin> which makes | |
2082 | tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering. | |
2083 | ||
2084 | C<Unicode::Collate::CJK::Stroke> for C<zh__stroke> which makes | |
2085 | tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering. | |
2086 | ||
5076a392 FC |
2087 | This also sees the switch from using the pure-perl version of this |
2088 | module to the XS version. | |
2089 | ||
2090 | =item * | |
2091 | ||
ec52b54b FR |
2092 | C<Unicode::Normalize> has been upgraded from version 1.03 to 1.10. |
2093 | ||
2094 | =item * | |
2095 | ||
5076a392 FC |
2096 | C<Unicode::UCD> has been upgraded from version 0.27 to 0.32. |
2097 | ||
1984204c FC |
2098 | A new function, C<Unicode::UCD::num()>, has been added. This function |
2099 | returns the numeric value of the string passed it or C<undef> if the string | |
2100 | in its entirety has no "safe" numeric value. (For more detail, and for the | |
2101 | definition of "safe", see L<Unicode::UCD/num>.) | |
5076a392 | 2102 | |
1984204c | 2103 | This upgrade also includes a number of bug fixes: |
5076a392 FC |
2104 | |
2105 | =over 4 | |
2106 | ||
2107 | =item charinfo() | |
2108 | ||
2109 | =over 4 | |
2110 | ||
2111 | =item * | |
2112 | ||
2113 | It is now updated to Unicode Version 6 with Corrigendum #8, except, | |
2114 | as with Perl 5.14, the code point at U+1F514 has no name. | |
2115 | ||
2116 | =item * | |
2117 | ||
2118 | The Hangul syllable code points have the correct names, and their | |
2119 | decompositions are always output without requiring L<Lingua::KO::Hangul::Util> | |
2120 | to be installed. | |
2121 | ||
2122 | =item * | |
2123 | ||
54c7bb16 FC |
2124 | The CJK (Chinese-Japanese-Korean) code points U+2A700 to U+2B734 |
2125 | and U+2B740 to U+2B81D are now properly handled. | |
5076a392 FC |
2126 | |
2127 | =item * | |
2128 | ||
2129 | The numeric values are now output for those CJK code points that have them. | |
2130 | ||
2131 | =item * | |
2132 | ||
2133 | The names that are output for code points with multiple aliases are now the | |
2134 | corrected ones. | |
2135 | ||
2136 | =back | |
2137 | ||
2138 | =item charscript() | |
2139 | ||
2140 | This now correctly returns "Unknown" instead of C<undef> for the script | |
2141 | of a code point that hasn't been assigned another one. | |
2142 | ||
2143 | =item charblock() | |
2144 | ||
2145 | This now correctly returns "No_Block" instead of C<undef> for the block | |
2146 | of a code point that hasn't been assigned to another one. | |
2147 | ||
2148 | =back | |
2149 | ||
5076a392 FC |
2150 | =item * |
2151 | ||
2152 | C<version> has been upgraded from 0.82 to 0.88. | |
2153 | ||
1984204c | 2154 | Due to a bug, now fixed, the C<is_strict> and C<is_lax> functions did not |
cdc10f43 | 2155 | work when exported (5.12.1). |
5076a392 FC |
2156 | |
2157 | =item * | |
2158 | ||
3e625598 | 2159 | C<warnings> has been upgraded from version 1.09 to 1.12. |
5076a392 FC |
2160 | |
2161 | Calling C<use warnings> without arguments is now significantly more efficient. | |
2162 | ||
4f978a3b FR |
2163 | =item * |
2164 | ||
2165 | C<warnings::register> have been upgraded from version 1.01 to 1.02. | |
2166 | ||
5076a392 FC |
2167 | It is now possible to register warning categories other than the names of |
2168 | packages using C<warnings::register>. See L<perllexwarn> for more information. | |
2169 | ||
2170 | =item * | |
2171 | ||
62e270c2 FR |
2172 | C<XSLoader> has been upgraded from version 0.10 to 0.13. |
2173 | ||
2174 | =item * | |
2175 | ||
5076a392 FC |
2176 | C<VMS::DCLsym> has been upgraded from version 1.03 to 1.05. |
2177 | ||
2178 | Two bugs have been fixed [perl #84086]: | |
2179 | ||
2180 | The symbol table name was lost when tying a hash, due to a thinko in | |
40bd7639 | 2181 | C<TIEHASH>. The result was that all tied hashes interacted with the |
5076a392 FC |
2182 | local symbol table. |
2183 | ||
2184 | Unless a symbol table name had been explicitly specified in the call | |
2185 | to the constructor, querying the special key ':LOCAL' failed to | |
2186 | identify objects connected to the local symbol table. | |
2187 | ||
2188 | =item * | |
2189 | ||
2190 | C<Win32> has been upgraded from version 0.39 to 0.44. | |
2191 | ||
1984204c FC |
2192 | This release has several new functions: C<Win32::GetSystemMetrics>, |
2193 | C<Win32::GetProductInfo>, C<Win32::GetOSDisplayName>. | |
5076a392 | 2194 | |
1984204c FC |
2195 | The names returned by C<Win32::GetOSName> and C<Win32::GetOSDisplayName> |
2196 | have been corrected. | |
5076a392 | 2197 | |
3bbe5383 FR |
2198 | =item * |
2199 | ||
2200 | C<XS::Typemap> has been upgraded from version 0.03 to 0.05. | |
2201 | ||
5076a392 FC |
2202 | =back |
2203 | ||
5076a392 FC |
2204 | =head2 Removed Modules and Pragmata |
2205 | ||
1c7f7822 JV |
2206 | As promised in Perl 5.12.0's release notes, the following modules have |
2207 | been removed from the core distribution, and if needed should be installed | |
2208 | from CPAN instead. | |
5076a392 FC |
2209 | |
2210 | =over | |
2211 | ||
4f978a3b FR |
2212 | =item * |
2213 | ||
40bd7639 | 2214 | C<Class::ISA> has been removed from the Perl core. Prior version was 0.36. |
5076a392 | 2215 | |
4f978a3b FR |
2216 | =item * |
2217 | ||
40bd7639 | 2218 | C<Pod::Plainer> has been removed from the Perl core. Prior version was 1.02. |
4f978a3b FR |
2219 | |
2220 | =item * | |
5076a392 | 2221 | |
40bd7639 | 2222 | C<Switch> has been removed from the Perl core. Prior version was 2.16. |
5076a392 FC |
2223 | |
2224 | =back | |
2225 | ||
2226 | The removal of C<Shell> has been deferred until after 5.14, as the | |
2227 | implementation of C<Shell> shipped with 5.12.0 did not correctly issue the | |
2228 | warning that it was to be removed from core. | |
2229 | ||
2230 | =head1 Documentation | |
2231 | ||
5076a392 FC |
2232 | =head2 New Documentation |
2233 | ||
41e29def | 2234 | =head3 L<perlgpl> |
5076a392 FC |
2235 | |
2236 | L<perlgpl> has been updated to contain GPL version 1, as is included in the | |
cdc10f43 | 2237 | F<README> distributed with perl (5.12.1). |
5076a392 | 2238 | |
41e29def | 2239 | =head3 Perl 5.12.x delta files |
5076a392 | 2240 | |
41e29def FC |
2241 | The perldelta files for Perl 5.12.1 to 5.12.3 have been added from the |
2242 | maintenance branch: L<perl5121delta>, L<perl5122delta>, L<perl5123delta>. | |
5076a392 FC |
2243 | |
2244 | =head3 L<perlpodstyle> | |
2245 | ||
2246 | New style guide for POD documentation, | |
2247 | split mostly from the NOTES section of the pod2man man page. | |
2248 | ||
41e29def FC |
2249 | =head3 L<perlsource>, L<perlinterp>, L<perlhacktut>, and L<perlhacktips> |
2250 | ||
cc13eef1 | 2251 | See L</perlhack and perlrepository revamp>, below. |
5076a392 FC |
2252 | |
2253 | =head2 Changes to Existing Documentation | |
2254 | ||
41e29def | 2255 | =head3 L<perlmodlib> is now complete |
4ed2cea4 | 2256 | |
1c7f7822 | 2257 | The perlmodlib page that came with Perl 5.12.0 was missing a number of |
a60ea503 | 2258 | modules, due to a bug in the script that generates the list. This has been |
cdc10f43 | 2259 | fixed [perl #74332] (5.12.1). |
4ed2cea4 | 2260 | |
1c7f7822 | 2261 | =head3 Replace incorrect tr/// table in L<perlebcdic> |
5076a392 | 2262 | |
41e29def | 2263 | L<perlebcdic> contains a helpful table to use in tr/// to convert |
1c7f7822 JV |
2264 | between EBCDIC and Latin1/ASCII. The table was the inverse of the one |
2265 | it describes, though the code that used the table worked correctly for | |
2266 | the specific example given. | |
5076a392 | 2267 | |
1c7f7822 | 2268 | The table has been corrected, and the sample code changed to correspond. |
5076a392 | 2269 | |
1c7f7822 JV |
2270 | The table has also been changed to hex from octal and the recipes in the |
2271 | pod have been altered to print out leading zeros to make all the values | |
2272 | the same length. | |
5076a392 | 2273 | |
41e29def | 2274 | =head3 Tricks for user-defined casing |
5076a392 | 2275 | |
41e29def FC |
2276 | L<perlunicode> now contains an explanation of how to override, mangle |
2277 | and otherwise tweak the way perl handles upper-, lower- and other-case | |
2278 | conversions on Unicode data, and how to provide scoped changes to alter | |
2279 | one's own code's behaviour without stomping on anybody else. | |
5076a392 | 2280 | |
1c7f7822 | 2281 | =head3 INSTALL explicitly states that Perl requires a C89 compiler |
5076a392 | 2282 | |
d430b8e7 FC |
2283 | This was already true but it's now Officially Stated For The Record |
2284 | (5.12.2). | |
5076a392 | 2285 | |
41e29def | 2286 | =head3 Explanation of C<\xI<HH>> and C<\oI<OOO>> escapes |
5076a392 | 2287 | |
41e29def FC |
2288 | L<perlop> has been updated with more detailed explanation of these two |
2289 | character escapes. | |
5076a392 | 2290 | |
41e29def | 2291 | =head3 C<-0I<NNN>> switch |
5076a392 | 2292 | |
41e29def | 2293 | In L<perlrun>, the behavior of the C<-0NNN> switch for C<-0400> or higher |
d430b8e7 | 2294 | has been clarified (5.12.2). |
5076a392 | 2295 | |
cdc10f43 FC |
2296 | =head3 Maintenance policy |
2297 | ||
2298 | L<perlpolicy> now contains the policy on what patches are acceptable for | |
2299 | maintenance branches (5.12.1). | |
2300 | ||
41e29def | 2301 | =head3 Deprecation policy |
5076a392 | 2302 | |
41e29def | 2303 | L<perlpolicy> now contains the policy on compatibility and deprecation |
d430b8e7 | 2304 | along with definitions of terms like "deprecation" (5.12.2). |
5076a392 | 2305 | |
41e29def | 2306 | =head3 New descriptions in L<perldiag> |
5076a392 FC |
2307 | |
2308 | The following existing diagnostics are now documented: | |
2309 | ||
2310 | =over 4 | |
2311 | ||
2312 | =item * | |
2313 | ||
2314 | L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c"> | |
2315 | ||
2316 | =item * | |
2317 | ||
2318 | L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s"> | |
2319 | ||
2320 | =item * | |
2321 | ||
2322 | L<Ambiguous use of %c{%s%s} resolved to %c%s%s|perldiag/"Ambiguous use of %c{%s%s} resolved to %c%s%s"> | |
2323 | ||
2324 | =item * | |
2325 | ||
2326 | L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()"> | |
2327 | ||
2328 | =item * | |
2329 | ||
2330 | L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)"> | |
2331 | ||
2332 | =item * | |
2333 | ||
2334 | L<Invalid version format (%s)|perldiag/"Invalid version format (%s)"> | |
2335 | ||
2336 | =item * | |
2337 | ||
2338 | L<Invalid version object|perldiag/"Invalid version object"> | |
2339 | ||
2340 | =back | |
2341 | ||
5076a392 FC |
2342 | =head3 L<perlbook> |
2343 | ||
41e29def | 2344 | L<perlbook> has been expanded to cover many more popular books. |
5076a392 | 2345 | |
41e29def | 2346 | =head3 C<SvTRUE> macro |
5076a392 | 2347 | |
41e29def FC |
2348 | The documentation for the C<SvTRUE> macro in |
2349 | L<perlapi> was simply wrong in stating that | |
a60ea503 | 2350 | get-magic is not processed. It has been corrected. |
5076a392 | 2351 | |
41e29def | 2352 | =head3 L<perlvar> revamp |
5076a392 | 2353 | |
41e29def | 2354 | L<perlvar> reorders the variables and groups them by topic. Each variable |
5076a392 | 2355 | introduced after Perl 5.000 notes the first version in which it is |
41e29def | 2356 | available. L<perlvar> also has a new section for deprecated variables to |
5076a392 FC |
2357 | note when they were removed. |
2358 | ||
41e29def | 2359 | =head3 Array and hash slices in scalar context |
5076a392 | 2360 | |
41e29def | 2361 | These are now documented in L<perldata>. |
5076a392 | 2362 | |
41e29def | 2363 | =head3 C<use locale> and formats |
5076a392 FC |
2364 | |
2365 | L<perlform> and L<perllocale> have been corrected to state that | |
2366 | C<use locale> affects formats. | |
2367 | ||
5076a392 FC |
2368 | =head3 L<overload> |
2369 | ||
a60ea503 | 2370 | L<overload>'s documentation has practically undergone a rewrite. It |
5076a392 FC |
2371 | is now much more straightforward and clear. |
2372 | ||
cc13eef1 | 2373 | =head3 perlhack and perlrepository revamp |
5076a392 | 2374 | |
5076a392 | 2375 | The L<perlhack> document is now much shorter, and focuses on the Perl 5 |
1c7f7822 JV |
2376 | development process and submitting patches to Perl. The technical content |
2377 | has been moved to several new documents, L<perlsource>, L<perlinterp>, | |
2378 | L<perlhacktut>, and L<perlhacktips>. This technical content has only | |
2379 | been lightly edited. | |
5076a392 | 2380 | |
1c7f7822 JV |
2381 | The perlrepository document has been renamed to L<perlgit>. This new |
2382 | document is just a how-to on using git with the Perl source code. | |
2383 | Any other content that used to be in perlrepository has been moved | |
2384 | to L<perlhack>. | |
5076a392 | 2385 | |
41e29def | 2386 | =head3 Time::Piece examples |
5076a392 FC |
2387 | |
2388 | Examples in L<perlfaq4> have been updated to show the use of | |
41e29def | 2389 | L<Time::Piece>. |
5076a392 FC |
2390 | |
2391 | =head1 Diagnostics | |
2392 | ||
2393 | The following additions or changes have been made to diagnostic output, | |
2394 | including warnings and fatal error messages. For the complete list of | |
2395 | diagnostic messages, see L<perldiag>. | |
2396 | ||
2397 | =head2 New Diagnostics | |
2398 | ||
a593b319 FC |
2399 | =head3 New Errors |
2400 | ||
5076a392 FC |
2401 | =over |
2402 | ||
a593b319 | 2403 | =item Closure prototype called |
5076a392 | 2404 | |
a593b319 FC |
2405 | This error occurs when a subroutine reference passed to an attribute |
2406 | handler is called, if the subroutine is a closure [perl #68560]. | |
5076a392 | 2407 | |
a593b319 | 2408 | =item Insecure user-defined property %s |
5076a392 | 2409 | |
a593b319 FC |
2410 | Perl detected tainted data when trying to compile a regular |
2411 | expression that contains a call to a user-defined character property | |
2412 | function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>. | |
2413 | See L<perlunicode/User-Defined Character Properties> and L<perlsec>. | |
5076a392 | 2414 | |
a593b319 | 2415 | =item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries |
5076a392 | 2416 | |
a593b319 FC |
2417 | This new error is triggered if a destructor called on an object in a |
2418 | typeglob that is being freed creates a new typeglob entry containing an | |
2419 | object with a destructor that creates a new entry containing an object.... | |
5076a392 | 2420 | |
a593b319 | 2421 | =item Parsing code internal error (%s) |
5076a392 | 2422 | |
a593b319 FC |
2423 | This new fatal error is produced when parsing |
2424 | code supplied by an extension violates the | |
2425 | parser's API in a detectable way. | |
5076a392 | 2426 | |
a593b319 | 2427 | =item refcnt: fd %d%s |
5076a392 | 2428 | |
a593b319 FC |
2429 | This new error only occurs if a internal consistency check fails when a |
2430 | pipe is about to be closed. | |
5076a392 | 2431 | |
a593b319 | 2432 | =item Regexp modifier "/%c" may not appear twice |
5076a392 | 2433 | |
a593b319 FC |
2434 | The regular expression pattern has one of the |
2435 | mutually exclusive modifiers repeated. | |
5076a392 | 2436 | |
a593b319 | 2437 | =item Regexp modifiers "/%c" and "/%c" are mutually exclusive |
5076a392 | 2438 | |
a593b319 FC |
2439 | The regular expression pattern has more than one of the mutually |
2440 | exclusive modifiers. | |
5076a392 | 2441 | |
a593b319 | 2442 | =item Using !~ with %s doesn't make sense |
5076a392 | 2443 | |
a593b319 | 2444 | This error occurs when C<!~> is used with C<s///r> or C<y///r>. |
5076a392 | 2445 | |
a593b319 | 2446 | =back |
5076a392 | 2447 | |
a593b319 | 2448 | =head3 New Warnings |
5076a392 | 2449 | |
a593b319 | 2450 | =over |
5076a392 | 2451 | |
a593b319 | 2452 | =item "\b{" is deprecated; use "\b\{" instead |
5076a392 | 2453 | |
a593b319 | 2454 | =item "\B{" is deprecated; use "\B\{" instead |
5076a392 | 2455 | |
a593b319 FC |
2456 | Use of an unescaped "{" immediately following a C<\b> or C<\B> is now |
2457 | deprecated so as to reserve its use for Perl itself in a future release. | |
5076a392 | 2458 | |
a593b319 | 2459 | =item Operation "%s" returns its argument for ... |
5076a392 | 2460 | |
a593b319 | 2461 | Performing an operation requiring Unicode semantics (such as case-folding) |
a60ea503 FC |
2462 | on a Unicode surrogate or a non-Unicode character now triggers this |
2463 | warning. | |
5076a392 | 2464 | |
a593b319 FC |
2465 | =item Use of qw(...) as parentheses is deprecated |
2466 | ||
2467 | See L</"Use of qw(...) as parentheses">, above, for details. | |
5076a392 FC |
2468 | |
2469 | =back | |
2470 | ||
2471 | =head2 Changes to Existing Diagnostics | |
2472 | ||
2473 | =over 4 | |
2474 | ||
2475 | =item * | |
2476 | ||
4ed2cea4 FC |
2477 | The "Variable $foo is not imported" warning that precedes a |
2478 | C<strict 'vars'> error has now been assigned the "misc" category, so that | |
2479 | C<no warnings> will suppress it [perl #73712]. | |
2480 | ||
2481 | =item * | |
2482 | ||
5076a392 FC |
2483 | C<warn> and C<die> now produce 'Wide character' warnings when fed a |
2484 | character outside the byte range if STDERR is a byte-sized handle. | |
2485 | ||
2486 | =item * | |
2487 | ||
2488 | The 'Layer does not match this perl' error message has been replaced with | |
a593b319 | 2489 | these more helpful messages [perl #73754]: |
5076a392 FC |
2490 | |
2491 | =over 4 | |
2492 | ||
2493 | =item * | |
2494 | ||
2495 | PerlIO layer function table size (%d) does not match size expected by this | |
2496 | perl (%d) | |
2497 | ||
2498 | =item * | |
2499 | ||
2500 | PerlIO layer instance size (%d) does not match size expected by this perl | |
2501 | (%d) | |
2502 | ||
2503 | =back | |
2504 | ||
5076a392 FC |
2505 | =item * |
2506 | ||
2507 | The "Found = in conditional" warning that is emitted when a constant is | |
2508 | assigned to a variable in a condition is now withheld if the constant is | |
2509 | actually a subroutine or one generated by C<use constant>, since the value | |
2510 | of the constant may not be known at the time the program is written | |
2511 | [perl #77762]. | |
2512 | ||
2513 | =item * | |
2514 | ||
2515 | Previously, if none of the C<gethostbyaddr>, C<gethostbyname> and | |
2516 | C<gethostent> functions were implemented on a given platform, they would | |
2517 | all die with the message 'Unsupported socket function "gethostent" called', | |
40bd7639 | 2518 | with analogous messages for C<getnet*> and C<getserv*>. This has been |
5076a392 FC |
2519 | corrected. |
2520 | ||
2521 | =item * | |
2522 | ||
a593b319 FC |
2523 | The warning message about unrecognized regular expression escapes passed |
2524 | through has been changed to include any literal '{' following the | |
2525 | two-character escape. E.g., "\q{" is now emitted instead of "\q". | |
5076a392 FC |
2526 | |
2527 | =back | |
2528 | ||
2529 | =head1 Utility Changes | |
2530 | ||
0b88cc74 | 2531 | =head3 L<perlbug> |
5076a392 FC |
2532 | |
2533 | =over 4 | |
2534 | ||
2535 | =item * | |
2536 | ||
0b88cc74 FC |
2537 | L<perlbug> now looks in the EMAIL environment variable for a return address |
2538 | if the REPLY-TO and REPLYTO variables are empty. | |
5076a392 FC |
2539 | |
2540 | =item * | |
2541 | ||
0b88cc74 FC |
2542 | L<perlbug> did not previously generate a From: header, potentially |
2543 | resulting in dropped mail. Now it does include that header. | |
5076a392 FC |
2544 | |
2545 | =item * | |
2546 | ||
0b88cc74 | 2547 | The user's address is now used as the return-path. |
4ed2cea4 | 2548 | |
0b88cc74 FC |
2549 | Many systems these days don't have a valid Internet domain name and |
2550 | perlbug@perl.org does not accept email with a return-path that does | |
2551 | not resolve. So the user's address is now passed to sendmail so it's | |
2552 | less likely to get stuck in a mail queue somewhere [perl #82996]. | |
5076a392 | 2553 | |
2c389f6c FC |
2554 | =item * |
2555 | ||
d430b8e7 FC |
2556 | L<perlbug> now always gives the reporter a chance to change the email |
2557 | address it guesses for them (5.12.2). | |
2558 | ||
2559 | =item * | |
2560 | ||
2561 | L<perlbug> should no longer warn about uninitialized values when using the C<-d> | |
2562 | and C<-v> options (5.12.2). | |
2c389f6c | 2563 | |
5076a392 FC |
2564 | =back |
2565 | ||
0b88cc74 | 2566 | =head3 L<perl5db.pl> |
5076a392 | 2567 | |
0b88cc74 | 2568 | =over |
5076a392 FC |
2569 | |
2570 | =item * | |
2571 | ||
0b88cc74 FC |
2572 | The remote terminal works after forking and spawns new sessions - one |
2573 | for each forked process. | |
5076a392 FC |
2574 | |
2575 | =back | |
2576 | ||
0b88cc74 | 2577 | =head3 L<ptargrep> |
5076a392 FC |
2578 | |
2579 | =over 4 | |
2580 | ||
2581 | =item * | |
2582 | ||
0b88cc74 FC |
2583 | L<ptargrep> is a new utility to apply pattern matching to the contents of |
2584 | files in a tar archive. It comes with C<Archive::Tar>. | |
5076a392 FC |
2585 | |
2586 | =back | |
2587 | ||
2588 | =head1 Configuration and Compilation | |
2589 | ||
61752d82 FC |
2590 | See also L</"Naming fixes in Policy_sh.SH may invalidate Policy.sh">, |
2591 | above. | |
2592 | ||
5076a392 FC |
2593 | =over 4 |
2594 | ||
2595 | =item * | |
2596 | ||
1c7f7822 JV |
2597 | CCINCDIR and CCLIBDIR for the mingw64 cross-compiler are now correctly |
2598 | under $(CCHOME)\mingw\include and \lib rather than immediately below | |
2599 | $(CCHOME). | |
5076a392 | 2600 | |
5076a392 FC |
2601 | This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and |
2602 | 'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now | |
87595b22 | 2603 | set correctly. |
5076a392 FC |
2604 | |
2605 | =item * | |
2606 | ||
87595b22 FC |
2607 | 'make test.valgrind' has been adjusted to account for cpan/dist/ext |
2608 | separation. | |
5076a392 FC |
2609 | |
2610 | =item * | |
2611 | ||
2612 | On compilers that support it, C<-Wwrite-strings> is now added to cflags by | |
2613 | default. | |
2614 | ||
2615 | =item * | |
2616 | ||
2617 | The C<Encode> module can now (once again) be included in a static Perl | |
2618 | build. The special-case handling for this situation got broken in Perl | |
2619 | 5.11.0, and has now been repaired. | |
2620 | ||
1e463951 FC |
2621 | =item * |
2622 | ||
2623 | The previous default size of a PerlIO buffer (4096 bytes) has been increased | |
2624 | to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling | |
2625 | this decade-old default increases read and write performance in the neighborhood | |
2626 | of 25% to 50% when using the default layers of perlio on top of unix. To choose | |
2627 | a non-default size, such as to get back the old value or to obtain an even | |
2628 | larger value, configure with: | |
2629 | ||
2630 | ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N | |
2631 | ||
2632 | where N is the desired size in bytes; it should probably be a multiple of | |
2633 | your page size. | |
2634 | ||
d430b8e7 FC |
2635 | =item * |
2636 | ||
2637 | An "incompatible operand types" error in ternary expressions when building | |
2638 | with C<clang> has been fixed (5.12.2). | |
2639 | ||
2640 | =item * | |
2641 | ||
2642 | Perl now skips setuid C<File::Copy> tests on partitions it detects to be mounted | |
2643 | as C<nosuid> (5.12.2). | |
2644 | ||
5076a392 FC |
2645 | =back |
2646 | ||
5076a392 FC |
2647 | =head1 Platform Support |
2648 | ||
5076a392 FC |
2649 | =head2 New Platforms |
2650 | ||
5076a392 FC |
2651 | =over 4 |
2652 | ||
2653 | =item AIX | |
2654 | ||
cdc10f43 | 2655 | Perl now builds on AIX 4.2 (5.12.1). |
5076a392 FC |
2656 | |
2657 | =back | |
2658 | ||
2659 | =head2 Discontinued Platforms | |
2660 | ||
2661 | =over 4 | |
2662 | ||
5076a392 FC |
2663 | =item Apollo DomainOS |
2664 | ||
1c7f7822 JV |
2665 | The last vestiges of support for this platform have been excised from |
2666 | the Perl distribution. It was officially discontinued in version 5.12.0. | |
2667 | It had not worked for years before that. | |
5076a392 FC |
2668 | |
2669 | =item MacOS Classic | |
2670 | ||
2671 | The last vestiges of support for this platform have been excised from the | |
a60ea503 | 2672 | Perl distribution. It was officially discontinued in an earlier version. |
5076a392 FC |
2673 | |
2674 | =back | |
2675 | ||
2676 | =head2 Platform-Specific Notes | |
2677 | ||
d430b8e7 FC |
2678 | =head3 AIX |
2679 | ||
2680 | =over | |
2681 | ||
2682 | =item * | |
2683 | ||
2684 | F<README.aix> has been updated with information about the XL C/C++ V11 compiler | |
2685 | suite (5.12.2). | |
2686 | ||
2687 | =back | |
2688 | ||
2689 | =head3 ARM | |
2690 | ||
2691 | =over | |
2692 | ||
2693 | =item * | |
2694 | ||
2695 | The C<d_u32align> configuration probe on ARM has been fixed (5.12.2). | |
2696 | ||
2697 | =back | |
2698 | ||
554003a2 | 2699 | =head3 Cygwin |
5076a392 FC |
2700 | |
2701 | =over 4 | |
2702 | ||
2703 | =item * | |
2704 | ||
554003a2 | 2705 | MakeMaker has been updated to build man pages on cygwin. |
5076a392 FC |
2706 | |
2707 | =item * | |
2708 | ||
554003a2 FC |
2709 | Improved rebase behaviour |
2710 | ||
2711 | If a dll is updated on cygwin the old imagebase address is reused. | |
2712 | This solves most rebase errors, especially when updating on core dll's. | |
2713 | See L<http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README> for more information. | |
5076a392 FC |
2714 | |
2715 | =item * | |
2716 | ||
497da9da | 2717 | Support for the standard cygwin dll prefix, which is e.g., needed for FFI's |
5076a392 FC |
2718 | |
2719 | =item * | |
2720 | ||
554003a2 | 2721 | Updated build hints file |
5076a392 FC |
2722 | |
2723 | =back | |
2724 | ||
cdc10f43 FC |
2725 | =head3 FreeBSD 7 |
2726 | ||
2727 | =over | |
2728 | ||
2729 | =item * | |
2730 | ||
40bd7639 | 2731 | FreeBSD 7 no longer contains F</usr/bin/objformat>. At build time, |
cdc10f43 FC |
2732 | Perl now skips the F<objformat> check for versions 7 and higher and |
2733 | assumes ELF (5.12.1). | |
2734 | ||
2735 | =back | |
2736 | ||
2737 | =head3 HP-UX | |
2738 | ||
2739 | =over | |
2740 | ||
2741 | =item * | |
2742 | ||
2743 | Perl now allows -Duse64bitint without promoting to use64bitall on HP-UX | |
2744 | (5.12.1). | |
2745 | ||
2746 | =back | |
2747 | ||
554003a2 | 2748 | =head3 IRIX |
5076a392 | 2749 | |
a60ea503 FC |
2750 | =over |
2751 | ||
2752 | =item * | |
2753 | ||
5076a392 FC |
2754 | Conversion of strings to floating-point numbers is now more accurate on |
2755 | IRIX systems [perl #32380]. | |
2756 | ||
a60ea503 FC |
2757 | =back |
2758 | ||
554003a2 | 2759 | =head3 Mac OS X |
5076a392 | 2760 | |
a60ea503 FC |
2761 | =over |
2762 | ||
2763 | =item * | |
2764 | ||
5076a392 FC |
2765 | Early versions of Mac OS X (Darwin) had buggy implementations of the |
2766 | C<setregid>, C<setreuid>, C<setrgid> and C<setruid> functions, so perl | |
2767 | would pretend they did not exist. | |
2768 | ||
2769 | These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and | |
2770 | higher, as they have been fixed [perl #72990]. | |
2771 | ||
a60ea503 FC |
2772 | =back |
2773 | ||
554003a2 | 2774 | =head3 MirBSD |
5076a392 | 2775 | |
a60ea503 FC |
2776 | =over |
2777 | ||
2778 | =item * | |
2779 | ||
554003a2 FC |
2780 | Previously if you built perl with a shared libperl.so on MirBSD (the |
2781 | default config), it would work up to the installation; however, once | |
2782 | installed, it would be unable to find libperl. So path handling is now | |
2783 | treated as in the other BSD dialects. | |
5076a392 | 2784 | |
a60ea503 FC |
2785 | =back |
2786 | ||
554003a2 | 2787 | =head3 NetBSD |
5076a392 | 2788 | |
a60ea503 FC |
2789 | =over |
2790 | ||
2791 | =item * | |
2792 | ||
554003a2 FC |
2793 | The NetBSD hints file has been changed to make the system's malloc the |
2794 | default. | |
5076a392 | 2795 | |
a60ea503 FC |
2796 | =back |
2797 | ||
1c7f7822 | 2798 | =head3 OpenBSD |
5076a392 | 2799 | |
a60ea503 FC |
2800 | =over |
2801 | ||
2802 | =item * | |
2803 | ||
554003a2 FC |
2804 | OpenBSD E<gt> 3.7 has a new malloc implementation which is mmap-based |
2805 | and as such can release memory back to the OS; however, perl's use of | |
2806 | this malloc causes a substantial slowdown so we now default to using | |
2807 | perl's malloc instead [perl #75742]. | |
5076a392 | 2808 | |
a60ea503 FC |
2809 | =back |
2810 | ||
554003a2 | 2811 | =head3 OpenVOS |
5076a392 | 2812 | |
a60ea503 FC |
2813 | =over |
2814 | ||
2815 | =item * | |
2816 | ||
554003a2 | 2817 | perl now builds again with OpenVOS (formerly known as Stratus VOS) |
5a553547 | 2818 | [perl #78132] (5.12.3). |
5076a392 | 2819 | |
a60ea503 FC |
2820 | =back |
2821 | ||
554003a2 | 2822 | =head3 Solaris |
5076a392 | 2823 | |
a60ea503 FC |
2824 | =over |
2825 | ||
2826 | =item * | |
2827 | ||
2828 | DTrace is now supported on Solaris. There used to be build failures, but | |
5a553547 | 2829 | these have been fixed [perl #73630] (5.12.3). |
5076a392 | 2830 | |
a60ea503 FC |
2831 | =back |
2832 | ||
554003a2 | 2833 | =head3 VMS |
5076a392 FC |
2834 | |
2835 | =over | |
2836 | ||
2837 | =item * | |
2838 | ||
cdc10f43 FC |
2839 | It's now possible to build extensions on older (pre 7.3-2) VMS systems. |
2840 | ||
2841 | DCL symbol length was limited to 1K up until about seven years or | |
2842 | so ago, but there was no particularly deep reason to prevent those | |
2843 | older systems from configuring and building Perl (5.12.1). | |
2844 | ||
2845 | =item * | |
2846 | ||
2847 | We fixed the previously-broken C<-Uuseperlio> build on VMS. | |
2848 | ||
2849 | We were checking a variable that doesn't exist in the non-default | |
2850 | case of disabling perlio. Now we only look at it when it exists (5.12.1). | |
2851 | ||
2852 | =item * | |
2853 | ||
2854 | We fixed the -Uuseperlio command-line option in configure.com. | |
2855 | ||
2856 | Formerly it only worked if you went through all the questions | |
2857 | interactively and explicitly answered no (5.12.1). | |
2858 | ||
2859 | =item * | |
2860 | ||
554003a2 | 2861 | C<PerlIOUnix_open> now honours the default permissions on VMS. |
5076a392 | 2862 | |
554003a2 FC |
2863 | When C<perlio> became the default and C<unixio> became the default bottom layer, |
2864 | the most common path for creating files from Perl became C<PerlIOUnix_open>, | |
2865 | which has always explicitly used C<0666> as the permission mask. | |
5076a392 | 2866 | |
554003a2 FC |
2867 | To avoid this, C<0777> is now passed as the permissions to C<open()>. In the |
2868 | VMS CRTL, C<0777> has a special meaning over and above intersecting with the | |
2869 | current umask; specifically, it allows Unix syscalls to preserve native default | |
5a553547 FC |
2870 | permissions (5.12.3). |
2871 | ||
2872 | =item * | |
2873 | ||
2874 | Spurious record boundaries are no longer | |
2875 | introduced by the PerlIO layer during output (5.12.3). | |
5076a392 FC |
2876 | |
2877 | =item * | |
2878 | ||
554003a2 FC |
2879 | The shortening of symbols longer than 31 characters in the C sources is |
2880 | now done by the compiler rather than by xsubpp (which could only do so | |
2881 | for generated symbols in XS code). | |
5076a392 FC |
2882 | |
2883 | =item * | |
2884 | ||
554003a2 FC |
2885 | Record-oriented files (record format variable or variable with fixed control) |
2886 | opened for write by the perlio layer will now be line-buffered to prevent the | |
2887 | introduction of spurious line breaks whenever the perlio buffer fills up. | |
5076a392 | 2888 | |
d430b8e7 FC |
2889 | =item * |
2890 | ||
a60ea503 FC |
2891 | F<git_version.h> is now installed on VMS. This |
2892 | was an oversight in v5.12.0 which | |
d430b8e7 FC |
2893 | caused some extensions to fail to build (5.12.2). |
2894 | ||
2895 | =item * | |
2896 | ||
2897 | Several memory leaks in L<stat()|perlfunc/"stat FILEHANDLE"> have been fixed (5.12.2). | |
2898 | ||
2899 | =item * | |
2900 | ||
2901 | A memory leak in C<Perl_rename()> due to a double allocation has been | |
2902 | fixed (5.12.2). | |
2903 | ||
2904 | =item * | |
2905 | ||
2906 | A memory leak in C<vms_fid_to_name()> (used by C<realpath()> and | |
2907 | C<realname()>) has been fixed (5.12.2). | |
2908 | ||
5076a392 FC |
2909 | =back |
2910 | ||
554003a2 | 2911 | =head3 Windows |
5076a392 | 2912 | |
5a1f7719 FC |
2913 | See also L</"fork() emulation will not wait for signalled children"> and |
2914 | L</"Perl source code is read in text mode on Windows">, above. | |
2915 | ||
5076a392 FC |
2916 | =over 4 |
2917 | ||
2918 | =item * | |
2919 | ||
554003a2 | 2920 | Fixed build process for SDK2003SP1 compilers. |
5076a392 | 2921 | |
554003a2 | 2922 | =item * |
5076a392 | 2923 | |
01b1a9e4 FC |
2924 | Compilation with Visual Studio 2010 is now supported. |
2925 | ||
2926 | =item * | |
2927 | ||
554003a2 FC |
2928 | When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now |
2929 | be set in C<$Config{ccflags}>. This improves portability when compiling | |
2930 | XS extensions using new compilers, but for a perl compiled with old 32-bit | |
2931 | compilers. | |
5076a392 FC |
2932 | |
2933 | =item * | |
2934 | ||
554003a2 FC |
2935 | C<$Config{gccversion}> is now set correctly when perl is built using the |
2936 | mingw64 compiler from L<http://mingw64.org> [perl #73754]. | |
5076a392 | 2937 | |
554003a2 FC |
2938 | =item * |
2939 | ||
d430b8e7 FC |
2940 | When building Perl with the mingw64 x64 cross-compiler C<incpath>, |
2941 | C<libpth>, C<ldflags>, C<lddlflags> and C<ldflags_nolargefiles> values | |
2942 | in F<Config.pm> and F<Config_heavy.pl> were not previously being set | |
2943 | correctly because, with that compiler, the include and lib directories | |
2944 | are not immediately below C<$(CCHOME)> (5.12.2). | |
2945 | ||
2946 | =item * | |
2947 | ||
554003a2 FC |
2948 | The build process proceeds more smoothly with mingw and dmake when |
2949 | F<C:\MSYS\bin> is in the PATH, due to a C<Cwd> fix. | |
5076a392 FC |
2950 | |
2951 | =item * | |
2952 | ||
554003a2 FC |
2953 | Support for building with Visual C++ 2010 is now underway, but is not yet |
2954 | complete. See F<README.win32> or L<perlwin32> for more details. | |
5076a392 | 2955 | |
554003a2 FC |
2956 | =item * |
2957 | ||
2958 | The option to use an externally-supplied C<crypt()>, or to build with no | |
2959 | C<crypt()> at all, has been removed. Perl supplies its own C<crypt()> | |
2960 | implementation for Windows, and the political situation that required | |
2961 | this part of the distribution to sometimes be omitted is long gone. | |
5076a392 FC |
2962 | |
2963 | =back | |
2964 | ||
2965 | =head1 Internal Changes | |
2966 | ||
1e463951 | 2967 | =head2 New APIs |
5076a392 | 2968 | |
1e463951 | 2969 | =head3 CLONE_PARAMS structure added to ease correct thread creation |
5076a392 | 2970 | |
1e463951 FC |
2971 | Modules that create threads should now create C<CLONE_PARAMS> structures |
2972 | by calling the new function C<Perl_clone_params_new()>, and free them with | |
2973 | C<Perl_clone_params_del()>. This will ensure compatibility with any future | |
2974 | changes to the internals of the C<CLONE_PARAMS> structure layout, and that | |
2975 | it is correctly allocated and initialised. | |
5076a392 | 2976 | |
1e463951 | 2977 | =head3 New parsing functions |
5076a392 | 2978 | |
1e463951 FC |
2979 | Several functions have been added for parsing statements or multiple |
2980 | statements: | |
5076a392 | 2981 | |
1e463951 | 2982 | =over |
5076a392 FC |
2983 | |
2984 | =item * | |
2985 | ||
1e463951 | 2986 | C<parse_fullstmt> parses a complete Perl statement. |
5076a392 FC |
2987 | |
2988 | =item * | |
2989 | ||
1e463951 FC |
2990 | C<parse_stmtseq> parses a sequence of statements, up |
2991 | to closing brace or EOF. | |
5076a392 FC |
2992 | |
2993 | =item * | |
2994 | ||
1e463951 | 2995 | C<parse_block> parses a block [perl #78222]. |
5076a392 FC |
2996 | |
2997 | =item * | |
2998 | ||
1e463951 FC |
2999 | C<parse_barestmt> parses a statement |
3000 | without a label. | |
5076a392 FC |
3001 | |
3002 | =item * | |
3003 | ||
1e463951 | 3004 | C<parse_label> parses a statement label, separate from statements. |
5076a392 | 3005 | |
1e463951 | 3006 | =back |
5076a392 | 3007 | |
1e463951 FC |
3008 | The |
3009 | L<C<parse_fullexpr()>|perlapi/parse_fullexpr>, | |
3010 | L<C<parse_listexpr()>|perlapi/parse_listexpr>, | |
3011 | L<C<parse_termexpr()>|perlapi/parse_termexpr>, and | |
3012 | L<C<parse_arithexpr()>|perlapi/parse_arithexpr> | |
3013 | functions have been added to the API. They perform | |
3014 | recursive-descent parsing of expressions at various precedence levels. | |
3015 | They are expected to be used by syntax plugins. | |
5076a392 | 3016 | |
1e463951 | 3017 | See L<perlapi> for details. |
5076a392 | 3018 | |
1e463951 | 3019 | =head3 Hints hash API |
5076a392 | 3020 | |
1e463951 FC |
3021 | A new C API for introspecting the hinthash C<%^H> at runtime has been |
3022 | added. See C<cop_hints_2hv>, C<cop_hints_fetchpvn>, C<cop_hints_fetchpvs>, | |
3023 | C<cop_hints_fetchsv>, and C<hv_copy_hints_hv> in L<perlapi> for details. | |
5076a392 | 3024 | |
1e463951 FC |
3025 | A new, experimental API has been added for accessing the internal |
3026 | structure that Perl uses for C<%^H>. See the functions beginning with | |
3027 | C<cophh_> in L<perlapi>. | |
5076a392 | 3028 | |
1e463951 | 3029 | =head3 C interface to C<caller()> |
5076a392 | 3030 | |
1e463951 FC |
3031 | The C<caller_cx> function has been added as an XSUB-writer's equivalent of |
3032 | C<caller()>. See L<perlapi> for details. | |
5076a392 | 3033 | |
1e463951 | 3034 | =head3 Custom per-subroutine check hooks |
5076a392 | 3035 | |
1e463951 FC |
3036 | XS code in an extension module can now annotate a subroutine (whether |
3037 | implemented in XS or in Perl) so that nominated XS code will be called | |
3038 | at compile time (specifically as part of op checking) to change the op | |
3039 | tree of that subroutine. The compile-time check function (supplied by | |
3040 | the extension module) can implement argument processing that can't be | |
3041 | expressed as a prototype, generate customised compile-time warnings, | |
3042 | perform constant folding for a pure function, inline a subroutine | |
3043 | consisting of sufficiently simple ops, replace the whole call with a | |
3044 | custom op, and so on. This was previously all possible by hooking the | |
3045 | C<entersub> op checker, but the new mechanism makes it easy to tie the | |
3046 | hook to a specific subroutine. See L<perlapi/cv_set_call_checker>. | |
5076a392 | 3047 | |
1e463951 FC |
3048 | To help in writing custom check hooks, several subtasks within standard |
3049 | C<entersub> op checking have been separated out and exposed in the API. | |
5076a392 | 3050 | |
1e463951 | 3051 | =head3 Improved support for custom OPs |
5076a392 | 3052 | |
1e463951 FC |
3053 | Custom ops can now be registered with the new C<custom_op_register> C |
3054 | function and the C<XOP> structure. This will make it easier to add new | |
3055 | properties of custom ops in the future. Two new properties have been added | |
3056 | already, C<xop_class> and C<xop_peep>. | |
5076a392 | 3057 | |
1e463951 FC |
3058 | C<xop_class> is one of the OA_*OP constants, and allows L<B> and other |
3059 | introspection mechanisms to work with custom ops | |
3060 | that aren't BASEOPs. C<xop_peep> is a pointer to | |
3061 | a function that will be called for ops of this | |
3062 | type from C<Perl_rpeep>. | |
5076a392 | 3063 | |
1e463951 FC |
3064 | See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more |
3065 | detail. | |
5076a392 | 3066 | |
1e463951 FC |
3067 | The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still |
3068 | supported but discouraged. | |
5076a392 | 3069 | |
1e463951 | 3070 | =head3 Scope hooks |
5076a392 | 3071 | |
1e463951 FC |
3072 | It is now possible for XS code to hook into Perl's lexical scope |
3073 | mechanism at compile time, using the new C<Perl_blockhook_register> | |
a60ea503 | 3074 | function. See L<perlguts/"Compile-time scope hooks">. |
5076a392 | 3075 | |
1e463951 | 3076 | =head3 The recursive part of the peephole optimizer is now hookable |
5076a392 FC |
3077 | |
3078 | In addition to C<PL_peepp>, for hooking into the toplevel peephole optimizer, a | |
3079 | C<PL_rpeepp> is now available to hook into the optimizer recursing into | |
3080 | side-chains of the optree. | |
3081 | ||
1e463951 | 3082 | =head3 New non-magical variants of existing functions |
5076a392 | 3083 | |
1e463951 FC |
3084 | The following functions/macros have been added to the API. The C<*_nomg> |
3085 | macros are equivalent to their non-_nomg variants, except that they ignore | |
3086 | get-magic. Those ending in C<_flags> allow one to specify whether | |
3087 | get-magic is processed. | |
5076a392 | 3088 | |
1e463951 FC |
3089 | sv_2bool_flags |
3090 | SvTRUE_nomg | |
3091 | sv_2nv_flags | |
3092 | SvNV_nomg | |
3093 | sv_cmp_flags | |
3094 | sv_cmp_locale_flags | |
3095 | sv_eq_flags | |
3096 | sv_collxfrm_flags | |
5076a392 | 3097 | |
1e463951 | 3098 | In some of these cases, the non-_flags functions have |
5076a392 FC |
3099 | been replaced with wrappers around the new functions. |
3100 | ||
1e463951 | 3101 | =head3 pv/pvs/sv versions of existing functions |
5076a392 | 3102 | |
1e463951 | 3103 | Many functions ending with pvn now have equivalent pv/pvs/sv versions. |
5076a392 | 3104 | |
1e463951 | 3105 | =head3 List op-building functions |
5076a392 | 3106 | |
1e463951 FC |
3107 | List op-building functions have been added to the |
3108 | API. See L<op_append_elem|perlapi/op_append_elem>, | |
3109 | L<op_append_list|perlapi/op_append_list>, and | |
3110 | L<op_prepend_elem|perlapi/op_prepend_elem> in L<perlapi>. | |
5076a392 | 3111 | |
1e463951 | 3112 | =head3 C<LINKLIST> |
5076a392 | 3113 | |
1e463951 FC |
3114 | The L<LINKLIST|perlapi/LINKLIST> macro, part of op building that |
3115 | constructs the execution-order op chain, has been added to the API. | |
5076a392 | 3116 | |
1e463951 | 3117 | =head3 Localisation functions |
5076a392 | 3118 | |
1e463951 FC |
3119 | The C<save_freeop>, C<save_op>, C<save_pushi32ptr> and C<save_pushptrptr> |
3120 | functions have been added to the API. | |
5076a392 | 3121 | |
1e463951 | 3122 | =head3 Stash names |
5076a392 | 3123 | |
1e463951 FC |
3124 | A stash can now have a list of effective names in addition to its usual |
3125 | name. The first effective name can be accessed via the C<HvENAME> macro, | |
3126 | which is now the recommended name to use in MRO linearisations (C<HvNAME> | |
3127 | being a fallback if there is no C<HvENAME>). | |
5076a392 | 3128 | |
1e463951 FC |
3129 | These names are added and deleted via C<hv_ename_add> and |
3130 | C<hv_ename_delete>. These two functions are I<not> part of the API. | |
5076a392 | 3131 | |
1e463951 | 3132 | =head3 New functions for finding and removing magic |
5076a392 | 3133 | |
1e463951 FC |
3134 | The L<C<mg_findext()>|perlapi/mg_findext> and |
3135 | L<C<sv_unmagicext()>|perlapi/sv_unmagicext> | |
3136 | functions have been added to the API. | |
3137 | They allow extension authors to find and remove magic attached to | |
3138 | scalars based on both the magic type and the magic virtual table, similar to how | |
3139 | C<sv_magicext()> attaches magic of a certain type and with a given virtual table | |
40bd7639 | 3140 | to a scalar. This eliminates the need for extensions to walk the list of |
1e463951 | 3141 | C<MAGIC> pointers of an C<SV> to find the magic that belongs to them. |
5076a392 | 3142 | |
1e463951 | 3143 | =head3 C<find_rundefsv> |
5076a392 | 3144 | |
1e463951 FC |
3145 | This function returns the SV representing C<$_>, whether it's lexical |
3146 | or dynamic. | |
5076a392 | 3147 | |
1e463951 | 3148 | =head3 C<Perl_croak_no_modify> |
5076a392 | 3149 | |
1e463951 FC |
3150 | C<Perl_croak_no_modify()> is short-hand for |
3151 | C<Perl_croak("%s", PL_no_modify)>. | |
5076a392 | 3152 | |
1e463951 | 3153 | =head3 C<PERL_STATIC_INLINE> define |
5076a392 | 3154 | |
1e463951 FC |
3155 | The C<PERL_STATIC_INLINE> define has been added to provide the best-guess |
3156 | incantation to use for static inline functions, if the C compiler supports | |
3157 | C99-style static inline. If it doesn't, it'll give a plain C<static>. | |
5076a392 | 3158 | |
1e463951 FC |
3159 | C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports |
3160 | inline functions. | |
5076a392 | 3161 | |
1e463951 | 3162 | =head3 New C<pv_escape> option for hexadecimal escapes |
5076a392 | 3163 | |
1e463951 FC |
3164 | A new option, C<PERL_PV_ESCAPE_NONASCII>, has been added to C<pv_escape> to |
3165 | dump all characters above ASCII in hexadecimal. Before, one could get all | |
3166 | characters as hexadecimal or the Latin1 non-ASCII as octal. | |
5076a392 | 3167 | |
1e463951 | 3168 | =head3 C<lex_start> |
5076a392 | 3169 | |
1e463951 | 3170 | C<lex_start> has been added to the API, but is considered experimental. |
5076a392 | 3171 | |
1e463951 | 3172 | =head3 C<op_scope()> and C<op_lvalue()> |
5076a392 | 3173 | |
1e463951 FC |
3174 | The C<op_scope()> and C<op_lvalue()> functions have been added to the API, |
3175 | but are considered experimental. | |
5076a392 | 3176 | |
1e463951 | 3177 | =head2 C API Changes |
5076a392 | 3178 | |
1e463951 | 3179 | =head3 C<PERL_POLLUTE> has been removed |
5076a392 | 3180 | |
1e463951 FC |
3181 | The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for |
3182 | backwards compatibility has been removed. It's use was always discouraged, | |
3183 | and MakeMaker contains a more specific escape hatch: | |
5076a392 | 3184 | |
1e463951 | 3185 | perl Makefile.PL POLLUTE=1 |
5076a392 | 3186 | |
1e463951 FC |
3187 | This can be used for modules that have not been upgraded to 5.6 naming |
3188 | conventions (and really should be completely obsolete by now). | |
5076a392 | 3189 | |
1e463951 | 3190 | =head3 Check API compatibility when loading XS modules |
5076a392 | 3191 | |
1e463951 FC |
3192 | When perl's API changes in incompatible ways (which usually happens between |
3193 | major releases), XS modules compiled for previous versions of perl will not | |
3194 | work anymore. They will need to be recompiled against the new perl. | |
5076a392 | 3195 | |
1e463951 FC |
3196 | In order to ensure that modules are recompiled, and to prevent users from |
3197 | accidentally loading modules compiled for old perls into newer ones, the | |
3198 | C<XS_APIVERSION_BOOTCHECK> macro has been added. That macro, which is | |
3199 | called when loading every newly compiled extension, compares the API | |
3200 | version of the running perl with the version a module has been compiled for | |
3201 | and raises an exception if they don't match. | |
5076a392 | 3202 | |
1e463951 | 3203 | =head3 Perl_fetch_cop_label |
5076a392 | 3204 | |
1e463951 FC |
3205 | The first argument of the C API function C<Perl_fetch_cop_label> has changed |
3206 | from C<struct refcounted he *> to C<COP *>, to insulate the user from | |
3207 | implementation details. | |
5076a392 | 3208 | |
1e463951 FC |
3209 | This API function was marked as "may change", and likely isn't in use outside |
3210 | the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other | |
3211 | references to it.) | |
5076a392 | 3212 | |
1e463951 | 3213 | =head3 GvCV() and GvGP() are no longer lvalues |
5076a392 | 3214 | |
1e463951 FC |
3215 | The new GvCV_set() and GvGP_set() macros are now provided to replace |
3216 | assignment to those two macros. | |
5076a392 | 3217 | |
1e463951 FC |
3218 | This allows a future commit to eliminate some backref magic between GV |
3219 | and CVs, which will require complete control over assignment to the | |
3220 | gp_cv slot. | |
5076a392 | 3221 | |
1e463951 | 3222 | =head3 CvGV() is no longer an lvalue |
5076a392 | 3223 | |
1e463951 FC |
3224 | Under some circumstances, the C<CvGV()> field of a CV is now |
3225 | reference-counted. To ensure consistent behaviour, direct assignment to | |
3226 | it, for example C<CvGV(cv) = gv> is now a compile-time error. A new macro, | |
3227 | C<CvGV_set(cv,gv)> has been introduced to perform this operation | |
3228 | safely. Note that modification of this field is not part of the public | |
3229 | API, regardless of this new macro (and despite its being listed in this section). | |
5076a392 | 3230 | |
1e463951 | 3231 | =head3 CvSTASH() is no longer an lvalue |
5076a392 | 3232 | |
1e463951 FC |
3233 | The C<CvSTASH()> macro can now only be used as an rvalue. C<CvSTASH_set()> |
3234 | has been added to replace assignment to C<CvSTASH()>. This is to ensure | |
3235 | that backreferences are handled properly. These macros are not part of the | |
3236 | API. | |
5076a392 | 3237 | |
1e463951 | 3238 | =head3 Calling conventions for C<newFOROP> and C<newWHILEOP> |
5076a392 | 3239 | |
40bd7639 | 3240 | The way the parser handles labels has been cleaned up and refactored. As a |
1e463951 FC |
3241 | result, the C<newFOROP()> constructor function no longer takes a parameter |
3242 | stating what label is to go in the state op. | |
5076a392 | 3243 | |
1e463951 FC |
3244 | The C<newWHILEOP()> and C<newFOROP()> functions no longer accept a line |
3245 | number as a parameter. | |
5076a392 | 3246 | |
1e463951 | 3247 | =head3 Flags passed to C<uvuni_to_utf8_flags> and C<utf8n_to_uvuni> |
5076a392 | 3248 | |
1e463951 FC |
3249 | Some of the flags parameters to uvuni_to_utf8_flags() and |
3250 | utf8n_to_uvuni() have changed. This is a result of Perl's now allowing | |
5076a392 FC |
3251 | internal storage and manipulation of code points that are problematic |
3252 | in some situations. Hence, the default actions for these functions has | |
3253 | been complemented to allow these code points. The new flags are | |
3254 | documented in L<perlapi>. Code that requires the problematic code | |
483b16f3 | 3255 | points to be rejected needs to change to use the new flags. Some flag |
5076a392 FC |
3256 | names are retained for backward source compatibility, though they do |
3257 | nothing, as they are now the default. However the flags | |
3258 | C<UNICODE_ALLOW_FDD0>, C<UNICODE_ALLOW_FFFF>, C<UNICODE_ILLEGAL>, and | |
3259 | C<UNICODE_IS_ILLEGAL> have been removed, as they stem from a | |
3260 | fundamentally broken model of how the Unicode non-character code points | |
3261 | should be handled, which is now described in | |
52d6192b FC |
3262 | L<perlunicode/Non-character code points>. See also the Unicode section |
3263 | under L</Selected Bug Fixes>. | |
5076a392 | 3264 | |
1e463951 | 3265 | =head2 Deprecated C APIs |
5076a392 | 3266 | |
1e463951 | 3267 | =over |
5076a392 | 3268 | |
1e463951 | 3269 | =item C<Perl_ptr_table_clear> |
5076a392 | 3270 | |
1e463951 FC |
3271 | C<Perl_ptr_table_clear> is no longer part of Perl's public API. Calling it |
3272 | now generates a deprecation warning, and it will be removed in a future | |
3273 | release. | |
5076a392 | 3274 | |
1e463951 | 3275 | =item C<sv_compile_2op> |
5076a392 | 3276 | |
1e463951 FC |
3277 | The C<sv_compile_2op()> API function is now deprecated. Searches suggest |
3278 | that nothing on CPAN is using it, so this should have zero impact. | |
5076a392 | 3279 | |
1e463951 FC |
3280 | It attempted to provide an API to compile code down to an optree, but failed |
3281 | to bind correctly to lexicals in the enclosing scope. It's not possible to | |
3282 | fix this problem within the constraints of its parameters and return value. | |
5076a392 | 3283 | |
1e463951 | 3284 | =item C<find_rundefsvoffset> |
5076a392 | 3285 | |
1e463951 FC |
3286 | The C<find_rundefsvoffset> function has been deprecated. It appeared that |
3287 | its design was insufficient for reliably getting the lexical C<$_> at | |
3288 | run-time. | |
5076a392 | 3289 | |
1e463951 | 3290 | Use the new C<find_rundefsv> function or the C<UNDERBAR> macro |
cbb8c2bc FC |
3291 | instead. They directly return the right SV |
3292 | representing C<$_>, whether it's | |
1e463951 | 3293 | lexical or dynamic. |
5076a392 | 3294 | |
1e463951 | 3295 | =item C<CALL_FPTR> and C<CPERLscope> |
5076a392 | 3296 | |
1e463951 FC |
3297 | Those are left from an old implementation of C<MULTIPLICITY> using C++ objects, |
3298 | which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so | |
3299 | they shouldn't be used anymore. | |
5076a392 | 3300 | |
1e463951 FC |
3301 | For compatibility, they are still defined for external C<XS> code. Only |
3302 | extensions defining C<PERL_CORE> must be updated now. | |
5076a392 | 3303 | |
1e463951 | 3304 | =back |
5076a392 | 3305 | |
1e463951 | 3306 | =head2 Other Internal Changes |
5076a392 | 3307 | |
1e463951 | 3308 | =head3 Stack unwinding |
5076a392 | 3309 | |
1e463951 FC |
3310 | The protocol for unwinding the C stack at the last stage of a C<die> |
3311 | has changed how it identifies the target stack frame. This now uses | |
3312 | a separate variable C<PL_restartjmpenv>, where previously it relied on | |
3313 | the C<blk_eval.cur_top_env> pointer in the C<eval> context frame that | |
3314 | has nominally just been discarded. This change means that code running | |
3315 | during various stages of Perl-level unwinding no longer needs to take | |
3316 | care to avoid destroying the ghost frame. | |
5076a392 | 3317 | |
1e463951 | 3318 | =head3 Scope stack entries |
5076a392 | 3319 | |
1e463951 FC |
3320 | The format of entries on the scope stack has been changed, resulting in a |
3321 | reduction of memory usage of about 10%. In particular, the memory used by | |
3322 | the scope stack to record each active lexical variable has been halved. | |
5076a392 | 3323 | |
1e463951 | 3324 | =head3 Memory allocation for pointer tables |
5076a392 | 3325 | |
1e463951 FC |
3326 | Memory allocation for pointer tables has been changed. Previously |
3327 | C<Perl_ptr_table_store> allocated memory from the same arena system as | |
3328 | C<SV> bodies and C<HE>s, with freed memory remaining bound to those arenas | |
3329 | until interpreter exit. Now it allocates memory from arenas private to the | |
3330 | specific pointer table, and that memory is returned to the system when | |
3331 | C<Perl_ptr_table_free> is called. Additionally, allocation and release are | |
3332 | both less CPU intensive. | |
5076a392 | 3333 | |
1e463951 | 3334 | =head3 C<UNDERBAR> |
5076a392 | 3335 | |
1e463951 FC |
3336 | The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a |
3337 | noop but should still be used to ensure past and future compatibility. | |
5076a392 | 3338 | |
1e463951 | 3339 | =head3 String comparison routines renamed |
5076a392 | 3340 | |
1e463951 FC |
3341 | The ibcmp_* functions have been renamed and are now called foldEQ, |
3342 | foldEQ_locale and foldEQ_utf8. The old names are still available as | |
3343 | macros. | |
3344 | ||
3345 | =head3 C<chop> and C<chomp> implementations merged | |
3346 | ||
3347 | The opcode bodies for C<chop> and C<chomp> and for C<schop> and C<schomp> | |
3348 | have been merged. The implementation functions C<Perl_do_chop()> and | |
3349 | C<Perl_do_chomp()>, never part of the public API, have been merged and | |
3350 | moved to a static function in F<pp.c>. This shrinks the perl binary | |
3351 | slightly, and should not affect any code outside the core (unless it is | |
3352 | relying on the order of side effects when C<chomp> is passed a I<list> of | |
3353 | values). | |
5076a392 FC |
3354 | |
3355 | =head1 Selected Bug Fixes | |
3356 | ||
e8e35311 FC |
3357 | =head2 I/O |
3358 | ||
5076a392 FC |
3359 | =over 4 |
3360 | ||
3361 | =item * | |
3362 | ||
e8e35311 | 3363 | Perl no longer produces this warning: |
a593b319 FC |
3364 | |
3365 | $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"' | |
3366 | Use of uninitialized value in binmode at -e line 1. | |
3367 | ||
3368 | =item * | |
3369 | ||
e8e35311 FC |
3370 | Opening a glob reference via C<< open $fh, "E<gt>", \*glob >> will no longer |
3371 | cause the glob to be corrupted when the filehandle is printed to. This would | |
3372 | cause perl to crash whenever the glob's contents were accessed | |
3373 | [perl #77492]. | |
4ed2cea4 FC |
3374 | |
3375 | =item * | |
3376 | ||
e8e35311 | 3377 | PerlIO no longer crashes when called recursively, e.g., from a signal |
cbb8c2bc | 3378 | handler. Now it just leaks memory [perl #75556]. |
4ed2cea4 FC |
3379 | |
3380 | =item * | |
3381 | ||
e8e35311 | 3382 | Most I/O functions were not warning for unopened handles unless the |
cbb8c2bc | 3383 | 'closed' and 'unopened' warnings categories were both enabled. Now only |
e8e35311 | 3384 | C<use warnings 'unopened'> is necessary to trigger these warnings (as was |
438c239f | 3385 | always meant to be the case). |
4ed2cea4 FC |
3386 | |
3387 | =item * | |
3388 | ||
438c239f | 3389 | There have been several fixes to PerlIO layers: |
e8e35311 | 3390 | |
438c239f FC |
3391 | When C<binmode FH, ":crlf"> pushes the C<:crlf> layer on top of the stack, |
3392 | it no longer enables crlf layers lower in the stack, to avoid unexpected | |
3393 | results [perl #38456]. | |
4ed2cea4 | 3394 | |
438c239f FC |
3395 | Opening a file in C<:raw> mode now does what it advertises to do (first |
3396 | open the file, then binmode it), instead of simply leaving off the top | |
3397 | layer [perl #80764]. | |
5076a392 | 3398 | |
438c239f FC |
3399 | The three layers C<:pop>, C<:utf8> and C<:bytes> didn't allow stacking when |
3400 | opening a file. For example | |
e8e35311 | 3401 | this: |
5076a392 | 3402 | |
e8e35311 | 3403 | open FH, '>:pop:perlio', 'some.file' or die $!; |
5076a392 | 3404 | |
438c239f FC |
3405 | Would throw an error: "Invalid argument". This has been fixed in this |
3406 | release [perl #82484]. | |
5076a392 | 3407 | |
e8e35311 FC |
3408 | =back |
3409 | ||
3410 | =head2 Regular Expression Bug Fixes | |
3411 | ||
3412 | =over | |
5076a392 FC |
3413 | |
3414 | =item * | |
3415 | ||
e8e35311 FC |
3416 | The regular expression engine no longer loops when matching |
3417 | C<"\N{LATIN SMALL LIGATURE FF}" =~ /f+/i> and similar expressions | |
cdc10f43 | 3418 | [perl #72998] (5.12.1). |
5076a392 FC |
3419 | |
3420 | =item * | |
3421 | ||
e8e35311 FC |
3422 | The trie runtime code should no longer allocate massive amounts of memory, |
3423 | fixing #74484. | |
5076a392 FC |
3424 | |
3425 | =item * | |
3426 | ||
438c239f FC |
3427 | Syntax errors in C<< (?{...}) >> blocks no longer cause panic messages |
3428 | [perl #2353]. | |
5076a392 FC |
3429 | |
3430 | =item * | |
3431 | ||
438c239f FC |
3432 | A pattern like C<(?:(o){2})?> no longer causes a "panic" error |
3433 | [perl #39233]. | |
5076a392 FC |
3434 | |
3435 | =item * | |
3436 | ||
438c239f | 3437 | A fatal error in regular expressions containing C<(.*?)> when processing |
d430b8e7 | 3438 | UTF-8 data has been fixed [perl #75680] (5.12.2). |
5076a392 FC |
3439 | |
3440 | =item * | |
3441 | ||
e8e35311 | 3442 | An erroneous regular expression engine optimisation that caused regex verbs like |
438c239f | 3443 | C<*COMMIT> sometimes to be ignored has been removed. |
5076a392 FC |
3444 | |
3445 | =item * | |
3446 | ||
e8e35311 FC |
3447 | The regular expression bracketed character class C<[\8\9]> was effectively the |
3448 | same as C<[89\000]>, incorrectly matching a NULL character. It also gave | |
3449 | incorrect warnings that the C<8> and C<9> were ignored. Now C<[\8\9]> is the | |
3450 | same as C<[89]> and gives legitimate warnings that C<\8> and C<\9> are | |
3451 | unrecognized escape sequences, passed-through. | |
5076a392 FC |
3452 | |
3453 | =item * | |
3454 | ||
e8e35311 FC |
3455 | A regular expression match in the right-hand side of a global substitution |
3456 | (C<s///g>) that is in the same scope will no longer cause match variables | |
cbb8c2bc | 3457 | to have the wrong values on subsequent iterations. This can happen when an |
e8e35311 FC |
3458 | array or hash subscript is interpolated in the right-hand side, as in |
3459 | C<s|(.)|@a{ print($1), /./ }|g> [perl #19078]. | |
5076a392 FC |
3460 | |
3461 | =item * | |