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