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