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 | ||
12 | Some of the bug fixes in this release have been backported to subsequent | |
13 | releases of 5.12.x. Those are indicated with the 5.12.x version in | |
14 | parentheses. | |
15 | ||
16 | XXX Go through the perl512*delta files and do that. | |
17 | ||
18 | =head1 Notice | |
19 | ||
20 | XXX Any important notices here | |
21 | ||
22 | =head1 Core Enhancements | |
23 | ||
1f539a1a | 24 | =head2 Unicode |
5076a392 | 25 | |
1f539a1a | 26 | =head3 Unicode Version 6.0 is now supported (mostly) |
5076a392 | 27 | |
1f539a1a FC |
28 | Perl comes with the Unicode 6.0 data base updated with |
29 | L<Corrigendum #8|http://www.unicode.org/versions/corrigendum8.html>, | |
30 | with one exception noted below. | |
31 | See L<http://unicode.org/versions/Unicode6.0.0> for details on the new | |
32 | release. Perl does not support any Unicode provisional properties, | |
33 | including the new ones for this release, but their database files are | |
34 | packaged with Perl. | |
5076a392 | 35 | |
1f539a1a FC |
36 | Unicode 6.0 has chosen to use the name C<BELL> for the character at U+1F514, |
37 | which is a symbol that looks like a bell, and used in Japanese cell | |
38 | phones. This conflicts with the long-standing Perl usage of having | |
39 | C<BELL> mean the ASCII C<BEL> character, U+0007. In Perl 5.14, | |
40 | C<\N{BELL}> will continue to mean U+0007, but its use will generate a | |
41 | deprecated warning message, unless such warnings are turned off. The | |
42 | new name for U+0007 in Perl will be C<ALERT>, which corresponds nicely | |
43 | with the existing shorthand sequence for it, C<"\a">. C<\N{BEL}> will | |
44 | mean U+0007, with no warning given. The character at U+1F514 will not | |
45 | have a name in 5.14, but can be referred to by C<\N{U+1F514}>. The plan | |
46 | is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code | |
47 | that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>, | |
48 | C<\N{BEL}>, or C<"\a"> instead. | |
5076a392 | 49 | |
1f539a1a | 50 | =head3 Full functionality for C<use feature 'unicode_strings'> |
5076a392 | 51 | |
1f539a1a FC |
52 | This release provides full functionality for C<use feature |
53 | 'unicode_strings'>. Under its scope, all string operations executed and | |
54 | regular expressions compiled (even if executed outside its scope) have | |
55 | Unicode semantics. See L<feature>. | |
5076a392 | 56 | |
1f539a1a FC |
57 | This feature avoids most forms of the "Unicode Bug" (See |
58 | L<perlunicode/The "Unicode Bug"> for details.) If there is a | |
59 | possibility that your code will process Unicode strings, you are | |
60 | B<strongly> encouraged to use this subpragma to avoid nasty surprises. | |
5076a392 | 61 | |
1f539a1a | 62 | =head3 C<\N{I<name>}> and C<charnames> enhancements |
5076a392 | 63 | |
1f539a1a | 64 | =over |
5076a392 | 65 | |
1f539a1a | 66 | =item * |
5076a392 FC |
67 | |
68 | C<\N{}> and C<charnames::vianame> now know about the abbreviated | |
69 | character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., as | |
70 | well as all the customary abbreviations for the C0 and C1 control | |
71 | characters (such as ACK, BEL, CAN, etc.), as well as a few new variants | |
72 | in common usage of some C1 full names. | |
73 | ||
1f539a1a FC |
74 | =item * |
75 | ||
959ad7d5 FC |
76 | Unicode has a number of named character sequences, in which particular sequences |
77 | of code points are given names. C<\N{...}> now recognizes these. | |
78 | ||
1f539a1a FC |
79 | =item * |
80 | ||
959ad7d5 FC |
81 | C<\N{}>, C<charnames::vianame>, C<charnames::viacode> now know about every |
82 | character in Unicode. Previously, they didn't know about the Hangul syllables | |
83 | nor a number of CJK (Chinese/Japanese/Korean) characters. | |
84 | ||
1f539a1a FC |
85 | =item * |
86 | ||
5076a392 FC |
87 | In the past, it was ineffective to override one of Perl's abbreviations |
88 | with your own custom alias. Now it works. | |
89 | ||
1f539a1a FC |
90 | =item * |
91 | ||
5076a392 FC |
92 | You can also create a custom alias directly to the ordinal of a |
93 | character, known by C<\N{...}>, C<charnames::vianame()>, and | |
94 | C<charnames::viacode()>. Previously, an alias had to be to an official | |
95 | Unicode character name. This made it impossible to create an alias for | |
96 | a code point that had no name, such as the ones reserved for private | |
97 | use. So this change allows you to make more effective use of private | |
98 | use characters. Only if there is no official name will | |
99 | C<charnames::viacode()> return your custom one. | |
100 | ||
1f539a1a FC |
101 | =item * |
102 | ||
959ad7d5 FC |
103 | A new function, C<charnames::string_vianame()>, has been added. |
104 | This function is a run-time version of C<\N{...}>, returning the string | |
105 | of characters whose Unicode name is its parameter. It can handle | |
106 | Unicode named character sequences, whereas the pre-existing | |
107 | C<charnames::vianame()> cannot, as the latter returns a single code | |
108 | point. | |
109 | ||
1f539a1a FC |
110 | =back |
111 | ||
5076a392 FC |
112 | See L<charnames> for details on all these changes. |
113 | ||
1f539a1a | 114 | =head3 Any unsigned value can be encoded as a character |
5076a392 | 115 | |
1f539a1a FC |
116 | With this release, Perl is adopting a model that any unsigned value can |
117 | be treated as a code point and encoded internally (as utf8) without | |
118 | warnings -- not just the code points that are legal in Unicode. | |
119 | However, unless utf8 warnings have been | |
120 | explicitly lexically turned off, outputting or performing a | |
121 | Unicode-defined operation (such as upper-casing) on such a code point | |
122 | will generate a warning. Attempting to input these using strict rules | |
123 | (such as with the C<:encoding('UTF-8')> layer) will continue to fail. | |
124 | Prior to this release the handling was very inconsistent, and incorrect | |
125 | in places. Also, the Unicode non-characters, some of which previously were | |
126 | erroneously considered illegal in places by Perl, contrary to the Unicode | |
127 | standard, are now always legal internally. But inputting or outputting | |
128 | them will work the same as for the non-legal Unicode code points, as the | |
129 | Unicode standard says they are illegal for "open interchange". | |
5076a392 | 130 | |
1f539a1a | 131 | =head3 New warnings categories for problematic (non-)Unicode code points. |
5076a392 | 132 | |
1f539a1a FC |
133 | Three new warnings subcategories of <utf8> have been added. These |
134 | allow you to turn off warnings for their covered events, while allowing | |
135 | the other UTF-8 warnings to remain on. The three categories are: | |
136 | C<surrogate> when UTF-16 surrogates are encountered; | |
137 | C<nonchar> when Unicode non-character code points are encountered; | |
138 | and C<non_unicode> when code points that are above the legal Unicode | |
139 | maximum of 0x10FFFF are encountered. | |
5076a392 | 140 | |
1f539a1a | 141 | =head2 Regular Expressions |
5076a392 | 142 | |
1f539a1a | 143 | =head3 C<(?^...)> construct to signify default modifiers |
5076a392 FC |
144 | |
145 | A caret (also called a "circumflex accent") C<"^"> immediately following | |
146 | a C<"(?"> in a regular expression now means that the subexpression is to | |
147 | not inherit the surrounding modifiers such as C</i>, but to revert to the | |
148 | Perl defaults. Any modifiers following the caret override the defaults. | |
149 | ||
150 | The stringification of regular expressions now uses this | |
151 | notation. E.g., before, C<qr/hlagh/i> would be stringified as | |
152 | C<(?i-xsm:hlagh)>, but now it's stringified as C<(?^i:hlagh)>. | |
153 | ||
154 | The main purpose of this is to allow tests that rely on the | |
155 | stringification to not have to change when new modifiers are added. | |
156 | See L<perlre/Extended Patterns>. | |
157 | ||
1f539a1a | 158 | =head3 C</d>, C</l>, C</u>, C</a>, and C</aa> modifiers |
5076a392 | 159 | |
959ad7d5 FC |
160 | Four new regular expression modifiers have been added. These are mutually |
161 | exclusive; one only can be turned on at a time. | |
5076a392 | 162 | |
959ad7d5 | 163 | The C</l> modifier says to compile the regular expression as if it were |
5076a392 FC |
164 | in the scope of C<use locale>, even if it is not. |
165 | ||
959ad7d5 | 166 | The C</u> modifier says to compile the regular expression as if it were |
5076a392 FC |
167 | in the scope of a C<use feature "unicode_strings"> pragma. |
168 | ||
959ad7d5 | 169 | The C</d> modifier is used to override any C<use locale> and |
5076a392 FC |
170 | C<use feature "unicode_strings"> pragmas that are in effect at the time |
171 | of compiling the regular expression. | |
172 | ||
959ad7d5 FC |
173 | The C</a> regular expression modifier restricts C<\s>, C<\d> and C<\w> and |
174 | the Posix (C<[[:posix:]]>) character classes to the ASCII range. The | |
175 | complements and C<\b> and C<\B> are correspondingly | |
176 | affected. Otherwise, C</a> behaves like the C</u> modifier, in that | |
177 | case-insensitive matching uses Unicode semantics; for example, "k" will | |
178 | match the Unicode C<\N{KELVIN SIGN}> under C</i> matching, and code | |
179 | points in the Latin1 range, above ASCII will have Unicode semantics when | |
180 | it comes to case-insensitive matching. | |
5076a392 | 181 | |
959ad7d5 FC |
182 | The C</aa> modifier is like C</a>, except that, in case-insensitive matching, no ASCII character will match a |
183 | non-ASCII character. For example, | |
5076a392 | 184 | |
959ad7d5 | 185 | 'k' =~ /\N{KELVIN SIGN}/ai |
5076a392 | 186 | |
959ad7d5 | 187 | will match; it won't under C</aa>. |
5076a392 | 188 | |
959ad7d5 | 189 | See L<perlre/Modifiers> for more detail. |
5076a392 | 190 | |
1f539a1a | 191 | =head3 Non-destructive substitution |
5076a392 | 192 | |
1f539a1a FC |
193 | The substitution (C<s///>) and transliteration |
194 | (C<y///>) operators now support an C</r> option that | |
195 | copies the input variable, carries out the substitution on | |
196 | the copy and returns the result. The original remains unmodified. | |
5076a392 | 197 | |
1f539a1a FC |
198 | my $old = 'cat'; |
199 | my $new = $old =~ s/cat/dog/r; | |
200 | # $old is 'cat' and $new is 'dog' | |
5076a392 | 201 | |
1f539a1a | 202 | This is particularly useful with C<map>. See L<perlop> for more examples. |
5076a392 | 203 | |
1f539a1a | 204 | =head3 Reentrant regular expression engine |
5076a392 | 205 | |
1f539a1a FC |
206 | It is now safe to use regular expressions within C<(?{...})> and |
207 | C<(??{...})> code blocks inside regular expressions. | |
5076a392 | 208 | |
1f539a1a FC |
209 | These block are still experimental, however, and still have problems with |
210 | lexical (C<my>) variables, lexical pragmata and abnormal exiting. | |
5076a392 | 211 | |
1f539a1a | 212 | =head3 C<use re '/flags';> |
5076a392 FC |
213 | |
214 | The C<re> pragma now has the ability to turn on regular expression flags | |
215 | till the end of the lexical scope: | |
216 | ||
217 | use re '/x'; | |
218 | "foo" =~ / (.+) /; # /x implied | |
219 | ||
220 | See L<re/"'/flags' mode"> for details. | |
221 | ||
1f539a1a | 222 | =head3 \o{...} for octals |
5076a392 | 223 | |
1f539a1a FC |
224 | There is a new escape sequence, C<"\o">, in double-quote-like contexts. |
225 | It must be followed by braces enclosing an octal number of at least one | |
226 | digit. It interpolates as the character with an ordinal value equal to | |
227 | the octal number. This construct allows large octal ordinals beyond the | |
228 | current max of 0777 to be represented. It also allows you to specify a | |
229 | character in octal which can safely be concatenated with other regex | |
230 | snippets and which won't be confused with being a backreference to | |
231 | a regex capture group. See L<perlre/Capture groups>. | |
232 | ||
233 | =head3 Add C<\p{Titlecase}> as a synonym for C<\p{Title}> | |
234 | ||
235 | This synonym is added for symmetry with the Unicode property names | |
236 | C<\p{Uppercase}> and C<\p{Lowercase}>. | |
5076a392 | 237 | |
1f539a1a FC |
238 | =head3 Regular expression debugging output improvement |
239 | ||
240 | Regular expression debugging output (turned on by C<use re 'debug';>) now | |
241 | uses hexadecimal when escaping non-ASCII characters, instead of octal. | |
242 | ||
243 | =head2 Syntactical Enhancements | |
244 | ||
245 | =head3 Array and hash container functions accept references | |
5076a392 FC |
246 | |
247 | All built-in functions that operate directly on array or hash | |
248 | containers now also accept hard references to arrays or hashes: | |
249 | ||
250 | |----------------------------+---------------------------| | |
251 | | Traditional syntax | Terse syntax | | |
252 | |----------------------------+---------------------------| | |
253 | | push @$arrayref, @stuff | push $arrayref, @stuff | | |
254 | | unshift @$arrayref, @stuff | unshift $arrayref, @stuff | | |
255 | | pop @$arrayref | pop $arrayref | | |
256 | | shift @$arrayref | shift $arrayref | | |
257 | | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 | | |
258 | | keys %$hashref | keys $hashref | | |
259 | | keys @$arrayref | keys $arrayref | | |
260 | | values %$hashref | values $hashref | | |
261 | | values @$arrayref | values $arrayref | | |
262 | | ($k,$v) = each %$hashref | ($k,$v) = each $hashref | | |
263 | | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref | | |
264 | |----------------------------+---------------------------| | |
265 | ||
266 | This allows these built-in functions to act on long dereferencing chains | |
267 | or on the return value of subroutines without needing to wrap them in | |
268 | C<@{}> or C<%{}>: | |
269 | ||
270 | push @{$obj->tags}, $new_tag; # old way | |
271 | push $obj->tags, $new_tag; # new way | |
272 | ||
273 | for ( keys %{$hoh->{genres}{artists}} ) {...} # old way | |
274 | for ( keys $hoh->{genres}{artists} ) {...} # new way | |
275 | ||
276 | For C<push>, C<unshift> and C<splice>, the reference will auto-vivify | |
277 | if it is not defined, just as if it were wrapped with C<@{}>. | |
278 | ||
279 | Calling C<keys> or C<values> directly on a reference gives a substantial | |
280 | performance improvement over explicit dereferencing. | |
281 | ||
282 | For C<keys>, C<values>, C<each>, when overloaded dereferencing is | |
283 | present, the overloaded dereference is used instead of dereferencing the | |
284 | underlying reftype. Warnings are issued about assumptions made in the | |
285 | following three ambiguous cases: | |
286 | ||
287 | (a) If both %{} and @{} overloading exists, %{} is used | |
288 | (b) If %{} overloading exists on a blessed arrayref, %{} is used | |
289 | (c) If @{} overloading exists on a blessed hashref, @{} is used | |
290 | ||
1f539a1a FC |
291 | =head3 Single term prototype |
292 | ||
293 | The C<+> prototype is a special alternative to C<$> that will act like | |
294 | C<\[@%]> when given a literal array or hash variable, but will otherwise | |
295 | force scalar context on the argument. This is useful for functions which | |
296 | should accept either a literal array or an array reference as the argument: | |
297 | ||
298 | sub smartpush (+@) { | |
299 | my $aref = shift; | |
300 | die "Not an array or arrayref" unless ref $aref eq 'ARRAY'; | |
301 | push @$aref, @_; | |
302 | } | |
303 | ||
304 | When using the C<+> prototype, your function must check that the argument | |
305 | is of an acceptable type. | |
306 | ||
307 | =head3 C<package> block syntax | |
308 | ||
309 | A package declaration can now contain a code block, in which case the | |
310 | declaration is in scope only inside that block. So C<package Foo { ... }> | |
311 | is precisely equivalent to C<{ package Foo; ... }>. It also works with | |
312 | a version number in the declaration, as in C<package Foo 1.2 { ... }>. | |
313 | See L<perlfunc> (434da3..36f77d, 702646). | |
314 | ||
315 | =head3 Statement labels can appear in more places | |
316 | ||
317 | Statement labels can now occur before any type of statement or declaration, | |
318 | such as C<package>. | |
319 | ||
320 | =head3 Stacked labels | |
321 | ||
322 | Multiple statement labels can now appear before a single statement. | |
323 | ||
324 | =head3 Uppercase X/B allowed in hexadecimal/binary literals | |
325 | ||
326 | Literals may now use either upper case C<0X...> or C<0B...> prefixes, | |
327 | in addition to the already supported C<0x...> and C<0b...> | |
328 | syntax. (RT#76296) (a674e8d, 333f87f) | |
329 | ||
330 | C, Ruby, Python and PHP already supported this syntax, and it makes | |
331 | Perl more internally consistent. A round-trip with C<eval sprintf | |
332 | "%#X", 0x10> now returns C<16> in addition to C<eval sprintf "%#x", | |
333 | 0x10>, which worked before. | |
334 | ||
335 | =head2 Exception Handling | |
336 | ||
337 | Several changes have been made to the way C<die>, C<warn>, and C<$@> | |
338 | behave, in order to make them more reliable and consistent. | |
339 | ||
340 | When an exception is thrown inside an C<eval>, the exception is no | |
341 | longer at risk of being clobbered by code running during unwinding | |
342 | (e.g., destructors). Previously, the exception was written into C<$@> | |
343 | early in the throwing process, and would be overwritten if C<eval> was | |
344 | used internally in the destructor for an object that had to be freed | |
345 | while exiting from the outer C<eval>. Now the exception is written | |
346 | into C<$@> last thing before exiting the outer C<eval>, so the code | |
347 | running immediately thereafter can rely on the value in C<$@> correctly | |
348 | corresponding to that C<eval>. (C<$@> is still also set before exiting the | |
349 | C<eval>, for the sake of destructors that rely on this.) | |
350 | ||
351 | Likewise, a C<local $@> inside an C<eval> will no longer clobber any | |
352 | exception thrown in its scope. Previously, the restoration of C<$@> upon | |
353 | unwinding would overwrite any exception being thrown. Now the exception | |
354 | gets to the C<eval> anyway. So C<local $@> is safe before a C<die>. | |
355 | ||
356 | Exceptions thrown from object destructors no longer modify the C<$@> | |
357 | of the surrounding context. (If the surrounding context was exception | |
358 | unwinding, this used to be another way to clobber the exception being | |
359 | thrown.) Previously such an exception was | |
360 | sometimes emitted as a warning, and then either was | |
361 | string-appended to the surrounding C<$@> or completely replaced the | |
362 | surrounding C<$@>, depending on whether that exception and the surrounding | |
363 | C<$@> were strings or objects. Now, an exception in this situation is | |
364 | always emitted as a warning, leaving the surrounding C<$@> untouched. | |
365 | In addition to object destructors, this also affects any function call | |
366 | performed by XS code using the C<G_KEEPERR> flag. | |
367 | ||
368 | Warnings for C<warn> can now be objects, in the same way as exceptions | |
369 | for C<die>. If an object-based warning gets the default handling, | |
370 | of writing to standard error, it is stringified as | |
371 | before, with the file and line number appended. But | |
372 | a C<$SIG{__WARN__}> handler will now receive an | |
373 | object-based warning as an object, where previously it was passed the | |
374 | result of stringifying the object. | |
375 | ||
376 | =head2 Other Enhancements | |
377 | ||
378 | =head3 Assignment to C<$0> sets the legacy process name with C<prctl()> on Linux | |
379 | ||
380 | On Linux the legacy process name will be set with L<prctl(2)>, in | |
381 | addition to altering the POSIX name via C<argv[0]> as perl has done | |
382 | since version 4.000. Now system utilities that read the legacy process | |
383 | name such as ps, top and killall will recognize the name you set when | |
384 | assigning to C<$0>. The string you supply will be cut off at 16 bytes, | |
385 | this is a limitation imposed by Linux. | |
386 | ||
387 | =head3 C<srand()> now returns the seed | |
388 | ||
389 | This allows programs that need to have repeatable results to not have to come | |
390 | up with their own seed generating mechanism. Instead, they can use C<srand()> | |
391 | and somehow stash the return for future use. Typical is a test program which | |
392 | has too many combinations to test comprehensively in the time available to it | |
393 | each run. It can test a random subset each time, and should there be a failure, | |
394 | log the seed used for that run so that it can later be used to reproduce the | |
395 | exact results. | |
396 | ||
397 | =head3 printf-like functions understand post-1980 size modifiers | |
398 | ||
399 | Perl's printf and sprintf operators, and Perl's internal printf replacement | |
400 | function, now understand the C90 size modifiers "hh" (C<char>), "z" | |
401 | (C<size_t>), and "t" (C<ptrdiff_t>). Also, when compiled with a C99 | |
402 | compiler, Perl now understands the size modifier "j" (C<intmax_t>). | |
403 | ||
404 | So, for example, on any modern machine, C<sprintf('%hhd', 257)> returns '1'. | |
405 | ||
406 | =head3 New global variable C<${^GLOBAL_PHASE}> | |
5076a392 FC |
407 | |
408 | A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow | |
409 | introspection of the current phase of the perl interpreter. It's explained in | |
410 | detail in L<perlvar/"${^GLOBAL_PHASE}"> and | |
411 | L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">. | |
412 | ||
1f539a1a | 413 | =head3 C<-d:-foo> calls C<Devel::foo::unimport> |
5076a392 FC |
414 | |
415 | The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>> | |
416 | equivalent to C<-MDevel::foo=bar>, which expands | |
417 | internally to C<use Devel::foo 'bar';>. | |
418 | F<perl> now allows prefixing the module name with C<->, with the same | |
419 | semantics as C<-M>, I<i.e.> | |
420 | ||
421 | =over 4 | |
422 | ||
423 | =item C<-d:-foo> | |
424 | ||
425 | Equivalent to C<-M-Devel::foo>, expands to | |
426 | C<no Devel::foo;>, calls C<< Devel::foo->unimport() >> | |
427 | if the method exists. | |
428 | ||
429 | =item C<-d:-foo=bar> | |
430 | ||
431 | Equivalent to C<-M-Devel::foo=bar>, expands to C<no Devel::foo 'bar';>, | |
432 | calls C<< Devel::foo->unimport('bar') >> if the method exists. | |
433 | ||
434 | =back | |
435 | ||
436 | This is particularly useful to suppresses the default actions of a | |
437 | C<Devel::*> module's C<import> method whilst still loading it for debugging. | |
438 | ||
1f539a1a | 439 | =head3 Filehandle method calls load L<IO::File> on demand |
5076a392 FC |
440 | |
441 | When a method call on a filehandle would die because the method cannot | |
442 | be resolved, and L<IO::File> has not been loaded, Perl now loads L<IO::File> | |
443 | via C<require> and attempts method resolution again: | |
444 | ||
445 | open my $fh, ">", $file; | |
446 | $fh->binmode(":raw"); # loads IO::File and succeeds | |
447 | ||
448 | This also works for globs like STDOUT, STDERR and STDIN: | |
449 | ||
450 | STDOUT->autoflush(1); | |
451 | ||
452 | Because this on-demand load only happens if method resolution fails, the | |
453 | legacy approach of manually loading an L<IO::File> parent class for partial | |
454 | method support still works as expected: | |
455 | ||
456 | use IO::Handle; | |
457 | open my $fh, ">", $file; | |
458 | $fh->autoflush(1); # IO::File not loaded | |
459 | ||
1f539a1a | 460 | =head3 DTrace probes now include package name |
5076a392 FC |
461 | |
462 | The DTrace probes now include an additional argument (C<arg3>) which contains | |
463 | the package the subroutine being entered or left was compiled in. | |
464 | ||
465 | For example using the following DTrace script: | |
466 | ||
467 | perl$target:::sub-entry | |
468 | { | |
469 | printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3)); | |
470 | } | |
471 | ||
472 | and then running: | |
473 | ||
474 | perl -e'sub test { }; test' | |
475 | ||
476 | DTrace will print: | |
477 | ||
478 | main::test | |
479 | ||
5076a392 FC |
480 | =head1 Security |
481 | ||
482 | =head2 Restrict \p{IsUserDefined} to In\w+ and Is\w+ | |
483 | ||
484 | In L<perlunicode/"User-Defined Character Properties">, it says you can | |
485 | create custom properties by defining subroutines whose names begin with | |
486 | "In" or "Is". However, perl doesn't actually enforce that naming | |
487 | restriction, so \p{foo::bar} will call foo::Bar() if it exists. | |
488 | ||
489 | This commit finally enforces this convention. Note that this broke a | |
490 | number of existing tests for properties, since they didn't always use an | |
491 | Is/In prefix. | |
492 | ||
493 | =head2 User-defined regular expression properties | |
494 | ||
495 | Perl no longer allows a tainted regular expression to invoke a user-defined | |
496 | property via C<\p{...}> syntax. It simply dies instead [perl #82616]. | |
497 | ||
498 | =head1 Incompatible Changes | |
499 | ||
500 | =head2 "C<\cI<X>>" | |
501 | ||
502 | The backslash-c construct was designed as a way of specifying | |
503 | non-printable characters, but there were no restrictions (on ASCII | |
504 | platforms) on what the character following the C<c> could be. Now, that | |
505 | character must be one of the ASCII characters. | |
506 | ||
507 | =head2 localised tied hashes, arrays and scalars are no longed tied | |
508 | ||
509 | In the following: | |
510 | ||
511 | tie @a, ...; | |
512 | { | |
513 | local @a; | |
514 | # here, @a is a now a new, untied array | |
515 | } | |
516 | # here, @a refers again to the old, tied array | |
517 | ||
518 | The new local array used to be made tied too, which was fairly pointless, | |
519 | and has now been fixed. This fix could however potentially cause a change | |
520 | in behaviour of some code. | |
521 | ||
522 | =head2 C<given> return values | |
523 | ||
524 | Starting from this release, C<given> blocks returns the last evaluated | |
525 | expression, or an empty list if the block was exited by C<break>. Thus you | |
526 | can now write: | |
527 | ||
528 | my $type = do { | |
529 | given ($num) { | |
530 | break when undef; | |
531 | 'integer' when /^[+-]?[0-9]+$/; | |
532 | 'float' when /^[+-]?[0-9]+(?:\.[0-9]+)?$/; | |
533 | 'unknown'; | |
534 | } | |
535 | }; | |
536 | ||
537 | See L<perlsyn/Return value> for details. | |
538 | ||
539 | =head2 localised tied scalars are tied again. | |
540 | ||
541 | The change in behaviour in 5.13.1 of localising tied scalar values has | |
542 | been reverted to the existing 5.12.0 and earlier behaviour (the change for | |
543 | arrays and hashes remains). | |
544 | ||
545 | =head2 Naming fixes in Policy_sh.SH may invalidate Policy.sh | |
546 | ||
547 | Several long-standing typos and naming confusions in Policy_sh.SH have | |
548 | been fixed, standardizing on the variable names used in config.sh. | |
549 | ||
550 | This will change the behavior of Policy.sh if you happen to have been | |
551 | accidentally relying on the Policy.sh incorrect behavior. We'd appreciate | |
552 | feedback from anyone using Policy.sh to be sure nothing is broken by | |
553 | this change (c1bd23). | |
554 | ||
555 | =head2 Stashes are now always defined | |
556 | ||
557 | C<defined %Foo::> now always returns true, even when no symbols have yet been | |
558 | defined in that package. | |
559 | ||
560 | This is a side effect of removing a special case kludge in the tokeniser, | |
561 | added for 5.10.0, to hide side effects of changes to the internal storage of | |
562 | hashes that to drastically reduce their memory usage overhead. | |
563 | ||
564 | Calling defined on a stash has been deprecated since 5.6.0, warned on | |
565 | lexicals since 5.6.0, and has warned for stashes (and other package | |
566 | variables) since 5.12.0. C<defined %hash> has always exposed an | |
567 | implementation detail - emptying a hash by deleting all entries from it does | |
568 | not make C<defined %hash> false, hence C<defined %hash> is not valid code to | |
569 | determine whether an arbitrary hash is empty. Instead, use the behaviour | |
570 | that an empty C<%hash> always returns false in a scalar context. | |
571 | ||
572 | =head2 \400 - \777 | |
573 | ||
574 | Use of C<\400> - C<\777> in regexes in certain circumstances has given | |
575 | different, anomalous behavior than their use in all other | |
576 | double-quote-like contexts. Since 5.10.1, a deprecated warning message | |
577 | has been raised when this happens. Now, all double-quote-like contexts | |
578 | have the same behavior, namely to be equivalent to C<\x{100}> - | |
579 | C<\x{1FF}>, with no deprecation warning. Use of these values in the | |
580 | command line option C<"-0"> retains the current meaning to slurp input | |
581 | files whole; previously, this was documented only for C<"-0777">. It is | |
582 | recommended, however, because of various ambiguities, to use the new | |
583 | C<\o{...}> construct to represent characters in octal. | |
584 | (fa1639c..f6993e9). | |
585 | ||
586 | =head2 Declare API incompatibility between blead releases | |
587 | ||
588 | Only stable releases (5.10.x, 5.12.x, 5.14.x, ...) guarantee binary | |
589 | compatibility with each other, while blead releases (5.13.x, 5.15.x, ...) often | |
590 | break this compatibility. However, prior to perl 5.13.4, all blead releases had | |
591 | the same C<PERL_API_REVISION>, C<PERL_API_VERSION>, and C<PERL_API_SUBVERSION>, | |
592 | effectively declaring them as binary compatible, which they weren't. From now | |
593 | on, blead releases will have a C<PERL_API_SUBVERSION> equal to their | |
594 | C<PERL_SUBVERSION>, explicitly marking them as incompatible with each other. | |
595 | ||
596 | Maintenance releases of stable perl versions will continue to make no | |
597 | intentionally incompatible API changes. | |
598 | ||
599 | =head2 Check API compatibility when loading XS modules | |
600 | ||
601 | When perl's API changes in incompatible ways (which usually happens between | |
602 | every major release), XS modules compiled for previous versions of perl will not | |
603 | work anymore. They will need to be recompiled against the new perl. | |
604 | ||
605 | In order to ensure that modules are recompiled, and to prevent users from | |
606 | accidentally loading modules compiled for old perls into newer ones, the | |
607 | C<XS_APIVERSION_BOOTCHECK> macro has been added. That macro, which is called | |
608 | when loading every newly compiled extension, compares the API version of the | |
609 | running perl with the version a module has been compiled for and raises an | |
610 | exception if they don't match. | |
611 | ||
612 | =head2 Binary Incompatible with all previous Perls | |
613 | ||
614 | Some bit fields have been reordered; therefore, this release will not be binary | |
615 | compatible with any previous Perl release. | |
616 | ||
617 | =head2 Change in the parsing of certain prototypes | |
618 | ||
619 | Functions declared with the following prototypes now behave correctly as unary | |
620 | functions: | |
621 | ||
622 | =over 4 | |
623 | ||
624 | =item * | |
625 | ||
626 | C<*> | |
627 | ||
628 | =item * | |
629 | ||
630 | C<\sigil> | |
631 | ||
632 | =item * | |
633 | ||
634 | C<\[...]> | |
635 | ||
636 | =item * | |
637 | ||
638 | C<;$> | |
639 | ||
640 | =item * | |
641 | ||
642 | C<;*> | |
643 | ||
644 | =item * | |
645 | ||
646 | C<;\sigil> | |
647 | ||
648 | =item * | |
649 | ||
650 | C<;\[...]> | |
651 | ||
652 | =back | |
653 | ||
654 | Due to this bug fix, functions using the C<(*)>, C<(;$)> and C<(;*)> prototypes | |
655 | are parsed with higher precedence than before. So in the following example: | |
656 | ||
657 | sub foo($); | |
658 | foo $a < $b; | |
659 | ||
660 | the second line is now parsed correctly as C<< foo($a) < $b >>, rather than | |
661 | C<< foo($a < $b) >>. This happens when one of these operators is used in | |
662 | an unparenthesised argument: | |
663 | ||
664 | < > <= >= lt gt le ge | |
665 | == != <=> eq ne cmp ~~ | |
666 | & | |
667 | | ^ | |
668 | && | |
669 | || // | |
670 | .. ... | |
671 | ?: | |
672 | = += -= *= etc. | |
673 | ||
674 | =head2 Magic variables outside the main package | |
675 | ||
676 | In previous versions of Perl, magic variables like C<$!>, C<%SIG>, etc. would | |
677 | 'leak' into other packages. So C<%foo::SIG> could be used to access signals, | |
678 | C<${"foo::!"}> (with strict mode off) to access C's C<errno>, etc. | |
679 | ||
680 | This was a bug, or an 'unintentional' feature, which caused various ill effects, | |
681 | such as signal handlers being wiped when modules were loaded, etc. | |
682 | ||
683 | This has been fixed (or the feature has been removed, depending on how you see | |
684 | it). | |
685 | ||
686 | =head2 Smart-matching against array slices | |
687 | ||
688 | Previously, the following code resulted in a successful match: | |
689 | ||
690 | my @a = qw(a y0 z); | |
691 | my @b = qw(a x0 z); | |
692 | @a[0 .. $#b] ~~ @b; | |
693 | ||
694 | This odd behaviour has now been fixed [perl #77468]. | |
695 | ||
696 | =head2 C API changes | |
697 | ||
698 | The first argument of the C API function C<Perl_fetch_cop_label> has changed | |
699 | from C<struct refcounted he *> to C<COP *>, to better insulate the user from | |
700 | implementation details. | |
701 | ||
702 | This API function was marked as "may change", and likely isn't in use outside | |
703 | the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other | |
704 | references to it.) | |
705 | ||
706 | =head2 Stringification of regexes has changed | |
707 | ||
708 | Default regular expression modifiers are now notated by using | |
709 | C<(?^...)>. Code relying on the old stringification will fail. The | |
710 | purpose of this is so that when new modifiers are added, such code will | |
711 | not have to change (after this one time), as the stringification will | |
712 | automatically incorporate the new modifiers. | |
713 | ||
714 | Code that needs to work properly with both old- and new-style regexes | |
715 | can avoid the whole issue by using (for Perls since 5.9.5): | |
716 | ||
717 | use re qw(regexp_pattern); | |
718 | my ($pat, $mods) = regexp_pattern($re_ref); | |
719 | ||
720 | where C<$re_ref> is a reference to a compiled regular expression. Upon | |
721 | return, C<$mods> will be a string containing all the non-default | |
722 | modifiers used when the regular expression was compiled, and C<$pattern> | |
723 | the actual pattern. | |
724 | ||
725 | If the actual stringification is important, or older Perls need to be | |
726 | supported, you can use something like the following: | |
727 | ||
728 | # Accept both old and new-style stringification | |
729 | my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism'; | |
730 | ||
731 | And then use C<$modifiers> instead of C<-xism>. | |
732 | ||
733 | =head2 Regular expressions retain their localeness when interpolated | |
734 | ||
735 | Regular expressions compiled under C<"use locale"> now retain this when | |
736 | interpolated into a new regular expression compiled outside a | |
737 | C<"use locale">, and vice-versa. | |
738 | ||
739 | Previously, a regular expression interpolated into another one inherited | |
740 | the localeness of the surrounding one, losing whatever state it | |
741 | originally had. This is considered a bug fix, but may trip up code that | |
742 | has come to rely on the incorrect behavior. | |
743 | ||
744 | =head2 Directory handles not copied to threads | |
745 | ||
746 | On systems that do not have a C<fchdir> function, newly-created threads no | |
747 | longer inherit directory handles from their parent threads. Such programs | |
748 | would probably have crashed anyway [perl #75154]. | |
749 | ||
750 | =head2 Negation treats strings differently from before | |
751 | ||
752 | The unary negation operator C<-> now treats strings that look like numbers | |
753 | as numbers [perl #57706]. | |
754 | ||
755 | =head2 Negative zero | |
756 | ||
757 | Negative zero (-0.0), when converted to a string, now becomes "0" on all | |
758 | platforms. It used to become "-0" on some, but "0" on others. | |
759 | ||
760 | If you still need to determine whether a zero is negative, use | |
761 | C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN. | |
762 | ||
763 | =head2 Dereferencing typeglobs | |
764 | ||
765 | If you assign a typeglob to a scalar variable: | |
766 | ||
767 | $glob = *foo; | |
768 | ||
769 | the glob that is copied to C<$glob> is marked with a special flag | |
770 | indicating that the glob is just a copy. This allows subsequent assignments | |
771 | to C<$glob> to overwrite the glob. The original glob, however, is | |
772 | immutable. | |
773 | ||
774 | Many Perl operators did not distinguish between these two types of globs. | |
775 | This would result in strange behaviour in edge cases: C<untie $scalar> | |
776 | would do nothing if the last thing assigned to the scalar was a glob | |
777 | (because it treated it as C<untie *$scalar>, which unties a handle). | |
778 | Assignment to a glob slot (e.g., C<(*$glob) = \@some_array>) would simply | |
779 | assign C<\@some_array> to C<$glob>. | |
780 | ||
781 | To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms) | |
782 | has been modified to make a new immutable glob if its operand is a glob | |
783 | copy. Various operators that make a distinction between globs and scalars | |
784 | have been modified to treat only immutable globs as globs. | |
785 | ||
786 | This causes an incompatible change in code that assigns a glob to the | |
787 | return value of C<*{}> when that operator was passed a glob copy. Take the | |
788 | following code, for instance: | |
789 | ||
790 | $glob = *foo; | |
791 | *$glob = *bar; | |
792 | ||
793 | The C<*$glob> on the second line returns a new immutable glob. That new | |
794 | glob is made an alias to C<*bar>. Then it is discarded. So the second | |
795 | assignment has no effect. | |
796 | ||
797 | It also means that C<tie $handle> will now tie C<$handle> as a scalar, even | |
798 | if it has had a glob assigned to it. | |
799 | ||
800 | The upside to this incompatible change is that bugs [perl #77496], | |
801 | [perl #77502], [perl #77508], [perl #77688], and [perl #77812], | |
802 | and maybe others, too, have been fixed. | |
803 | ||
804 | See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for even | |
805 | more detail. | |
806 | ||
807 | =head2 Clearing stashes | |
808 | ||
809 | Stash list assignment C<%foo:: = ()> used to make the stash anonymous | |
810 | temporarily while it was being emptied. Consequently, any of its | |
811 | subroutines referenced elsewhere would become anonymous (showing up as | |
812 | "(unknown)" in C<caller>). Now they retain their package names, such that | |
813 | C<caller> will return the original sub name if there is still a reference | |
814 | to its typeglob, or "foo::__ANON__" otherwise [perl #79208]. | |
815 | ||
816 | =head2 C<:=> is now a syntax error | |
817 | ||
818 | Previously C<my $pi := 4;> was exactly equivalent to C<my $pi : = 4;>, | |
819 | with the C<:> being treated as the start of an attribute list, ending before | |
820 | the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now | |
821 | a syntax error. This will allow the future use of C<:=> as a new token. | |
822 | ||
823 | We find no Perl 5 code on CPAN using this construction, outside the core's | |
824 | tests for it, so we believe that this change will have very little impact on | |
825 | real-world codebases. | |
826 | ||
827 | If it is absolutely necessary to have empty attribute lists (for example, | |
828 | because of a code generator) then avoid the error by adding a space before | |
829 | the C<=>. | |
830 | ||
831 | =head2 Run-time code block in regular expressions | |
832 | ||
833 | Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) used not | |
834 | to inherit any pragmata (strict, warnings, etc.) if the regular expression | |
835 | was compiled at run time as happens in cases like these two: | |
836 | ||
837 | use re 'eval'; | |
838 | $foo =~ $bar; # when $bar contains (?{...}) | |
839 | $foo =~ /$bar(?{ $finished = 1 })/; | |
840 | ||
841 | This was a bug, which has now been fixed. But it has the potential to break | |
842 | any code that was relying on this bug. | |
843 | ||
844 | =head2 All objects are destroyed | |
845 | ||
846 | It used to be possible to prevent a destructor from being called during | |
847 | global destruction by artificially increasing the reference count of an | |
848 | object. | |
849 | ||
850 | Now such objects I<will> will be destroyed, as a result of a bug fix | |
851 | [perl #81230]. | |
852 | ||
853 | This has the potential to break some XS modules. (In fact, it break some. | |
854 | See L</Known Problems>, below.) | |
855 | ||
856 | =head2 Most C<\p{}> properties are now immune from case-insensitive matching | |
857 | ||
858 | For most Unicode properties, it doesn't make sense to have them match | |
859 | differently under C</i> case-insensitive matching than not. And doing | |
860 | so leads to unexpected results and potential security holes. For | |
861 | example | |
862 | ||
863 | m/\p{ASCII_Hex_Digit}+/i | |
864 | ||
865 | could previously match non-ASCII characters because of the Unicode | |
866 | matching rules. There were a number of bugs in this feature until an | |
867 | earlier release in the 5.13 series. Now this release reverts, and | |
868 | removes the feature completely except for the few properties where | |
869 | people have come to expect it, namely the ones where casing is an | |
870 | integral part of their functionality, such as C<m/\p{Uppercase}/i> and | |
871 | C<m/\p{Lowercase}/i>, both of which match the exact same code points, | |
872 | namely those matched by C<m/\p{Cased}/i>. Details are in | |
873 | L<perlrecharclass/Unicode Properties>. | |
874 | ||
875 | User-defined property handlers that need to match differently under | |
876 | C</i> must change to read the new boolean parameter passed it which is | |
877 | non-zero if case-insensitive matching is in effect; 0 if not. See | |
878 | L<perluniprops/User-Defined Character Properties>. | |
879 | ||
880 | =head2 regex: \p{} in pattern implies Unicode semantics | |
881 | ||
882 | Now, a Unicode property match specified in the pattern will indicate | |
883 | that the pattern is meant for matching according to Unicode rules | |
884 | (e40e74f) | |
885 | ||
886 | =head2 add GvCV_set() and GvGP_set() macros and change GvGP() | |
887 | ||
888 | This allows a future commit to eliminate some backref magic between GV | |
889 | and CVs, which will require complete control over assignment to the | |
890 | gp_cv slot. | |
891 | ||
892 | If you've been using GvGP() in lvalue context this change will break | |
893 | your code, you should use GvGP_set() instead. (c43ae56) | |
894 | ||
895 | =head2 _swash_inversion_hash is no longer exported as part of the API | |
896 | ||
897 | This function shouldn't be called from XS code. (4c2e113) | |
898 | ||
899 | =head2 Unreferenced objects in global destruction | |
900 | ||
901 | The fix for [perl #36347], which made sure that destructors were called on | |
902 | unreferenced objects, broke the tests for three CPAN modules, which | |
903 | apparently rely on the bug. | |
904 | ||
905 | To provide more time for fixing them (as this is such a minor bug), we | |
906 | have reverted the fix until after perl 5.14.0. | |
907 | ||
908 | This resolves [perl #82542] and other related tickets. | |
909 | ||
910 | =head2 C<close> on shared pipes | |
911 | ||
912 | The C<close> function no longer waits for the child process to exit if the | |
913 | underlying file descriptor is still in use by another thread, to avoid | |
914 | deadlocks. It returns true in such cases. | |
915 | ||
916 | =head2 Passing references to warn() | |
917 | ||
918 | An earlier Perl 5.13.x release changed C<warn($ref)> to leave the reference | |
919 | unchanged, allowing C<$SIG{__WARN__}> handlers to access the original | |
920 | reference. But this stopped warnings that were references from having the | |
921 | file and line number appended even when there was no C<$SIG{__WARN__}> | |
922 | handler in place. | |
923 | ||
924 | Now C<warn> checks for the presence of such a handler and, if there is | |
925 | none, proceeds to stringify the reference and append the file and line | |
926 | number. This allows simple uses of C<warn> for debugging to continue to | |
927 | work as they did before. | |
928 | ||
929 | =head1 Deprecations | |
930 | ||
931 | The following items are now deprecated. | |
932 | ||
933 | =over 4 | |
934 | ||
935 | =item C<Perl_ptr_table_clear> | |
936 | ||
937 | C<Perl_ptr_table_clear> is no longer part of Perl's public API. Calling it now | |
938 | generates a deprecation warning, and it will be removed in a future | |
939 | release. | |
940 | ||
941 | =item * | |
942 | ||
943 | Omitting a space between a regex pattern or pattern modifiers and the following | |
944 | word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed | |
945 | as C<< m/foo/s and $bar >> but will issue a warning. | |
946 | ||
947 | =back | |
948 | ||
949 | =head2 Omitting a space between a regular expression and subsequent word | |
950 | ||
951 | Omitting a space between a regex pattern or pattern modifiers and the | |
952 | following word is deprecated. Deprecation for regular expression | |
953 | I<matches> was added in Perl 5.13.2. In this release, the deprecation | |
954 | is extended to regular expression I<substitutions>. For example, | |
955 | C<< s/foo/bar/sand $bar >> will still be parsed as | |
956 | C<< s/foo/bar/s and $bar >> but will issue a warning. (aa78b66) | |
957 | ||
958 | =head2 Deprecation warning added for deprecated-in-core .pl libs | |
959 | ||
960 | This is a mandatory warning, not obeying -X or lexical warning bits. | |
961 | The warning is modelled on that supplied by deprecate.pm for | |
962 | deprecated-in-core .pm libraries. It points to the specific CPAN | |
963 | distribution that contains the .pl libraries. The CPAN version, of | |
964 | course, does not generate the warning. (0111154) | |
965 | ||
966 | =head2 List assignment to C<$[> | |
967 | ||
968 | After assignment to C<$[> has been deprecated and started to give warnings in | |
969 | perl version 5.12.0, this version of perl also starts to emit a warning when | |
970 | assigning to C<$[> in list context. This fixes an oversight in 5.12.0. | |
971 | ||
972 | =head2 Use of qw(...) as parentheses | |
973 | ||
974 | Historically the parser fooled itself into thinking that C<qw(...)> literals | |
975 | were always enclosed in parentheses, and as a result you could sometimes omit | |
976 | parentheses around them: | |
977 | ||
978 | for $x qw(a b c) { ... } | |
979 | ||
980 | The parser no longer lies to itself in this way. Wrap the list literal in | |
981 | parentheses, like: | |
982 | ||
983 | for $x (qw(a b c)) { ... } | |
984 | ||
985 | =head2 C<\N{BELL}> is deprecated | |
986 | ||
987 | This is because Unicode is using that name for a different character. | |
988 | See L</Unicode Version 6.0 is now supported (mostly)> for more | |
989 | explanation. | |
990 | ||
991 | =head2 C<?PATTERN?> is deprecated | |
992 | ||
993 | C<?PATTERN?> (without the initial m) has been deprecated and now produces | |
994 | a warning. This is to allow future use of C<?> in new operators. | |
995 | The match-once functionality is still available in the form of C<m?PATTERN?>. | |
996 | ||
997 | =head2 C<sv_compile_2op()> is now deprecated | |
998 | ||
999 | The C<sv_compile_2op()> API function is now deprecated. Searches suggest | |
1000 | that nothing on CPAN is using it, so this should have zero impact. | |
1001 | ||
1002 | It attempted to provide an API to compile code down to an optree, but failed | |
1003 | to bind correctly to lexicals in the enclosing scope. It's not possible to | |
1004 | fix this problem within the constraints of its parameters and return value. | |
1005 | ||
1006 | =head2 Tie functions on scalars holding typeglobs | |
1007 | ||
1008 | Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument | |
1009 | acts on a file handle if the scalar happens to hold a typeglob. | |
1010 | ||
1011 | This is a long-standing bug that will be removed in Perl 5.16, as | |
1012 | there is currently no way to tie the scalar itself when it holds | |
1013 | a typeglob, and no way to untie a scalar that has had a typeglob | |
1014 | assigned to it. | |
1015 | ||
1016 | This bug was fixed in 5.13.7 but, because of the breakage it caused, the | |
1017 | fix has been reverted. Now there is a deprecation warning whenever a tie | |
1018 | function is used on a handle without an explicit C<*>. | |
1019 | ||
1020 | =over | |
1021 | ||
1022 | =item Deprecated Modules | |
1023 | ||
1024 | The following modules will be removed from the core distribution in a | |
1025 | future release, and should be installed from CPAN instead. Distributions | |
1026 | on CPAN which require these should add them to their prerequisites. The | |
1027 | core versions of these modules warnings will issue a deprecation warning. | |
1028 | ||
1029 | If you ship a packaged version of Perl, either alone or as part of a | |
1030 | larger system, then you should carefully consider the repercussions of | |
1031 | core module deprecations. You may want to consider shipping your default | |
1032 | build of Perl with packages for some or all deprecated modules which | |
1033 | install into C<vendor> or C<site> perl library directories. This will | |
1034 | inhibit the deprecation warnings. | |
1035 | ||
1036 | Alternatively, you may want to consider patching F<lib/deprecate.pm> | |
1037 | to provide deprecation warnings specific to your packaging system | |
1038 | or distribution of Perl, consistent with how your packaging system | |
1039 | or distribution manages a staged transition from a release where the | |
1040 | installation of a single package provides the given functionality, to | |
1041 | a later release where the system administrator needs to know to install | |
1042 | multiple packages to get that same functionality. | |
1043 | ||
1044 | You can silence these deprecation warnings by installing the modules | |
1045 | in question from CPAN. To install the latest version of all of them, | |
1046 | just install C<Task::Deprecations::5_14>. | |
1047 | ||
1048 | =over | |
1049 | ||
1050 | =item L<Devel::DProf> | |
1051 | ||
1052 | We strongly recommend that you install and used L<Devel::NYTProf> in | |
1053 | preference, as it offers significantly improved profiling and reporting. | |
1054 | ||
1055 | =back | |
1056 | ||
1057 | =back | |
1058 | ||
1059 | =head2 User-defined case-mapping | |
1060 | ||
1061 | This feature is being deprecated due to its many issues, as documented in | |
1062 | L<perlunicode/User-Defined Case Mappings (for serious hackers only)>. | |
1063 | It is planned to remove this feature in Perl 5.16. A CPAN module | |
1064 | providing improved functionality is being prepared for release by the | |
1065 | time 5.14 is. | |
1066 | ||
1067 | =head1 Performance Enhancements | |
1068 | ||
df91d470 FC |
1069 | =head2 "safe signals" optimization |
1070 | ||
1071 | Signal dispatch has been moved from the runloop into control ops. This | |
1072 | should give a few percent speed increase, and eliminates almost all of | |
1073 | the speed penalty caused by the introduction of "safe signals" in | |
1074 | 5.8.0. Signals should still be dispatched within the same statement as | |
1075 | they were previously - if this is not the case, or it is possible to | |
1076 | create uninterruptible loops, this is a bug, and reports are encouraged | |
1077 | of how to recreate such issues. | |
1078 | ||
1079 | =head2 Optimization of shift; and pop; calls without arguments | |
1080 | ||
1081 | Additional two OPs are not added anymore into op tree for shift and pop | |
1082 | calls without argument (when it works on C<@_>). Makes C<shift;> 5% | |
1083 | faster over C<shift @_;> on not threaded perl and 25% faster on threaded. | |
1084 | ||
1085 | =head2 Adjacent pairs of nextstate opcodes are now optimized away | |
1086 | ||
1087 | Previously, in code such as | |
1088 | ||
1089 | use constant DEBUG => 0; | |
1090 | ||
1091 | sub GAK { | |
1092 | warn if DEBUG; | |
1093 | print "stuff\n"; | |
1094 | } | |
1095 | ||
1096 | the ops for C<warn if DEBUG;> would be folded to a C<null> op (C<ex-const>), but | |
1097 | the C<nextstate> op would remain, resulting in a runtime op dispatch of | |
1098 | C<nextstate>, C<nextstate>, ... | |
1099 | ||
1100 | The execution of a sequence of C<nextstate> ops is indistinguishable from just | |
1101 | the last C<nextstate> op so the peephole optimizer now eliminates the first of | |
1102 | a pair of C<nextstate> ops, except where the first carries a label, since labels | |
1103 | must not be eliminated by the optimizer and label usage isn't conclusively known | |
1104 | at compile time. | |
1105 | ||
1106 | =head2 blah blah blah | |
1107 | ||
5076a392 FC |
1108 | Only allocate entries for @_ on demand - this not only saves memory per |
1109 | subroutine defined but should hopefully improve COW behaviour (77bac2). | |
1110 | ||
1111 | =head2 Multiple small improvements to threads | |
1112 | ||
1113 | The internal structures of threading now make fewer API calls and fewer | |
1114 | allocations, resulting in noticeably smaller object code. Additionally, | |
1115 | many thread context checks have been deferred so that they're only done | |
1116 | when required (although this is only possible for non-debugging builds). | |
1117 | ||
1118 | =head2 Size optimisations to SV and HV structures | |
1119 | ||
1120 | xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and | |
1121 | on some systems will cause struct xpvhv to become cache aligned. To avoid | |
1122 | this memory saving causing a slowdown elsewhere, boolean use of HvFILL | |
1123 | now calls HvTOTALKEYS instead (which is equivalent) - so while the fill | |
1124 | data when actually required is now calculated on demand, the cases when | |
1125 | this needs to be done should be few and far between (f4431c .. fcd245). | |
1126 | ||
1127 | The order of structure elements in SV bodies has changed. Effectively, | |
1128 | the NV slot has swapped location with STASH and MAGIC. As all access to | |
1129 | SV members is via macros, this should be completely transparent. This | |
1130 | change allows the space saving for PVHVs documented above, and may reduce | |
1131 | the memory allocation needed for PVIVs on some architectures. | |
1132 | ||
1133 | =head2 Optimisation of regexp engine string comparison work | |
1134 | ||
1135 | The foldEQ_utf8 API function for case-insensitive comparison of strings (which | |
1136 | is used heavily by the regexp engine) was substantially refactored and | |
1137 | optimised - and its documentation much improved as a free bonus gift | |
1138 | (8b3587, e6226b). | |
1139 | ||
1140 | =head2 Memory consumption improvements to Exporter | |
1141 | ||
1142 | The @EXPORT_FAIL AV is no longer created unless required, hence neither is | |
1143 | the typeglob backing it - this saves about 200 bytes per Exporter using | |
1144 | package that doesn't use this functionality. | |
1145 | ||
1146 | =head2 blah blah blah | |
1147 | ||
1148 | There are several small optimizations to reduce CPU cache misses in various very | |
1149 | commonly used modules like C<warnings> and C<Carp> as well in accessing | |
1150 | file-handles for reading. (5.13.3) | |
1151 | ||
1152 | XXX These need to be changed to =head2 entries, or the entries above need | |
1153 | to change: | |
1154 | ||
1155 | =over 4 | |
1156 | ||
1157 | =item * | |
1158 | ||
1159 | Make string appending 100 times faster | |
1160 | ||
1161 | When doing a lot of string appending, perl could end up allocating a lot more | |
1162 | memory than needed in a very inefficient way, if perl was configured to use the | |
1163 | system's C<malloc> implementation instead of its own. | |
1164 | ||
1165 | C<sv_grow>, which is what's being used to allocate more memory if necessary when | |
1166 | appending to a string, has now been taught how to round up the memory it | |
1167 | requests to a certain geometric progression, making it much faster on certain | |
1168 | platforms and configurations. On Win32, it's now about 100 times faster. | |
1169 | ||
1170 | =item * | |
1171 | ||
1172 | For weak references, the common case of just a single weak reference per | |
1173 | referent has been optimised to reduce the storage required. In this case it | |
1174 | saves the equivalent of one small perl array per referent. | |
1175 | ||
1176 | =item * | |
1177 | ||
1178 | C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body | |
1179 | they actually use, saving some space. | |
1180 | ||
1181 | =item * | |
1182 | ||
1183 | Scalars containing regular expressions now only allocate the part of the C<SV> | |
1184 | body they actually use, saving some space. | |
1185 | ||
1186 | =item * | |
1187 | ||
1188 | Compiling regular expressions has been made faster for the case where upgrading | |
1189 | the regex to utf8 is necessary but that isn't known when the compilation begins. | |
1190 | ||
1191 | =item * | |
1192 | ||
1193 | The bulk of the C<Tie::Hash::NamedCapture> module used to be in the perl | |
1194 | core. It has now been moved to an XS module, to reduce the overhead for | |
1195 | programs that do not use C<%+> or C<%->. | |
1196 | ||
1197 | =item * | |
1198 | ||
1199 | Eliminate C<PL_*> accessor functions under ithreads. | |
1200 | ||
1201 | When C<MULTIPLICITY> was first developed, and interpreter state moved into an | |
1202 | interpreter struct, thread and interpreter local C<PL_*> variables were defined | |
1203 | as macros that called accessor functions, returning the address of the value, | |
1204 | outside of the perl core. The intent was to allow members within the interpreter | |
1205 | struct to change size without breaking binary compatibility, so that bug fixes | |
1206 | could be merged to a maintenance branch that necessitated such a size change. | |
1207 | ||
1208 | However, some non-core code defines C<PERL_CORE>, sometimes intentionally to | |
1209 | bypass this mechanism for speed reasons, sometimes for other reasons but with | |
1210 | the inadvertent side effect of bypassing this mechanism. As some of this code is | |
1211 | widespread in production use, the result is that the core B<can't> change the | |
1212 | size of members of the interpreter struct, as it will break such modules | |
1213 | compiled against a previous release on that maintenance branch. The upshot is | |
1214 | that this mechanism is redundant, and well-behaved code is penalised by | |
1215 | it. Hence it can and should be removed. | |
1216 | ||
1217 | =item * | |
1218 | ||
1219 | When an object has many weak references to it, freeing that object | |
1220 | can under some some circumstances take O(N^2) time to free (where N is the | |
1221 | number of references). The number of circumstances has been reduced | |
1222 | [perl #75254] | |
1223 | ||
1224 | =item * | |
1225 | ||
1226 | An earlier optimisation to speed up C<my @array = ...> and | |
1227 | C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0. | |
1228 | ||
1229 | Now we have found another way to speed up these assignments [perl #82110]. | |
1230 | ||
1231 | =back | |
1232 | ||
1233 | =head1 Modules and Pragmata | |
1234 | ||
1235 | =head2 New Modules and Pragmata | |
1236 | ||
1237 | =over 4 | |
1238 | ||
1239 | =item * | |
1240 | ||
1241 | C<CPAN::Meta::YAML> 0.003 has been added as a dual-life module. It supports a | |
1242 | subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files | |
1243 | included with CPAN distributions or generated by the module installation | |
1244 | toolchain. It should not be used for any other general YAML parsing or | |
1245 | generation task. | |
1246 | ||
1247 | =item * | |
1248 | ||
1249 | C<CPAN::Meta> version 2.110440 has been added as a dual-life module. It | |
1250 | provides a standard library to read, interpret and write CPAN distribution | |
1251 | metadata files (e.g. META.json and META.yml) which describes a | |
1252 | distribution, its contents, and the requirements for building it and | |
1253 | installing it. The latest CPAN distribution metadata specification is | |
1254 | included as C<CPAN::Meta::Spec> and notes on changes in the specification | |
1255 | over time are given in C<CPAN::Meta::History>. | |
1256 | ||
1257 | =item * | |
1258 | ||
1259 | C<HTTP::Tiny> 0.010 has been added as a dual-life module. It is a very | |
1260 | small, simple HTTP/1.1 client designed for simple GET requests and file | |
1261 | mirroring. It has has been added to enable CPAN.pm and CPANPLUS to | |
1262 | "bootstrap" HTTP access to CPAN using pure Perl without relying on external | |
1263 | binaries like F<curl> or F<wget>. | |
1264 | ||
1265 | =item * | |
1266 | ||
1267 | C<JSON::PP> 2.27105 has been added as a dual-life module, for the sake of | |
1268 | reading F<META.json> files in CPAN distributions. | |
1269 | ||
1270 | =item * | |
1271 | ||
1272 | C<Module::Metadata> 1.000003 has been added as a dual-life module. It gathers | |
1273 | package and POD information from Perl module files. It is a standalone module | |
1274 | based on Module::Build::ModuleInfo for use by other module installation | |
1275 | toolchain components. Module::Build::ModuleInfo has been deprecated in | |
1276 | favor of this module instead. | |
1277 | ||
1278 | =item * | |
1279 | ||
1280 | C<Perl::OSType> 1.002 has been added as a dual-life module. It maps Perl | |
1281 | operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic types | |
1282 | with standardized names (e.g. "Unix" or "Windows"). It has been refactored | |
1283 | out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into | |
1284 | a single location for easier maintenance. | |
1285 | ||
1286 | =item * | |
1287 | ||
1288 | The following modules were added by the C<Unicode::Collate> | |
1289 | upgrade. See below for details. | |
1290 | ||
1291 | C<Unicode::Collate::CJK::Big5> | |
1292 | ||
1293 | C<Unicode::Collate::CJK::GB2312> | |
1294 | ||
1295 | C<Unicode::Collate::CJK::JISX0208> | |
1296 | ||
1297 | C<Unicode::Collate::CJK::Korean> | |
1298 | ||
1299 | C<Unicode::Collate::CJK::Pinyin> | |
1300 | ||
1301 | C<Unicode::Collate::CJK::Stroke> | |
1302 | ||
1303 | =item * | |
1304 | ||
1305 | C<Version::Requirements> version 0.101020 has been added as a dual-life | |
1306 | module. It provides a standard library to model and manipulates module | |
1307 | prerequisites and version constraints as defined in the L<CPAN::Meta::Spec>. | |
1308 | ||
1309 | =back | |
1310 | ||
1311 | =head2 Updated Modules and Pragmata | |
1312 | ||
1313 | =over 4 | |
1314 | ||
1315 | =item * | |
1316 | ||
1317 | XXX Where does this go in the list? | |
1318 | ||
1319 | Perl 4 C<.pl> libraries | |
1320 | ||
1321 | These historical libraries have been minimally modified to avoid using | |
1322 | C<$[>. This is to prepare them for the deprecation of C<$[>. | |
1323 | ||
1324 | =item * | |
1325 | ||
1326 | C<Archive::Extract> has been upgraded from version 0.38 to 0.48. | |
1327 | ||
1328 | Updates since 0.38 include: a safe print method that guards | |
1329 | Archive::Extract from changes to $\; a fix to the tests when run in core | |
1330 | perl; support for TZ files; and a modification for the lzma logic to favour | |
1331 | IO::Uncompress::Unlzma | |
1332 | ||
1333 | Resolves an issue with NetBSD-current and its new unzip | |
1334 | executable. | |
1335 | ||
1336 | =item * | |
1337 | ||
1338 | C<Archive::Tar> has been upgraded from version 1.54 to 1.76. | |
1339 | ||
1340 | Important changes since 1.54 include: compatibility with busybox | |
1341 | implementations of tar; a fix so that C<write()> and C<create_archive()> | |
1342 | close only handles they opened; and a bug was fixed regarding the exit code | |
1343 | of extract_archive. (afabe0e) | |
1344 | ||
1345 | Among other things, the new version adds a new option to C<ptar> to allow safe | |
1346 | creation of tarballs without world-writable files on Windows, allowing those | |
1347 | archives to be uploaded to CPAN. | |
1348 | ||
1349 | This adds the ptargrep utility for using regular expressions against | |
1350 | the contents of files in a tar archive. | |
1351 | ||
1352 | Skip extracting pax extended headers. | |
1353 | ||
1354 | =item * | |
1355 | ||
1356 | C<autodie> has been upgraded from version 2.06_01 to 2.1001. | |
1357 | ||
1358 | =item * | |
1359 | ||
1360 | C<B> has been upgraded from version 1.23 to 1.27. | |
1361 | ||
1362 | It no longer crashes when taking apart a C<y///> containing characters | |
1363 | outside the octet range or compiled in a C<use utf8> scope. | |
1364 | ||
1365 | The size of the shared object has been reduced by about 40%, with no | |
1366 | reduction in functionality. | |
1367 | ||
1368 | =item * | |
1369 | ||
1370 | C<B::Concise> has been upgraded from version 0.78 to 0.82. | |
1371 | ||
1372 | B::Concise marks rv2sv, rv2av and rv2hv ops with the new OPpDEREF flag | |
1373 | as "DREFed". | |
1374 | ||
1375 | It no longer produces mangled output with the C<-tree> option | |
1376 | [perl #80632]. | |
1377 | ||
1378 | =item * | |
1379 | ||
1380 | C<B::Debug> has been upgraded from version 1.12 to 1.16. | |
1381 | ||
1382 | =item * | |
1383 | ||
1384 | C<B::Deparse> has been upgraded from version 0.96 to 1.02. | |
1385 | ||
1386 | A bug has been fixed when deparsing a nextstate op that has both a | |
1387 | change of package (relative to the previous nextstate), or a change of | |
1388 | C<%^H> or other state, and a label. Previously the label was emitted | |
1389 | first, leading to syntactically invalid output because a label is not | |
1390 | permitted immediately before a package declaration, B<BEGIN> block, | |
1391 | or some other things. Now the label is emitted last. | |
1392 | ||
1393 | The 'no 5.13.2' or similar form is now correctly handled by B::Deparse. | |
1394 | ||
1395 | B::Deparse now properly handles the code that applies a conditional | |
1396 | pattern match against implicit C<$_> as it was fixed in [perl #20444]. | |
1397 | ||
1398 | It fixes deparsing of C<our> followed by a variable with funny characters | |
1399 | (as permitted under the C<utf8> pragma) [perl #33752]. | |
1400 | ||
1401 | =item * | |
1402 | ||
1403 | C<B::Lint> has been upgraded from version 1.11_01 to 1.12. | |
1404 | ||
1405 | =item * | |
1406 | ||
1407 | C<base> has been upgraded from version 2.15 to 2.16. | |
1408 | ||
1409 | =item * | |
1410 | ||
1411 | C<bignum> has been upgraded from version 0.23 to 0.25. | |
1412 | ||
1413 | =item * | |
1414 | ||
1415 | C<blib> has been upgraded from version 1.04 to 1.06. | |
1416 | ||
1417 | =item * | |
1418 | ||
1419 | C<Carp> has been upgraded from version 1.18 to 1.19. | |
1420 | ||
1421 | L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR"> overrides and | |
1422 | avoids using bogus C<@DB::args>. To provide backtraces, Carp relies on | |
1423 | particular behaviour of the caller built-in. Carp now detects if other code has | |
1424 | overridden this with an incomplete implementation, and modifies its backtrace | |
1425 | accordingly. Previously incomplete overrides would cause incorrect values in | |
1426 | backtraces (best case), or obscure fatal errors (worst case) | |
1427 | ||
1428 | This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules | |
1429 | overriding C<caller()> incorrectly. | |
1430 | ||
1431 | It now avoids using regular expressions that cause perl to | |
1432 | load its Unicode tables, in order to avoid the 'BEGIN not safe after | |
1433 | errors' error that will ensue if there has been a syntax error | |
1434 | [perl #82854]. | |
1435 | ||
1436 | =item * | |
1437 | ||
1438 | C<CGI> has been upgraded from version 3.48 to 3.51. | |
1439 | ||
1440 | This provides the following security fixes: the MIME boundary in | |
1441 | multipart_init is now random and improvements to the handling of | |
1442 | newlines embedded in header values. | |
1443 | ||
1444 | The documentation for param_fetch() has been corrected and clarified. | |
1445 | ||
1446 | =item * | |
1447 | ||
1448 | C<charnames> has been upgraded from version 1.07 to 1.10. | |
1449 | ||
1450 | C<viacode()> is now significantly faster. | |
1451 | ||
1452 | =item * | |
1453 | ||
1454 | C<Compress::Raw::Bzip2> has been upgraded from version 2.024 to 2.033. | |
1455 | ||
1456 | Updated to use bzip2 1.0.6 | |
1457 | ||
1458 | =item * | |
1459 | ||
1460 | C<Compress::Raw::Zlib> has been upgraded from version 2.024 to 2.033. | |
1461 | ||
1462 | =item * | |
1463 | ||
1464 | C<Compress::Zlib> has been upgraded from version 2.024 to 2.027. | |
1465 | ||
1466 | =item * | |
1467 | ||
1468 | C<CPAN> has been upgraded from version 1.94_56 to 1.94_63. | |
1469 | ||
1470 | =over 4 | |
1471 | ||
1472 | =item * release 1.94_57 | |
1473 | ||
1474 | =item * bugfix: treat modules correctly that are deprecated in perl 5.12. | |
1475 | ||
1476 | =item * bugfix: RT #57482 and #57788 revealed that configure_requires | |
1477 | implicitly assumed build_requires instead of normal requires. (Reported | |
1478 | by Andrew Whatson and Father Chrysostomos respectively) | |
1479 | ||
1480 | =item * testfix: solaris should run the tests without expect because (some?) | |
1481 | solaris have a broken expect | |
1482 | ||
1483 | =item * testfix: run tests with cache_metadata off to prevent spill over | |
1484 | effects from previous test runs | |
1485 | ||
1486 | =back | |
1487 | ||
1488 | Includes support for META.json and MYMETA.json. | |
1489 | ||
1490 | =item * | |
1491 | ||
1492 | C<CPANPLUS> has been upgraded from version 0.90 to 0.9102. | |
1493 | ||
1494 | Fixed the shell test to skip if test is not being run under a terminal; | |
1495 | resolved the issue where a prereq on Config would not be recognised as a | |
1496 | core module. | |
1497 | ||
1498 | Includes support for META.json and MYMETA.json and a change to | |
1499 | using Digest::SHA for CPAN checksums. | |
1500 | ||
1501 | =item * | |
1502 | ||
1503 | C<CPANPLUS::Dist::Build> has been upgraded from version 0.46 to 0.54. | |
1504 | ||
1505 | =item * | |
1506 | ||
1507 | C<Cwd> has been upgraded from version 3.31 to 3.36. | |
1508 | ||
1509 | =item * | |
1510 | ||
1511 | C<Data::Dumper> has been upgraded from version 2.125 to 2.130_02. | |
1512 | ||
4ed2cea4 FC |
1513 | The indentation used to be off when C<$Data::Dumper::Terse> was set. This |
1514 | has been fixed [perl #73604]. | |
1515 | ||
5076a392 FC |
1516 | This fixes a crash when using custom sort functions that might cause the stack |
1517 | to change. | |
1518 | ||
1519 | C<Dumpxs> no longer crashes with globs returned by C<*$io_ref> | |
1520 | [perl #72332]. | |
1521 | ||
1522 | =item * | |
1523 | ||
1524 | C<DB_File> has been upgraded from version 1.820 to 1.821. | |
1525 | ||
1526 | =item * | |
1527 | ||
1528 | C<deprecate> has been upgraded from version 0.01 to 0.02. | |
1529 | ||
1530 | =item * | |
1531 | ||
1532 | C<Devel::DProf> has been upgraded from version 20080331.00 to 20110228.00. | |
1533 | ||
1534 | Merely loading C<Devel::DProf> now no longer triggers profiling to start. | |
1535 | C<use Devel::DProf> and C<perl -d:DProf ...> still behave as before and start | |
1536 | the profiler. | |
1537 | ||
1538 | NOTE: C<Devel::DProf> is deprecated and will be removed from a future | |
1539 | version of Perl. We strongly recommend that you install and use | |
1540 | L<Devel::NYTProf> instead, as it offers significantly improved | |
1541 | profiling and reporting. | |
1542 | ||
1543 | =item * | |
1544 | ||
1545 | C<Devel::Peek> has been upgraded from version 1.04 to 1.06. | |
1546 | ||
1547 | =item * | |
1548 | ||
1549 | C<Devel::SelfStubber> has been upgraded from version 1.03 to 1.05. | |
1550 | ||
1551 | =item * | |
1552 | ||
1553 | C<diagnostics> has been upgraded from version 1.19 to 1.22. | |
1554 | ||
1555 | It now renders pod links slightly better, and has been taught to find | |
1556 | descriptions for messages that share their descriptions with other | |
1557 | messages. | |
1558 | ||
1559 | =item * | |
1560 | ||
1561 | C<Digest::MD5> has been upgraded from version 2.39 to 2.51. | |
1562 | ||
1563 | It is now safe to use this module in combination with threads. | |
1564 | ||
1565 | =item * | |
1566 | ||
1567 | C<Digest::SHA> has been upgraded from version 5.47 to 5.61. | |
1568 | ||
1569 | C<shasum> now more closely mimics C<sha1sum>/C<md5sum>. | |
1570 | ||
1571 | C<Addfile> accepts all POSIX filenames. | |
1572 | ||
1573 | New SHA-512/224 and SHA-512/256 transforms ref. NIST Draft FIPS 180-4 (February 2011) | |
1574 | ||
1575 | =item * | |
1576 | ||
1577 | C<Dumpvalue> has been upgraded from version 1.13 to 1.15. | |
1578 | ||
1579 | =item * | |
1580 | ||
1581 | C<DynaLoader> has been upgraded from version 1.10 to 1.12. | |
1582 | ||
1583 | It fixes a buffer overflow when passed a very long file name. | |
1584 | ||
1585 | It no longer inherits from AutoLoader; hence it no longer | |
1586 | produces weird error messages for unsuccessful method calls on classes that | |
1587 | inherit from DynaLoader [perl #84358]. | |
1588 | ||
1589 | =item * | |
1590 | ||
1591 | C<Encode> has been upgraded from version 2.39 to 2.42. | |
1592 | ||
1593 | Now, all 66 Unicode non-characters are treated the same way U+FFFF has | |
1594 | always been treated; if it was disallowed, all 66 are disallowed; if it | |
1595 | warned, all 66 warn. | |
1596 | ||
1597 | =item * | |
1598 | ||
1599 | C<Env> has been upgraded from version 1.01 to 1.02. | |
1600 | ||
1601 | =item * | |
1602 | ||
1603 | C<Errno> has been upgraded from version 1.11 to 1.13. | |
1604 | ||
1605 | The implementation of C<Errno> has been refactored to use about 55% less memory. | |
1606 | There should be no user-visible changes. | |
1607 | ||
1608 | On some platforms with unusual header files, like Win32/gcc using mingw64 | |
1609 | headers, some constants which weren't actually error numbers have been exposed | |
1610 | by C<Errno>. This has been fixed [perl #77416]. | |
1611 | ||
1612 | =item * | |
1613 | ||
1614 | C<Exporter> has been upgraded from version 5.64_01 to 5.64_03. | |
1615 | ||
1616 | Exporter no longer overrides C<$SIG{__WARN__}> [perl #74472] | |
1617 | ||
1618 | =item * | |
1619 | ||
1620 | C<ExtUtils::CBuilder> has been upgraded from 0.27 to 0.280201. | |
1621 | ||
1622 | Handle C and C++ compilers separately. | |
1623 | ||
1624 | Preserves exit status on VMS. | |
1625 | ||
1626 | =item * | |
1627 | ||
1628 | C<ExtUtils::Command> has been upgraded from version 1.16 to 1.17. | |
1629 | ||
1630 | =item * | |
1631 | ||
1632 | C<ExtUtils::Constant> has been upgraded from 0.22 to 0.23. | |
1633 | ||
1634 | The C<AUTOLOAD> helper code generated by C<ExtUtils::Constant::ProxySubs> | |
1635 | can now C<croak> for missing constants, or generate a complete C<AUTOLOAD> | |
1636 | subroutine in XS, allowing simplification of many modules that use it. | |
1637 | (C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<I18N::Langinfo>, C<POSIX>, C<Socket>) | |
1638 | ||
1639 | C<ExtUtils::Constant::ProxySubs> can now optionally push the names of all | |
1640 | constants onto the package's C{@EXPORT_OK}. This has been used to replace | |
1641 | less space-efficient code in C<B>, helping considerably shrink the size of its | |
1642 | shared object. | |
1643 | ||
1644 | =item * | |
1645 | ||
1646 | C<ExtUtils::Constant::Utils> has been upgraded from 0.02 to 0.03. | |
1647 | ||
1648 | Refactoring and fixing of backcompat code, preparing for resynchronisation | |
1649 | with CPAN. | |
1650 | ||
1651 | =item * | |
1652 | ||
1653 | C<ExtUtils::Embed> has been upgraded from 1.28 to 1.30. | |
1654 | ||
1655 | =item * | |
1656 | ||
1657 | C<ExtUtils::MakeMaker> has been upgraded from version 6.56 to 6.57_05. | |
1658 | ||
1659 | =item * | |
1660 | ||
1661 | C<ExtUtils::Manifest> has been upgraded from version 1.57 to 1.58. | |
1662 | ||
1663 | =item * | |
1664 | ||
1665 | C<ExtUtils::ParseXS> has been upgraded from 2.21 to 2.2208. | |
1666 | ||
1667 | =item * | |
1668 | ||
1669 | C<Fcntl> has been upgraded from 1.06 to 1.11. | |
1670 | ||
1671 | =item * | |
1672 | ||
1673 | C<File::Copy> has been downgraded from version 2.17 to 2.21. | |
1674 | ||
1675 | An extra stanza was added explaining behaviours when the copy destination | |
1676 | already exists and is a directory. | |
1677 | ||
1678 | =item * | |
1679 | ||
1680 | C<File::DosGlob> has been upgraded from version 1.01 to 1.03. | |
1681 | ||
1682 | It allows patterns containing literal parentheses (they no longer need to | |
1683 | be escaped). On Windows, it no longer adds an extra F<./> to the file names | |
1684 | returned when the pattern is a relative glob with a drive specification, | |
1685 | like F<c:*.pl> [perl #71712]. | |
1686 | ||
1687 | =item * | |
1688 | ||
1689 | C<File::Fetch> has been upgraded from version 0.24 to 0.32. | |
1690 | ||
1691 | C<HTTP::Lite> is now supported for 'http' scheme. | |
1692 | ||
1693 | The C<fetch> utility is supported on FreeBSD, NetBSD and | |
1694 | Dragonfly BSD for the C<http> and C<ftp> schemes. | |
1695 | ||
1696 | =item * | |
1697 | ||
1698 | C<File::Find> has been upgraded from version 1.15 to 1.18. | |
1699 | ||
1700 | It improves handling of backslashes on Windows, so that paths such as | |
1701 | F<c:\dir\/file> are no longer generated [perl #71710]. | |
1702 | ||
1703 | =item * | |
1704 | ||
1705 | C<feature> has been upgraded from 1.16 to 1.19. | |
1706 | ||
1707 | Documentation and test updates for the C<unicode_strings> feature. | |
1708 | See L</Full functionality for C<use feature 'unicode_strings'>>. | |
1709 | ||
1710 | =item * | |
1711 | ||
1712 | C<File::CheckTree> has been upgraded from 4.4 to 4.41. | |
1713 | ||
1714 | =item * | |
1715 | ||
1716 | C<File::Glob> has been upgraded from 1.07 to 1.11. | |
1717 | ||
1718 | =item * | |
1719 | ||
1720 | C<File::stat> has been upgraded from 1.02 to 1.04. | |
1721 | ||
1722 | The C<-x> and C<-X> file test operators now work correctly under the root | |
1723 | user. | |
1724 | ||
1725 | =item * | |
1726 | ||
1727 | C<Filter::Simple> has been upgraded from version 0.84 to 0.85. | |
1728 | ||
1729 | =item * | |
1730 | ||
1731 | C<GDBM_File> has been upgraded from 1.10 to 1.13. | |
1732 | ||
1733 | This fixes a memory leak when DBM filters are used. | |
1734 | ||
1735 | =item * | |
1736 | ||
1737 | C<Hash::Util> has been upgraded from 0.07 to 0.10. | |
1738 | ||
1739 | Hash::Util now enables "no warnings 'uninitialized'" to suppress spurious | |
1740 | warnings from undefined hash values (RT #74280). | |
1741 | ||
1742 | =item * | |
1743 | ||
1744 | C<Hash::Util::FieldHash> has been upgraded from 1.04 to 1.07. | |
1745 | ||
1746 | =item * | |
1747 | ||
1748 | C<I18N::Collate> has been upgraded from 1.01 to 1.02. | |
1749 | ||
1750 | =item * | |
1751 | ||
1752 | C<I18N::Langinfo> has been upgraded from version 0.03 to 0.07. | |
1753 | ||
1754 | C<langinfo()> now defaults to using C<$_> if there is no argument given, just | |
1755 | like the documentation always claimed it did. | |
1756 | ||
1757 | =item * | |
1758 | ||
1759 | C<I18N::LangTags> has been upgraded from version 0.35 to 0.35_01. | |
1760 | ||
1761 | =item * | |
1762 | ||
1763 | C<if> has been upgraded from version 0.05 to 0.0601. | |
1764 | ||
1765 | =item * | |
1766 | ||
1767 | C<IO> has been upgraded from version 1.25_02 to 1.25_04. | |
1768 | ||
1769 | =item * | |
1770 | ||
1771 | The IO-Compress distribution has been upgraded from version 2.024 to 2.033. | |
1772 | ||
1773 | =item * | |
1774 | ||
1775 | C<IO::Select> has been upgraded from version 1.17 to 1.18. | |
1776 | ||
1777 | It now allows IO::Handle objects (and objects in derived classes) to be | |
1778 | removed from an IO::Select set even if the underlying file descriptor is | |
1779 | closed or invalid. | |
1780 | ||
1781 | =item * | |
1782 | ||
1783 | C<IO::Socket> has been upgraded from version 1.31 to 1.32. | |
1784 | ||
1785 | C<getsockopt> and C<setsockopt> are now documented. | |
1786 | ||
1787 | =item * | |
1788 | ||
1789 | C<IPC::Cmd> has been upgraded from version 0.54 to 0.68. | |
1790 | ||
1791 | Resolves an issue with splitting Win32 command lines. | |
1792 | ||
1793 | =item * | |
1794 | ||
1795 | C<IPC::Open3> has been upgraded from 1.05 to 1.08. | |
1796 | ||
4ed2cea4 FC |
1797 | C<open3> now produces an error if the C<exec> call fails, allowing this |
1798 | condition to be distinguished from a child process that exited with a | |
1799 | non-zero status [perl #72016]. | |
1800 | ||
5076a392 FC |
1801 | The internal C<xclose> routine now knows how to handle file descriptors, as |
1802 | documented, so duplicating STDIN in a child process using its file | |
1803 | descriptor now works [perl #76474]. | |
1804 | ||
1805 | =item * | |
1806 | ||
1807 | C<IPC::SysV> has been upgraded from version 2.01 to 2.03. | |
1808 | ||
1809 | =item * | |
1810 | ||
1811 | C<lib> has been upgraded from version 0.62 to 0.63. | |
1812 | ||
1813 | =item * | |
1814 | ||
1815 | The Locale-Codes distribution has been upgraded from version 2.07 to 3.16. | |
1816 | ||
1817 | Locale::Country, Locale::Language and Locale::Currency were updated from | |
1818 | 3.12 to 3.13 of the Locale-Codes distribution to include locale code changes. | |
1819 | ||
1820 | Adds some codes. | |
1821 | ||
1822 | =item * | |
1823 | ||
1824 | C<Locale::Maketext> has been upgraded from version 1.14 to 1.17. | |
1825 | ||
1826 | Locale::Maketext guts have been merged back into the main module | |
1827 | and adds external cache support | |
1828 | ||
1829 | It fixes an infinite loop in C<Locale::Maketext::Guts::_compile()> when | |
1830 | working with tainted values (CPAN RT #40727). | |
1831 | ||
1832 | C<< ->maketext >> calls will now backup and restore C<$@> so that error | |
1833 | messages are not suppressed (CPAN RT #34182). | |
1834 | ||
1835 | =item * | |
1836 | ||
1837 | C<Log::Message> has been upgraded from version 0.02 to 0.04. | |
1838 | ||
1839 | =item * | |
1840 | ||
1841 | C<Log::Message::Simple> has been upgraded from version 0.06 to 0.08. | |
1842 | ||
1843 | =item * | |
1844 | ||
1845 | C<Math::BigInt> has been upgraded from version 1.89_01 to 1.994. | |
1846 | ||
1847 | This fixes, among other things, incorrect results when computing binomial | |
1848 | coefficients [perl #77640]. | |
1849 | ||
1850 | This prevents C<sqrt($int)> from crashing under C<use bigrat;> | |
1851 | [perl #73534]. | |
1852 | ||
1853 | =item * | |
1854 | ||
1855 | C<Math::BigInt::FastCalc> has been upgraded from version 0.19 to 0.28. | |
1856 | ||
1857 | =item * | |
1858 | ||
1859 | C<Math::BigRat> has been upgraded from version 0.24 to 0.26_01. | |
1860 | ||
1861 | =item * | |
1862 | ||
1863 | C<Memoize> has been upgraded from version 1.01_03 to 1.02. | |
1864 | ||
1865 | =item * | |
1866 | ||
1867 | C<MIME::Base64> has been upgraded from 3.08 to 3.13. | |
1868 | ||
1869 | Includes new functions to calculate the length of encoded and decoded | |
1870 | base64 strings. | |
1871 | ||
1872 | Now provides C<encode_base64url> and C<decode_base64url> functions to process | |
1873 | the base64 scheme for "URL applications". | |
1874 | ||
1875 | =item * | |
1876 | ||
1877 | C<Module::Build> has been upgraded from version 0.3603 to 0.3800. | |
1878 | ||
1879 | A notable change is the deprecation of several modules. | |
1880 | Module::Build::Version has been deprecated and Module::Build now relies | |
1881 | directly upon L<version>. Module::Build::ModuleInfo has been deprecated in | |
1882 | favor of a standalone copy of it called L<Module::Metadata>. | |
1883 | Module::Build::YAML has been deprecated in favor of L<CPAN::Meta::YAML>. | |
1884 | ||
1885 | Module::Build now also generates META.json and MYMETA.json files | |
1886 | in accordance with version 2 of the CPAN distribution metadata specification, | |
1887 | L<CPAN::Meta::Spec>. The older format META.yml and MYMETA.yml files are | |
1888 | still generated, as well. | |
1889 | ||
1890 | =item * | |
1891 | ||
1892 | C<Module::CoreList> has been upgraded from version 2.29 to XXX. | |
1893 | ||
1894 | Besides listing the updated core modules of this release, it also stops listing | |
1895 | the C<Filespec> module. That module never existed in core. The scripts | |
1896 | generating C<Module::CoreList> confused it with C<VMS::Filespec>, which actually | |
1897 | is a core module, since the time of perl 5.8.7. | |
1898 | ||
1899 | =item * | |
1900 | ||
1901 | C<Module::Load> has been upgraded from version 0.16 to 0.18. | |
1902 | ||
1903 | =item * | |
1904 | ||
1905 | C<Module::Load::Conditional> has been upgraded from version 0.34 to 0.40. | |
1906 | ||
1907 | =item * | |
1908 | ||
1909 | C<Module::Metadata> has been upgraded from version 1.000003 to 1.000004. | |
1910 | ||
1911 | XXX This is not listed in corelist for 5.12.0. When was it added? | |
1912 | ||
1913 | =item * | |
1914 | ||
1915 | C<mro> has been upgraded from version 1.02 to 1.06. | |
1916 | ||
1917 | C<next::method> I<et al.> now take into account that every class inherits | |
1918 | from UNIVERSAL [perl #68654]. | |
1919 | ||
1920 | =item * | |
1921 | ||
1922 | C<NDBM_File> has been upgraded from 1.08 to 1.11. | |
1923 | ||
1924 | This fixes a memory leak when DBM filters are used. | |
1925 | ||
1926 | =item * | |
1927 | ||
1928 | C<NEXT> has been upgraded from version 0.64 to 0.65. | |
1929 | ||
1930 | =item * | |
1931 | ||
1932 | C<ODBM_File> has been upgraded from 1.08 to 1.09. | |
1933 | ||
1934 | This fixes a memory leak when DBM filters are used. | |
1935 | ||
1936 | =item * | |
1937 | ||
1938 | C<Net::Ping> has been upgraded from 2.36 to 2.37. | |
1939 | ||
1940 | =item * | |
1941 | ||
1942 | C<ODBM_File> has been upgraded from 1.07 to 1.10. | |
1943 | ||
1944 | =item * | |
1945 | ||
1946 | C<Object::Accessor> has been upgraded from version 0.36 to 0.38. | |
1947 | ||
1948 | =item * | |
1949 | ||
1950 | C<open> has been upgraded from version 1.07 to 1.08. | |
1951 | ||
1952 | =item * | |
1953 | ||
1954 | C<Opcode> has been upgraded from 1.15 to 1.18. | |
1955 | ||
1956 | =item * | |
1957 | ||
1958 | C<overload> has been upgraded from 1.11 to 1.12. | |
1959 | ||
1960 | C<overload::Method> can now handle subroutines that are themselves blessed | |
1961 | into overloaded classes [perl #71998]. | |
1962 | ||
1963 | Avoid a taint problem in use of sprintf. | |
1964 | ||
1965 | The documentation has greatly improved. See L</Documentation> below. | |
1966 | ||
1967 | =item * | |
1968 | ||
1969 | C<Params::Check> has been upgraded from version 0.26 to 0.28. | |
1970 | ||
1971 | =item * | |
1972 | ||
1973 | C<parent> has been upgraded from version 0.223 to 0.225. | |
1974 | ||
1975 | =item * | |
1976 | ||
1977 | C<Parse::CPAN::Meta> has been upgraded from version 1.40 to 1.4401. | |
1978 | ||
1979 | The latest Parse::CPAN::Meta can now read YAML or JSON files using | |
1980 | L<CPAN::Meta::YAML> and L<JSON::PP>, which are now part of the Perl core. | |
1981 | ||
1982 | =item * | |
1983 | ||
1984 | The PathTools distribution has been upgraded from version 3.31 to 3.34. | |
1985 | ||
1986 | Various issues in L<File::Spec::VMS> have been fixed. (5.13.4) | |
1987 | ||
1988 | =item * | |
1989 | ||
1990 | C<PerlIO::encoding> has been upgraded from 0.12 to 0.14. | |
1991 | ||
1992 | =item * | |
1993 | ||
1994 | C<PerlIO::scalar> has been upgraded from 0.07 to 0.11. | |
1995 | ||
1996 | A C<read> after a C<seek> beyond the end of the string no longer thinks it | |
1997 | has data to read [perl #78716]. | |
1998 | ||
1999 | =item * | |
2000 | ||
2001 | C<PerlIO::via> has been upgraded from 0.09 to 0.11. | |
2002 | ||
2003 | =item * | |
2004 | ||
2005 | The podlators distribution has been upgraded from version 2.3.1 to 2.4.0. | |
2006 | ||
2007 | =item * | |
2008 | ||
2009 | C<Pod::LaTeX> has been upgraded from version 0.58 to 0.59. | |
2010 | ||
2011 | =item * | |
2012 | ||
2013 | C<Pod::Simple> has been upgraded from 3.14 to 3.15 | |
2014 | ||
2015 | Includes various fixes to C<HTML> and C<XHTML> handling. | |
2016 | ||
2017 | =item * | |
2018 | ||
2019 | C<POSIX> has been upgraded from 1.19 to 1.23. | |
2020 | ||
2021 | It now includes constants for POSIX signal constants. | |
2022 | ||
2023 | =item * | |
2024 | ||
2025 | C<re> has been upgraded from version 0.11 to 0.15. | |
2026 | ||
2027 | New C<use re "/flags"> pragma | |
2028 | ||
2029 | Enforce that C</d>, C</u>, and C</l> are mutually exclusive. | |
2030 | ||
2031 | C<re> has been upgraded from version 0.16 to 0.17. | |
2032 | ||
2033 | It now supports the double-a flag: C<use re '/aa';> | |
2034 | ||
2035 | The C<regmust> function used to crash when called on a regular expression | |
2036 | belonging to a pluggable engine. Now it has been disabled for those. | |
2037 | ||
2038 | C<regmust> no longer leaks memory. | |
2039 | ||
2040 | =item * | |
2041 | ||
2042 | C<Safe> has been upgraded from version 2.25 to 2.29. | |
2043 | ||
2044 | This fixes a possible infinite loop when looking for coderefs. | |
2045 | ||
2046 | It adds C<&version::vxs::VCMP> to the default share. | |
2047 | ||
2048 | =item * | |
2049 | ||
2050 | C<SDBM_File> has been upgraded from 1.06 to 1.08. | |
2051 | ||
2052 | =item * | |
2053 | ||
2054 | C<SelfLoader> has been upgraded from 1.17 to 1.18. | |
2055 | ||
2056 | It now works in taint mode [perl #72062]. | |
2057 | ||
2058 | =item * | |
2059 | ||
2060 | C<sigtrap> has been upgraded from version 1.04 to 1.05. | |
2061 | ||
2062 | It no longer tries to modify read-only arguments when generating a | |
2063 | backtrace [perl #72340]. | |
2064 | ||
2065 | =item * | |
2066 | ||
2067 | C<Socket> has been upgraded from version 1.87 to XXX. | |
2068 | ||
2069 | It has several new functions for handling IPv6 addresses. (from 5.13.8) | |
2070 | ||
2071 | It provides new affordances for IPv6, | |
2072 | including implementations of the C<Socket::getaddrinfo()> and | |
2073 | C<Socket::getnameinfo()> functions, along with related constants. | |
2074 | ||
2075 | =item * | |
2076 | ||
2077 | C<Storable> has been upgraded from version 2.22 to 2.27. | |
2078 | ||
2079 | Includes performance improvement for overloaded classes. | |
2080 | ||
2081 | =item * | |
2082 | ||
2083 | C<Storable> has been upgraded from 2.24 to 2.25. | |
2084 | ||
2085 | This adds support for serialising code references that contain UTF-8 strings | |
2086 | correctly. The Storable minor version number changed as a result, meaning that | |
2087 | Storable users who set C<$Storable::accept_future_minor> to a C<FALSE> value | |
2088 | will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details). | |
2089 | ||
2090 | Freezing no longer gets confused if the Perl stack gets reallocated | |
2091 | during freezing [perl #80074]. | |
2092 | ||
2093 | =item * | |
2094 | ||
2095 | C<Sys::Hostname> has been upgraded from 1.11 to 1.14. | |
2096 | ||
2097 | =item * | |
2098 | ||
2099 | C<Term::ANSIColor> has been upgraded from version 2.02 to 3.00. | |
2100 | ||
2101 | =item * | |
2102 | ||
2103 | C<Term::UI> has been upgraded from version 0.20 to 0.26. | |
2104 | ||
2105 | =item * | |
2106 | ||
2107 | C<Test::Harness> has been upgraded from version 3.17 to 3.23. | |
2108 | ||
2109 | The core update from Test-Harness 3.17 to 3.21 fixed some things, but | |
2110 | also L<introduced a known problem|/"Known Problems"> with argument | |
2111 | passing to non-Perl tests. (5.13.3) | |
2112 | ||
2113 | =item * | |
2114 | ||
2115 | C<Test::Simple> has been upgraded from version 0.94 to 0.98. | |
2116 | ||
2117 | Among many other things, subtests without a C<plan> or C<no_plan> now have an | |
2118 | implicit C<done_testing()> added to them. | |
2119 | ||
2120 | =item * | |
2121 | ||
2122 | C<Thread::Queue> has been upgraded from version 2.11 to 2.12. | |
2123 | ||
2124 | =item * | |
2125 | ||
2126 | C<Thread::Semaphore> has been upgraded from version 2.09 to 2.12. | |
2127 | ||
2128 | Added new methods -E<gt>down_nb() and -E<gt>down_force() at the suggestion | |
2129 | of Rick Garlick. | |
2130 | ||
2131 | Refactored methods to skip argument validation when no argument is supplied. | |
2132 | ||
2133 | =item * | |
2134 | ||
2135 | C<threads> has been upgraded from version 1.75 to 1.82. | |
2136 | ||
2137 | =item * | |
2138 | ||
2139 | C<threads::shared> has been upgraded from version 1.32 to 1.36. | |
2140 | ||
2141 | =item * | |
2142 | ||
2143 | C<Tie::Hash> has been upgraded from version 1.03 to 1.04. | |
2144 | ||
2145 | Calling C<< Tie::Hash-E<gt>TIEHASH() >> used to loop forever. Now it C<croak>s. | |
2146 | ||
2147 | =item * | |
2148 | ||
2149 | C<Tie::Hash::NamedCapture> has been upgraded from version 0.06 to 0.08. | |
2150 | ||
2151 | Some of the Perl code has been converted to XS for efficency's sake. | |
2152 | ||
2153 | =item * | |
2154 | ||
2155 | C<Tie::RefHash> has been upgraded from version 1.38 to 1.39. | |
2156 | ||
2157 | =item * | |
2158 | ||
2159 | C<Time::HiRes> has been upgraded from version 1.9719 to 1.9721. | |
2160 | ||
2161 | =item * | |
2162 | ||
2163 | C<Time::Local> has been upgraded from version 1.1901_01 to 1.2000. | |
2164 | ||
2165 | =item * | |
2166 | ||
2167 | C<Time::Piece> has been upgraded from version 1.15_01 to 1.20_01. | |
2168 | ||
2169 | =item * | |
2170 | ||
2171 | C<Unicode::Collate> has been upgraded from version 0.52_01 to 0.73. | |
2172 | ||
2173 | Includes Unicode Collation Algorithm 18 | |
2174 | ||
2175 | Among other things, it is now using UCA Revision 20 (based on Unicode 5.2.0) and | |
2176 | supports a couple of new locales. | |
2177 | ||
2178 | U::C::Locale newly supports locales: ar, be, bg, de__phonebook, hu, hy, kk, mk, nso, om, | |
2179 | tn, vi, hr, ig, ru, sq, se, sr, to and uk | |
2180 | ||
2181 | This release newly adds locales C<ja> C<ko> and C<zh> and its variants | |
2182 | ( C<zh__big5han>, C<zh__gb2312han>, C<zh__pinyin>, C<zh__stroke> ). | |
2183 | ||
2184 | Supported UCA_Version 22 for Unicode 6.0.0. | |
2185 | ||
2186 | The following modules have been added: | |
2187 | ||
2188 | C<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes | |
2189 | tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering. | |
2190 | ||
2191 | C<Unicode::Collate::CJK::GB2312> for C<zh__gb2312han> which makes | |
2192 | tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering. | |
2193 | ||
2194 | C<Unicode::Collate::CJK::JISX0208> which makes tailoring of 6355 kanji | |
2195 | (CJK Unified Ideographs) in the JIS X 0208 order. | |
2196 | ||
2197 | C<Unicode::Collate::CJK::Korean> which makes tailoring of CJK Unified Ideographs | |
2198 | in the order of CLDR's Korean ordering. | |
2199 | ||
2200 | C<Unicode::Collate::CJK::Pinyin> for C<zh__pinyin> which makes | |
2201 | tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering. | |
2202 | ||
2203 | C<Unicode::Collate::CJK::Stroke> for C<zh__stroke> which makes | |
2204 | tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering. | |
2205 | ||
2206 | DUCET has been updated for Unicode 6.0.0 as Collate/allkeys.txt and | |
2207 | the default UCA_Version is 22. | |
2208 | ||
2209 | This also sees the switch from using the pure-perl version of this | |
2210 | module to the XS version. | |
2211 | ||
2212 | =item * | |
2213 | ||
2214 | C<Unicode::Normalize> has been upgraded from version 1.03 to 1.10. | |
2215 | ||
2216 | =item * | |
2217 | ||
2218 | C<Unicode::UCD> has been upgraded from version 0.27 to 0.32. | |
2219 | ||
2220 | Add info about named sequence alternatives. | |
2221 | ||
2222 | Don't use C<CompositionExclusions.txt>. | |
2223 | ||
2224 | This includes a number of bug fixes: | |
2225 | ||
2226 | =over 4 | |
2227 | ||
2228 | =item charinfo() | |
2229 | ||
2230 | =over 4 | |
2231 | ||
2232 | =item * | |
2233 | ||
2234 | It is now updated to Unicode Version 6 with Corrigendum #8, except, | |
2235 | as with Perl 5.14, the code point at U+1F514 has no name. | |
2236 | ||
2237 | =item * | |
2238 | ||
2239 | The Hangul syllable code points have the correct names, and their | |
2240 | decompositions are always output without requiring L<Lingua::KO::Hangul::Util> | |
2241 | to be installed. | |
2242 | ||
2243 | =item * | |
2244 | ||
2245 | The CJK (Chinese-Japanese-Korean) code points U+2A700 - U+2B734 | |
2246 | and U+2B740 - 2B81D are now properly handled. | |
2247 | ||
2248 | =item * | |
2249 | ||
2250 | The numeric values are now output for those CJK code points that have them. | |
2251 | ||
2252 | =item * | |
2253 | ||
2254 | The names that are output for code points with multiple aliases are now the | |
2255 | corrected ones. | |
2256 | ||
2257 | =back | |
2258 | ||
2259 | =item charscript() | |
2260 | ||
2261 | This now correctly returns "Unknown" instead of C<undef> for the script | |
2262 | of a code point that hasn't been assigned another one. | |
2263 | ||
2264 | =item charblock() | |
2265 | ||
2266 | This now correctly returns "No_Block" instead of C<undef> for the block | |
2267 | of a code point that hasn't been assigned to another one. | |
2268 | ||
2269 | =back | |
2270 | ||
2271 | Added new function C<Unicode::UCD::num()>. This function will return the | |
2272 | numeric value of the string passed it; C<undef> if the string in its | |
2273 | entirety has no safe numeric value. | |
2274 | ||
2275 | To be safe, a string must be a single character which has a numeric | |
2276 | value, or consist entirely of characters that match \d, coming from the | |
2277 | same Unicode block of digits. Thus, a mix of Bengali and Western | |
2278 | digits would be considered unsafe, as well as a mix of half- and | |
2279 | full-width digits, but strings consisting entirely of Devanagari digits | |
2280 | or of "Mathematical Bold" digits would would be safe. | |
2281 | ||
2282 | =item * | |
2283 | ||
2284 | C<version> has been upgraded from 0.82 to 0.88. | |
2285 | ||
2286 | Modify export logic for C<is_strict> and C<is_lax>. | |
2287 | ||
2288 | =item * | |
2289 | ||
2290 | C<warnings> and C<warnings::register> have been upgraded from version 1.09 | |
2291 | to 1.11 and from version 1.01 to 1.02 respectively. | |
2292 | ||
2293 | Calling C<use warnings> without arguments is now significantly more efficient. | |
2294 | ||
2295 | It is now possible to register warning categories other than the names of | |
2296 | packages using C<warnings::register>. See L<perllexwarn> for more information. | |
2297 | ||
2298 | =item * | |
2299 | ||
2300 | C<VMS::DCLsym> has been upgraded from version 1.03 to 1.05. | |
2301 | ||
2302 | Two bugs have been fixed [perl #84086]: | |
2303 | ||
2304 | The symbol table name was lost when tying a hash, due to a thinko in | |
2305 | C<TIEHASH>. The result was that all tied hashes interacted with the | |
2306 | local symbol table. | |
2307 | ||
2308 | Unless a symbol table name had been explicitly specified in the call | |
2309 | to the constructor, querying the special key ':LOCAL' failed to | |
2310 | identify objects connected to the local symbol table. | |
2311 | ||
2312 | =item * | |
2313 | ||
2314 | C<Win32> has been upgraded from version 0.39 to 0.44. | |
2315 | ||
2316 | Add several functions. (5.13.8) | |
2317 | ||
2318 | Corrections to names returned by C<Win32::GetOSName> and | |
2319 | C<Win32::GetOSDisplayName>. | |
2320 | ||
2321 | =item * | |
2322 | ||
2323 | C<XSLoader> has been upgraded from version 0.10 to 0.11. | |
2324 | ||
2325 | =back | |
2326 | ||
2327 | =head2 Dual-life Modules and Pragmata | |
2328 | ||
2329 | These modules were formerly distributed only in the Perl core | |
2330 | distribution, and are now dual-lifed (meaning they are now also available | |
2331 | separately on CPAN): | |
2332 | ||
2333 | =over 4 | |
2334 | ||
2335 | =item * | |
2336 | ||
2337 | C<autouse> | |
2338 | ||
2339 | =item * | |
2340 | ||
2341 | C<Devel::SelfStubber> | |
2342 | ||
2343 | =item * | |
2344 | ||
2345 | C<Dumpvalue> | |
2346 | ||
2347 | =item * | |
2348 | ||
2349 | C<Env> | |
2350 | ||
2351 | =item * | |
2352 | ||
2353 | C<File::CheckTree> | |
2354 | ||
2355 | =item * | |
2356 | ||
2357 | C<I18N::Collate> | |
2358 | ||
2359 | =back | |
2360 | ||
2361 | =head2 Removed Modules and Pragmata | |
2362 | ||
2363 | The following modules have been removed from the core distribution, and if | |
2364 | needed should be installed from CPAN instead. | |
2365 | ||
2366 | =over | |
2367 | ||
2368 | =item C<Class::ISA> | |
2369 | ||
2370 | =item C<Pod::Plainer> | |
2371 | ||
2372 | =item C<Switch> | |
2373 | ||
2374 | =back | |
2375 | ||
2376 | The removal of C<Shell> has been deferred until after 5.14, as the | |
2377 | implementation of C<Shell> shipped with 5.12.0 did not correctly issue the | |
2378 | warning that it was to be removed from core. | |
2379 | ||
2380 | =head1 Documentation | |
2381 | ||
2382 | XXX Changes to files in F<pod/> go here. Consider grouping entries by | |
2383 | file and be sure to link to the appropriate page, e.g. L<perlfunc>. | |
2384 | ||
2385 | =head2 New Documentation | |
2386 | ||
2387 | =head3 perlgpl | |
2388 | ||
2389 | L<perlgpl> has been updated to contain GPL version 1, as is included in the | |
2390 | F<README> distributed with perl. | |
2391 | ||
2392 | =head3 L<perl5121delta> | |
2393 | ||
2394 | The Perl 5.12.1 perldelta file was added from the Perl maintenance branch | |
2395 | ||
2396 | =head3 L<perlpodstyle> | |
2397 | ||
2398 | New style guide for POD documentation, | |
2399 | split mostly from the NOTES section of the pod2man man page. | |
2400 | ||
2401 | ( This was added to C<v5.13.6> but was not documented with that release ). | |
2402 | ||
2403 | =head2 Changes to Existing Documentation | |
2404 | ||
4ed2cea4 FC |
2405 | =head3 L<perlmodlib> |
2406 | ||
2407 | The perlmodlib page that came with Perl 5.12.0 was missing a lot of | |
2408 | modules, due to a bug in the script that generates the list. This has been | |
2409 | fixed [perl #74332]. | |
2410 | ||
5076a392 FC |
2411 | =head3 Replace wrong tr/// table in perlebcdic.pod |
2412 | ||
2413 | perlebcdic.pod contains a helpful table to use in tr/// to convert | |
2414 | between EBCDIC and Latin1/ASCII. Unfortunately, the table was the | |
2415 | inverse of the one it describes, though the code that used the table | |
2416 | worked correctly for the specific example given. | |
2417 | ||
2418 | The table has been changed to its inverse, and the sample code changed | |
2419 | to correspond, as this is easier for the person trying to follow the | |
2420 | instructions since deriving the old table is somewhat more complicated. | |
2421 | ||
2422 | The table has also been changed to hex from octal, as that is more the norm | |
2423 | these days, and the recipes in the pod altered to print out leading | |
2424 | zeros to make all the values the same length, as the table that they can | |
2425 | generate has them (5f26d5). | |
2426 | ||
2427 | =head3 Document tricks for user-defined casing | |
2428 | ||
2429 | perlunicode.pod now contains an explanation of how to override, mangle | |
2430 | and otherwise tweak the way perl handles upper, lower and other case | |
2431 | conversions on unicode data, and how to provide scoped changes to alter | |
2432 | one's own code's behaviour without stomping on anybody else (71648f). | |
2433 | ||
2434 | =head3 Document $# and $* as removed and clarify $#array usage | |
2435 | ||
2436 | $# and $* were both disabled as of perl5 version 10; this release adds | |
2437 | documentation to that effect, a description of the results of continuing | |
2438 | to try and use them, and a note explaining that $# can also function as a | |
2439 | sigil in the $#array form (7f315d2). | |
2440 | ||
2441 | =head3 INSTALL explicitly states the requirement for C89 | |
2442 | ||
2443 | This was already true but it's now Officially Stated For The Record (51eec7). | |
2444 | ||
2445 | =head3 No longer advertise Math::TrulyRandom | |
2446 | ||
2447 | This module hasn't been updated since 1996 so we can't recommend it any more | |
2448 | (83918a). | |
2449 | ||
2450 | =head3 perlfaq synchronised to upstream | |
2451 | ||
2452 | The FAQ has been updated to commit | |
2453 | 37550b8f812e591bcd0dd869d61677dac5bda92c from the perlfaq repository | |
2454 | at git@github.com:briandfoy/perlfaq.git | |
2455 | ||
2456 | =head3 General changes | |
2457 | ||
2458 | =over | |
2459 | ||
2460 | =item * | |
2461 | ||
2462 | Octal character escapes in documentation now prefer a three-digit octal | |
2463 | escape or the new C<\o{...}> escape as they have more consistent behavior | |
2464 | in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a) | |
2465 | ||
2466 | =item * | |
2467 | ||
2468 | Documentation now standardizes on the term 'capture group' over 'buffer' | |
2469 | in regular expression documentation (c27a5cf) | |
2470 | ||
2471 | =back | |
2472 | ||
2473 | =head3 L<perlfunc> | |
2474 | ||
2475 | =over | |
2476 | ||
2477 | =item * | |
2478 | ||
2479 | Added cautionary note about "no VERSION" (e0de7c2) | |
2480 | ||
2481 | =item * | |
2482 | ||
2483 | Added additional notes regarding srand when forking (d460397) | |
2484 | ||
2485 | =back | |
2486 | ||
2487 | =head3 L<perlop> | |
2488 | ||
2489 | =over 4 | |
2490 | ||
2491 | =item * | |
2492 | ||
2493 | Improved documentation of unusual character escapes (4068718, 9644846) | |
2494 | ||
2495 | =item * | |
2496 | ||
2497 | Clarified how hexadecimal escapes are interpreted, with particular | |
2498 | attention to the treatment of invalid characters (9644846) | |
2499 | ||
2500 | =back | |
2501 | ||
2502 | =head3 L<perlrun> | |
2503 | ||
2504 | =over | |
2505 | ||
2506 | =item * | |
2507 | ||
2508 | Clarified the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb) | |
2509 | ||
2510 | =back | |
2511 | ||
2512 | =head3 L<perlpolicy> | |
2513 | ||
2514 | =over | |
2515 | ||
2516 | =item * | |
2517 | ||
2518 | Added the policy on compatibility and deprecation along with definitions of | |
2519 | terms like "deprecation" (70e4a83) | |
2520 | ||
2521 | =back | |
2522 | ||
2523 | =head3 L<perlre> | |
2524 | ||
2525 | =over | |
2526 | ||
2527 | =item * | |
2528 | ||
2529 | Added examples of the perils of not using \g{} when there are more | |
2530 | than nine back-references (9d86067) | |
2531 | ||
2532 | =back | |
2533 | ||
2534 | =head3 L<perltie> | |
2535 | ||
2536 | =over | |
2537 | ||
2538 | =item * | |
2539 | ||
2540 | Updated some examples for modern Perl style (67d00dd) | |
2541 | ||
2542 | =back | |
2543 | ||
2544 | =head3 L<perldiag> | |
2545 | ||
2546 | =over 4 | |
2547 | ||
2548 | =item * | |
2549 | ||
2550 | The following existing diagnostics are now documented: | |
2551 | ||
2552 | =over 4 | |
2553 | ||
2554 | =item * | |
2555 | ||
2556 | L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c"> | |
2557 | ||
2558 | =item * | |
2559 | ||
2560 | L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s"> | |
2561 | ||
2562 | =item * | |
2563 | ||
2564 | L<Ambiguous use of %c{%s%s} resolved to %c%s%s|perldiag/"Ambiguous use of %c{%s%s} resolved to %c%s%s"> | |
2565 | ||
2566 | =item * | |
2567 | ||
2568 | L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()"> | |
2569 | ||
2570 | =item * | |
2571 | ||
2572 | L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)"> | |
2573 | ||
2574 | =item * | |
2575 | ||
2576 | L<Invalid version format (%s)|perldiag/"Invalid version format (%s)"> | |
2577 | ||
2578 | =item * | |
2579 | ||
2580 | L<Invalid version object|perldiag/"Invalid version object"> | |
2581 | ||
2582 | =back | |
2583 | ||
2584 | =back | |
2585 | ||
2586 | =head3 L<perlport> | |
2587 | ||
2588 | =over 4 | |
2589 | ||
2590 | =item * | |
2591 | ||
2592 | Documented a L<limitation|perlport/alarm> of L<alarm()|perlfunc/"alarm SECONDS"> | |
2593 | on Win32. | |
2594 | ||
2595 | =back | |
2596 | ||
2597 | =head3 L<perlre> | |
2598 | ||
2599 | =over 4 | |
2600 | ||
2601 | =item * | |
2602 | ||
2603 | Minor fix to a multiple scalar match example. | |
2604 | ||
2605 | =back | |
2606 | ||
2607 | =head3 L<perlapi> | |
2608 | ||
2609 | =over 4 | |
2610 | ||
2611 | =item * | |
2612 | ||
2613 | Many of the optree construction functions are now documented. | |
2614 | ||
2615 | =back | |
2616 | ||
2617 | =head3 L<perlbook> | |
2618 | ||
2619 | =over 4 | |
2620 | ||
2621 | =item * | |
2622 | ||
2623 | Expanded to cover many more popular books. | |
2624 | ||
2625 | =back | |
2626 | ||
2627 | =head3 L<perlfaq> | |
2628 | ||
2629 | =over 4 | |
2630 | ||
2631 | =item * | |
2632 | ||
2633 | L<perlfaq>, L<perlfaq2>, L<perlfaq4>, L<perlfaq5>, L<perlfaq6>, L<perlfaq8>, and | |
2634 | L<perlfaq9> have seen various updates and modernizations. | |
2635 | ||
2636 | =back | |
2637 | ||
2638 | =head3 L<perlapi> | |
2639 | ||
2640 | =over 4 | |
2641 | ||
2642 | =item * | |
2643 | ||
2644 | The documentation for the C<SvTRUE> macro was simply wrong in stating that | |
2645 | get-magic is not processed. It has been corrected. | |
2646 | ||
2647 | =back | |
2648 | ||
2649 | =head3 L<perlvar> | |
2650 | ||
2651 | L<perlvar> reorders the variables and groups them by topic. Each variable | |
2652 | introduced after Perl 5.000 notes the first version in which it is | |
2653 | available. L<perlvar> also has a new section for deprecated variables to | |
2654 | note when they were removed. | |
2655 | ||
2656 | =head3 blah blah blah | |
2657 | ||
2658 | Array and hash slices in scalar context are now documented in L<perldata>. | |
2659 | ||
2660 | =head3 blah blah blah | |
2661 | ||
2662 | L<perlform> and L<perllocale> have been corrected to state that | |
2663 | C<use locale> affects formats. | |
2664 | ||
2665 | =head3 All documentation | |
2666 | ||
2667 | =over | |
2668 | ||
2669 | =item * | |
2670 | ||
2671 | Numerous POD warnings were fixed. | |
2672 | ||
2673 | =item * | |
2674 | ||
2675 | Many, many spelling errors and typographical mistakes were corrected throughout Perl's core. | |
2676 | ||
2677 | =back | |
2678 | ||
2679 | =head3 C<perlhack> | |
2680 | ||
2681 | =over 4 | |
2682 | ||
2683 | =item * | |
2684 | ||
2685 | C<perlhack> was extensively reorganized. | |
2686 | ||
2687 | =back | |
2688 | ||
2689 | =head3 C<perlfunc> | |
2690 | ||
2691 | =over 4 | |
2692 | ||
2693 | =item * | |
2694 | ||
2695 | It has now been documented that C<ord> returns 0 for an empty string. | |
2696 | ||
2697 | =back | |
2698 | ||
2699 | =head3 L<overload> | |
2700 | ||
2701 | =over 4 | |
2702 | ||
2703 | =item * | |
2704 | ||
2705 | L<overload>'s documentation has practically undergone a rewrite. It | |
2706 | is now much more straightforward and clear. | |
2707 | ||
2708 | =back | |
2709 | ||
2710 | =head3 L<perlhack> and perlrepository | |
2711 | ||
2712 | =over 4 | |
2713 | ||
2714 | =item * | |
2715 | ||
2716 | The L<perlhack> and perlrepository documents have been heavily edited and | |
2717 | split up into several new documents. | |
2718 | ||
2719 | The L<perlhack> document is now much shorter, and focuses on the Perl 5 | |
2720 | development process and submitting patches to Perl. The technical content has | |
2721 | been moved to several new documents, L<perlsource>, L<perlinterp>, | |
2722 | L<perlhacktut>, and L<perlhacktips>. This technical content has only been | |
2723 | lightly edited. | |
2724 | ||
2725 | The perlrepository document has been renamed to L<perlgit>. This new document | |
2726 | is just a how-to on using git with the Perl source code. Any other content | |
2727 | that used to be in perlrepository has been moved to perlhack. | |
2728 | ||
2729 | =back | |
2730 | ||
2731 | =head3 L<perlfunc> | |
2732 | ||
2733 | =over 4 | |
2734 | ||
2735 | =item * | |
2736 | ||
2737 | The documentation for the C<map> function now contains more examples, | |
2738 | see B<perldoc -f map> (f947627) | |
2739 | ||
2740 | =back | |
2741 | ||
2742 | =head3 L<perlfaq4> | |
2743 | ||
2744 | =over 4 | |
2745 | ||
2746 | =item * | |
2747 | ||
2748 | Examples in L<perlfaq4> have been updated to show the use of | |
2749 | L<Time::Piece>. (9243591) | |
2750 | ||
2751 | =back | |
2752 | ||
2753 | =head3 Miscellaneous | |
2754 | ||
2755 | =over 4 | |
2756 | ||
2757 | =item * | |
2758 | ||
2759 | Many POD related RT bugs and other issues which are too numerous to | |
2760 | enumerate have been solved by Michael Stevens. | |
2761 | ||
2762 | =back | |
2763 | ||
2764 | =head1 Diagnostics | |
2765 | ||
2766 | The following additions or changes have been made to diagnostic output, | |
2767 | including warnings and fatal error messages. For the complete list of | |
2768 | diagnostic messages, see L<perldiag>. | |
2769 | ||
2770 | =head2 New Diagnostics | |
2771 | ||
2772 | =over | |
2773 | ||
2774 | =item Parsing code internal error (%s) | |
2775 | ||
2776 | New fatal error produced when parsing code supplied by an extension violated the | |
2777 | parser's API in a detectable way. | |
2778 | ||
2779 | =item Use of qw(...) as parentheses is deprecated | |
2780 | ||
2781 | See L</"Use of qw(...) as parentheses"> for details. | |
2782 | ||
2783 | =item Using !~ with %s doesn't make sense | |
2784 | ||
2785 | This message was actually added in | |
2786 | 5.13.2, but was omitted from perldelta. It now applies also to the C<y///> | |
2787 | operator, and has been documented. | |
2788 | ||
2789 | =item Closure prototype called | |
2790 | ||
2791 | There is a new "Closure prototype called" error [perl #68560]. | |
2792 | ||
2793 | =item Operation "%s" returns its argument for ... | |
2794 | ||
2795 | Performing an operation requiring Unicode semantics (such as case-folding) | |
2796 | on a Unicode surrogate or a non-Unicode character now triggers a warning: | |
2797 | 'Operation "%s" returns its argument for ...'. | |
2798 | ||
2799 | =item "\b{" is deprecated; use "\b\{" instead | |
2800 | ||
2801 | =item "\B{" is deprecated; use "\B\{" instead | |
2802 | ||
2803 | Use of an unescaped "{" immediately following a C<\b> or C<\B> is now | |
2804 | deprecated so as to reserve its use for Perl itself in a future release. | |
2805 | ||
2806 | =item regcomp: Add warning if \p is used under locale. (fb2e24c) | |
2807 | ||
2808 | C<\p> implies Unicode matching rules, which are likely going to be | |
2809 | different than the locale's. | |
2810 | ||
2811 | =item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries | |
2812 | ||
2813 | This new error is triggered if a destructor called on an object in a | |
2814 | typeglob that is being freed creates a new typeglob entry containing an | |
2815 | object with a destructor that creates a new entry containing an object.... | |
2816 | ||
2817 | =item refcnt: fd %d%s | |
2818 | ||
2819 | This new error only occurs if a internal consistency check fails when a | |
2820 | pipe is about to be closed. | |
2821 | ||
2822 | =item Regexp modifier "/%c" may not appear twice | |
2823 | ||
2824 | (F syntax) The regular expression pattern had one of the mutually exclusive | |
2825 | modifiers repeated. Remove all but one of the occurrences. | |
2826 | ||
2827 | =item Regexp modifiers "/%c" and "/%c" are mutually exclusive | |
2828 | ||
2829 | (F syntax) The regular expression pattern had more than one of the mutually | |
2830 | exclusive modifiers. Retain only the modifier that is supposed to be there. | |
2831 | ||
2832 | =item Insecure user-defined property %s | |
2833 | ||
2834 | (F) Perl detected tainted data when trying to compile a regular | |
2835 | expression that contains a call to a user-defined character property | |
2836 | function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>. | |
2837 | See L<perlunicode/User-Defined Character Properties> and L<perlsec>. | |
2838 | ||
2839 | =back | |
2840 | ||
2841 | =head2 Changes to Existing Diagnostics | |
2842 | ||
2843 | =over 4 | |
2844 | ||
2845 | =item * | |
2846 | ||
4ed2cea4 FC |
2847 | The "Variable $foo is not imported" warning that precedes a |
2848 | C<strict 'vars'> error has now been assigned the "misc" category, so that | |
2849 | C<no warnings> will suppress it [perl #73712]. | |
2850 | ||
2851 | =item * | |
2852 | ||
5076a392 FC |
2853 | C<warn> and C<die> now produce 'Wide character' warnings when fed a |
2854 | character outside the byte range if STDERR is a byte-sized handle. | |
2855 | ||
2856 | =item * | |
2857 | ||
2858 | The 'Layer does not match this perl' error message has been replaced with | |
2859 | these more helpful messages: | |
2860 | ||
2861 | =over 4 | |
2862 | ||
2863 | =item * | |
2864 | ||
2865 | PerlIO layer function table size (%d) does not match size expected by this | |
2866 | perl (%d) | |
2867 | ||
2868 | =item * | |
2869 | ||
2870 | PerlIO layer instance size (%d) does not match size expected by this perl | |
2871 | (%d) | |
2872 | ||
2873 | =back | |
2874 | ||
2875 | [perl #73754] | |
2876 | ||
2877 | =item * | |
2878 | ||
2879 | The "Found = in conditional" warning that is emitted when a constant is | |
2880 | assigned to a variable in a condition is now withheld if the constant is | |
2881 | actually a subroutine or one generated by C<use constant>, since the value | |
2882 | of the constant may not be known at the time the program is written | |
2883 | [perl #77762]. | |
2884 | ||
2885 | =item * | |
2886 | ||
2887 | Previously, if none of the C<gethostbyaddr>, C<gethostbyname> and | |
2888 | C<gethostent> functions were implemented on a given platform, they would | |
2889 | all die with the message 'Unsupported socket function "gethostent" called', | |
2890 | with analogous messages for C<getnet*> and C<getserv*>. This has been | |
2891 | corrected. | |
2892 | ||
2893 | =item * | |
2894 | ||
2895 | The warning message about regex unrecognized escapes passed through is | |
2896 | changed to include any literal '{' following the 2-char escape. e.g., | |
2897 | "\q{" will include the { in the message as part of the escape | |
2898 | (216bfc0). | |
2899 | ||
2900 | =item * | |
2901 | ||
2902 | C<binmode $fh, ':scalar'> no longer warns (8250589) | |
2903 | ||
2904 | Perl will now no longer produce this warning: | |
2905 | ||
2906 | $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"' | |
2907 | Use of uninitialized value in binmode at -e line 1. | |
2908 | ||
2909 | =back | |
2910 | ||
2911 | =head1 Utility Changes | |
2912 | ||
2913 | =head3 L<perldb> | |
2914 | ||
2915 | =over | |
2916 | ||
2917 | =item * | |
2918 | ||
2919 | The remote terminal works after forking and spawns new sessions - one | |
2920 | for each forked process (11653f7) | |
2921 | ||
2922 | =item * | |
2923 | ||
2924 | Uses the less pager path from Config instead of searching for it (bf320d6) | |
2925 | ||
2926 | =back | |
2927 | ||
2928 | =head3 L<h2ph> | |
2929 | ||
2930 | =over 4 | |
2931 | ||
2932 | =item * | |
2933 | ||
2934 | The use of a deprecated C<goto> construct has been removed [perl #74404]. | |
2935 | ||
2936 | =back | |
2937 | ||
2938 | =head3 L<ptargrep> | |
2939 | ||
2940 | =over 4 | |
2941 | ||
2942 | =item * | |
2943 | ||
2944 | L<ptargrep> is a utility to apply pattern matching to the contents of files | |
2945 | in a tar archive. It comes with C<Archive::Tar>. | |
2946 | ||
2947 | =back | |
2948 | ||
2949 | =head3 C<perlbug> | |
2950 | ||
2951 | =over 4 | |
2952 | ||
2953 | =item * | |
2954 | ||
4ed2cea4 FC |
2955 | C<perlbug> now looks in the EMAIL environment variable for a return address |
2956 | if the REPLY-TO and REPLYTO variables are empty. | |
2957 | ||
2958 | =item * | |
2959 | ||
5076a392 FC |
2960 | C<perlbug> did not previously generate a From: header, potentially |
2961 | resulting in dropped mail. Now it does include that header. | |
2962 | ||
2963 | =back | |
2964 | ||
2965 | =head3 C<buildtoc> | |
2966 | ||
2967 | =over 4 | |
2968 | ||
2969 | =item * | |
2970 | ||
2971 | F<pod/buildtoc> has been modernized and can now be used to test the | |
2972 | well-formedness of F<pod/perltoc.pod> automatically. | |
2973 | ||
2974 | =back | |
2975 | ||
2976 | =head3 L<perlbug> | |
2977 | ||
2978 | =over 4 | |
2979 | ||
2980 | =item * | |
2981 | ||
2982 | [perl #82996] Use the user's from address as return-path in perlbug | |
2983 | ||
2984 | Many systems these days don't have a valid Internet domain name and | |
2985 | perlbug@perl.org does not accept email with a return-path that does | |
2986 | not resolve. Therefore pass the user's address to sendmail so it's | |
2987 | less likely to get stuck in a mail queue somewhere. (019cfd2) | |
2988 | ||
2989 | =back | |
2990 | ||
2991 | =head1 Configuration and Compilation | |
2992 | ||
2993 | =over 4 | |
2994 | ||
2995 | =item * | |
2996 | ||
2997 | Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under | |
2998 | $(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME). | |
2999 | ||
3000 | =item * | |
3001 | ||
3002 | This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and | |
3003 | 'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now | |
3004 | set correctly (23ae7f). | |
3005 | ||
3006 | =item * | |
3007 | ||
3008 | Adjusted 'make test.valgrind' to account for cpan/dist/ext separation | |
3009 | (e07ce2e) | |
3010 | ||
3011 | =item * | |
3012 | ||
3013 | Compatibility with C<C++> compilers has been improved. | |
3014 | ||
3015 | =item * | |
3016 | ||
3017 | On compilers that support it, C<-Wwrite-strings> is now added to cflags by | |
3018 | default. | |
3019 | ||
3020 | =item * | |
3021 | ||
3022 | The C<Encode> module can now (once again) be included in a static Perl | |
3023 | build. The special-case handling for this situation got broken in Perl | |
3024 | 5.11.0, and has now been repaired. | |
3025 | ||
3026 | =back | |
3027 | ||
3028 | =head1 Testing | |
3029 | ||
3030 | XXX Any significant changes to the testing of a freshly built perl should be | |
3031 | listed here. Changes which create B<new> files in F<t/> go here as do any | |
3032 | large changes to the testing harness (e.g. when parallel testing was added). | |
3033 | Changes to existing files in F<t/> aren't worth summarising, although the bugs | |
3034 | that they represent may be covered elsewhere. | |
3035 | ||
3036 | =over 4 | |
3037 | ||
3038 | =item * | |
3039 | ||
3040 | F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1) | |
3041 | ||
3042 | =item * | |
3043 | ||
3044 | Many common testing routines were refactored into t/lib/common.pl | |
3045 | ||
3046 | =item * | |
3047 | ||
3048 | Several test files have been modernized to use Test::More | |
3049 | ||
3050 | =item * | |
3051 | ||
3052 | F<t/op/print.t> has been added to test implicit printing of C<$_>. | |
3053 | ||
3054 | =item * | |
3055 | ||
3056 | F<t/io/errnosig.t> has been added to test for restoration of of C<$!> when | |
3057 | leaving signal handlers. | |
3058 | ||
3059 | =item * | |
3060 | ||
3061 | F<t/op/tie_fetch_count.t> has been added to see if C<FETCH> is only called once | |
3062 | on tied variables. | |
3063 | ||
3064 | =item * | |
3065 | ||
3066 | F<lib/Tie/ExtraHash.t> has been added to make sure the, previously untested, | |
3067 | L<Tie::ExtraHash> keeps working. | |
3068 | ||
3069 | =item * | |
3070 | ||
3071 | F<t/re/overload.t> has been added to test against string corruption in pattern | |
3072 | matches on overloaded objects. This is a TODO test. | |
3073 | ||
3074 | =item * | |
3075 | ||
3076 | The new F<t/lib/universal.t> script tests the Internal::* functions and other | |
3077 | things in F<universal.c>. | |
3078 | ||
3079 | =item * | |
3080 | ||
3081 | A rare race condition in F<t/op/while_readdir.t> has been fixed, stopping it | |
3082 | from failing randomly when running tests in parallel. | |
3083 | ||
3084 | =item * | |
3085 | ||
3086 | The new F<t/op/leaky-magic.t> script tests that magic applied to variables in | |
3087 | the main packages does not affect other packages. | |
3088 | ||
3089 | =item * | |
3090 | ||
3091 | The script F<t/op/threads-dirh.t> has been added, which tests interaction | |
3092 | of threads and directory handles. | |
3093 | ||
3094 | =item * | |
3095 | ||
3096 | The new F<t/mro/isa_aliases.t> has been added, which tests that | |
3097 | C<*Foo::ISA = *Bar::ISA> works properly. | |
3098 | ||
3099 | =item * | |
3100 | ||
3101 | F<t/mro/isarev.t> has been added, which tests that C<PL_isarev> (accessible | |
3102 | at the Perl level via C<mro::get_isarev>) is updated properly. | |
3103 | ||
3104 | =item * | |
3105 | ||
3106 | F<t/run/switchd-78586.t> has been added, which tests that [perl #78586] | |
3107 | has been fixed (related to line numbers in the debugger). | |
3108 | ||
3109 | =item * | |
3110 | ||
3111 | C<lib/File/DosGlob.t> has been modernized and now uses C<Test::More>. | |
3112 | ||
3113 | =item * | |
3114 | ||
3115 | A new test script, C<t/porting/filenames.t>, makes sure that filenames and | |
3116 | paths are reasonably portable. | |
3117 | ||
3118 | =item * | |
3119 | ||
3120 | C<t/porting/diag.t> is now several orders of magnitude faster. | |
3121 | ||
3122 | =item * | |
3123 | ||
3124 | C<t/porting/buildtoc.t> now tests that the documentation TOC file is current and well-formed. | |
3125 | ||
3126 | =item * | |
3127 | ||
3128 | C<t/base/while.t> now tests the basics of a while loop with minimal dependencies. | |
3129 | ||
3130 | =item * | |
3131 | ||
3132 | C<t/cmd/while.t> now uses F<test.pl> for better maintainability. | |
3133 | ||
3134 | =item * | |
3135 | ||
3136 | C<t/op/split.t> now tests calls to C<split> without any pattern specified. | |
3137 | ||
3138 | =item * | |
3139 | ||
3140 | F<porting/FindExt.t> now skips all tests on a static (-Uusedl) build | |
3141 | of perl. | |
3142 | ||
3143 | =item * | |
3144 | ||
3145 | F<porting/FindExt.t> now passes on non-Win32 platforms when some | |
3146 | extensions are built statically. | |
3147 | ||
3148 | =item * | |
3149 | ||
3150 | The tests for C<split /\s/> and Unicode have been moved from | |
3151 | F<t/op/split.t> to the new F<t/op/split_unicode.t>. | |
3152 | ||
3153 | =item * | |
3154 | ||
3155 | F<t/re/re.t> has been moved to F<ext/re/t/re_funcs_u.t>. | |
3156 | ||
3157 | =item * | |
3158 | ||
3159 | The tests for [perl #72922] have been moved from F<t/re/qr.t> to the new | |
3160 | F<t/re/qr-72922.t>. | |
3161 | ||
3162 | =item * | |
3163 | ||
3164 | F<t/re/reg_unsafe.t> has been deleted and its only test moved to | |
3165 | F<t/re/pat_advanced.t>. | |
3166 | ||
3167 | =back | |
3168 | ||
3169 | =head1 Platform Support | |
3170 | ||
3171 | XXX Any changes to platform support should be listed in the sections below. | |
3172 | ||
3173 | [ Within the sections, list each platform as a =item entry with specific | |
3174 | changes as paragraphs below it. ] | |
3175 | ||
3176 | =head2 New Platforms | |
3177 | ||
3178 | XXX List any platforms that this version of perl compiles on, that previous | |
3179 | versions did not. These will either be enabled by new files in the F<hints/> | |
3180 | directories, or new subdirectories and F<README> files at the top level of the | |
3181 | source tree. | |
3182 | ||
3183 | =over 4 | |
3184 | ||
3185 | =item AIX | |
3186 | ||
3187 | Perl now builds on AIX 4.2. | |
3188 | ||
3189 | =back | |
3190 | ||
3191 | =head2 Discontinued Platforms | |
3192 | ||
3193 | =over 4 | |
3194 | ||
3195 | =item MacOS Classic | |
3196 | ||
3197 | Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in | |
3198 | December 2004. Vestigial MacOS Classic specific code has now been removed | |
3199 | from other core modules as well (8f8c2a4..c457df0) | |
3200 | ||
3201 | =item Apollo DomainOS | |
3202 | ||
3203 | The last vestiges of support for this platform have been excised from the | |
3204 | Perl distribution. It was officially discontinued in version 5.12.0. It had | |
3205 | not worked for years before that. | |
3206 | ||
3207 | =item MacOS Classic | |
3208 | ||
3209 | The last vestiges of support for this platform have been excised from the | |
3210 | Perl distribution. It was officially discontinued in an earlier version. | |
3211 | ||
3212 | =back | |
3213 | ||
3214 | =head2 Platform-Specific Notes | |
3215 | ||
3216 | =head3 Recent OpenBSDs now use perl's malloc | |
3217 | ||
3218 | OpenBSD E<gt> 3.7 has a new malloc implementation which is mmap based | |
3219 | and as such can release memory back to the OS; however for perl using | |
3220 | this malloc causes a substantial slowdown so we now default to using | |
3221 | perl's malloc instead (RT #75742) (9b58b5). | |
3222 | ||
3223 | =head3 VMS | |
3224 | ||
3225 | =over 4 | |
3226 | ||
3227 | =item * | |
3228 | ||
3229 | Make C<PerlIOUnix_open> honour default permissions on VMS. | |
3230 | ||
3231 | When C<perlio> became the default and C<unixio> became the default bottom layer, | |
3232 | the most common path for creating files from Perl became C<PerlIOUnix_open>, | |
3233 | which has always explicitly used C<0666> as the permission mask. | |
3234 | ||
3235 | To avoid this, C<0777> is now passed as the permissions to C<open()>. In the | |
3236 | VMS CRTL, C<0777> has a special meaning over and above intersecting with the | |
3237 | current umask; specifically, it allows Unix syscalls to preserve native default | |
3238 | permissions. | |
3239 | ||
3240 | =back | |
3241 | ||
3242 | =head3 Win32 | |
3243 | ||
3244 | t/io/openpid.t now uses the alarm() watchdog strategy for more | |
3245 | robustness (5732108) | |
3246 | ||
3247 | =over 4 | |
3248 | ||
3249 | =item * | |
3250 | ||
3251 | Fixed a possible hang in F<t/op/readline.t>. | |
3252 | ||
3253 | =item * | |
3254 | ||
3255 | Fixed build process for SDK2003SP1 compilers. | |
3256 | ||
3257 | =item * | |
3258 | ||
3259 | When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set | |
3260 | in C<$Config{ccflags}>. This improves portability when compiling XS extensions | |
3261 | using new compilers, but for a perl compiled with old 32-bit compilers. | |
3262 | ||
3263 | =back | |
3264 | ||
3265 | XXX A bunch of entries that need conversion to =head2 format (unless the | |
3266 | entries above change to =items): | |
3267 | ||
3268 | =over | |
3269 | ||
3270 | =item IRIX | |
3271 | ||
3272 | Conversion of strings to floating-point numbers is now more accurate on | |
3273 | IRIX systems [perl #32380]. | |
3274 | ||
3275 | =item Mac OS X | |
3276 | ||
3277 | Early versions of Mac OS X (Darwin) had buggy implementations of the | |
3278 | C<setregid>, C<setreuid>, C<setrgid> and C<setruid> functions, so perl | |
3279 | would pretend they did not exist. | |
3280 | ||
3281 | These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and | |
3282 | higher, as they have been fixed [perl #72990]. | |
3283 | ||
3284 | =item OpenVOS | |
3285 | ||
3286 | perl now builds again with OpenVOS (formerly known as Stratus VOS) | |
3287 | [perl #78132]. | |
3288 | ||
3289 | =item VMS | |
3290 | ||
3291 | The shortening of symbols longer than 31 characters in the C sources is | |
3292 | now done by the compiler rather than by xsubpp (which could only do so | |
3293 | for generated symbols in XS code). | |
3294 | ||
3295 | =item Windows | |
3296 | ||
3297 | C<$Config{gccversion}> is now set correctly when perl is built using the | |
3298 | mingw64 compiler from L<http://mingw64.org> [perl #73754]. | |
3299 | ||
3300 | The build process proceeds more smoothly with mingw and dmake when | |
3301 | F<C:\MSYS\bin> is in the PATH, due to a C<Cwd> fix. | |
3302 | ||
3303 | =item Windows | |
3304 | ||
3305 | Directory handles are now properly cloned when threads are created. In perl | |
3306 | 5.13.6, child threads simply stopped inheriting directory handles. In | |
3307 | previous versions, threads would share handles, resulting in crashes. | |
3308 | ||
3309 | Support for building with Visual C++ 2010 is now underway, but is not yet | |
3310 | complete. See F<README.win32> for more details. | |
3311 | ||
3312 | =item VMS | |
3313 | ||
3314 | Record-oriented files (record format variable or variable with fixed control) | |
3315 | opened for write by the perlio layer will now be line buffered to prevent the | |
3316 | introduction of spurious line breaks whenever the perlio buffer fills up. | |
3317 | ||
3318 | =item NetBSD | |
3319 | ||
3320 | The NetBSD hints file has been changed to make the system's malloc the | |
3321 | default. | |
3322 | ||
3323 | =item Windows | |
3324 | ||
3325 | The option to use an externally-supplied C<crypt()>, or to build with no | |
3326 | C<crypt()> at all, has been removed. Perl supplies its own C<crypt()> | |
3327 | implementation for Windows, and the political situation that required | |
3328 | this part of the distribution to sometimes be omitted is long gone. | |
3329 | ||
3330 | =item Cygwin | |
3331 | ||
3332 | =over | |
3333 | ||
3334 | =item * | |
3335 | ||
3336 | Updated MakeMaker to build man pages on cygwin. | |
3337 | ||
3338 | =item * | |
3339 | ||
3340 | Improved rebase behaviour | |
3341 | ||
3342 | If a dll is updated on cygwin reuse the old imagebase address. | |
3343 | This solves most rebase errors, esp when updating on core dll's. | |
3344 | See L<http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README> for more information. | |
3345 | ||
3346 | =item * | |
3347 | ||
3348 | Support the standard cyg dll prefix, which is e.g. needed for FFI's. | |
3349 | ||
3350 | =item * | |
3351 | ||
3352 | Updated build hints file | |
3353 | ||
3354 | =back | |
3355 | ||
3356 | ||
3357 | =item Solaris | |
3358 | ||
3359 | DTrace is now supported on Solaris. There used to be build failures, but | |
3360 | these have been fixed [perl #73630]. | |
3361 | ||
3362 | =item Windows | |
3363 | ||
3364 | =over 4 | |
3365 | ||
3366 | =item * | |
3367 | ||
3368 | The C<test-prep> build target now depends on F<pod/perltoc.pod> to allow the | |
3369 | F<t/porting/buildtoc.t> test to run successfully. | |
3370 | ||
3371 | =back | |
3372 | ||
3373 | =item MirBSD | |
3374 | ||
3375 | =over 4 | |
3376 | ||
3377 | =item * | |
3378 | ||
3379 | [perl #82988] Skip hanging taint.t test on MirBSD 10 (1fb83d0) | |
3380 | ||
3381 | Skip a hanging test under MirBSD that was already being skipped under | |
3382 | OpenBSD. | |
3383 | ||
3384 | =item * | |
3385 | ||
3386 | Previously if you build perl with a shared libperl.so on MirBSD (the | |
3387 | default config), it will work up to the installation; however, once | |
3388 | installed, it will be unable to find libperl. Treat path handling | |
3389 | like in the other BSD dialects. | |
3390 | ||
3391 | =back | |
3392 | ||
3393 | =back | |
3394 | ||
3395 | =head1 Internal Changes | |
3396 | ||
f8e88449 FC |
3397 | =head2 New APIs |
3398 | ||
3399 | =head2 CLONE_PARAMS structure added to ease correct thread creation | |
3400 | ||
3401 | Modules that create threads should now create C<CLONE_PARAMS> structures | |
3402 | by calling the new function C<Perl_clone_params_new()>, and free them with | |
3403 | C<Perl_clone_params_del()>. This will ensure compatibility with any future | |
3404 | changes to the internals of the C<CLONE_PARAMS> structure layout, and that | |
3405 | it is correctly allocated and initialised. | |
3406 | ||
3407 | =head2 API function to parse statements | |
3408 | ||
3409 | The C<parse_fullstmt> function has been added to allow parsing of a single | |
3410 | complete Perl statement. See L<perlapi> for details. | |
3411 | ||
3412 | =head2 API functions for accessing the runtime hinthash | |
3413 | ||
3414 | A new C API for introspecting the hinthash C<%^H> at runtime has been added. | |
3415 | See C<cop_hints_2hv>, C<cop_hints_fetchpvn>, C<cop_hints_fetchpvs>, | |
3416 | C<cop_hints_fetchsv>, and C<hv_copy_hints_hv> in L<perlapi> for details. | |
3417 | ||
3418 | =head2 C interface to C<caller()> | |
3419 | ||
3420 | The C<caller_cx> function has been added as an XSUB-writer's equivalent of | |
3421 | C<caller()>. See L<perlapi> for details. | |
3422 | ||
3423 | =head2 Custom per-subroutine check hooks | |
3424 | ||
3425 | XS code in an extension module can now annotate a subroutine (whether | |
3426 | implemented in XS or in Perl) so that nominated XS code will be called | |
3427 | at compile time (specifically as part of op checking) to change the op | |
3428 | tree of that subroutine. The compile-time check function (supplied by | |
3429 | the extension module) can implement argument processing that can't be | |
3430 | expressed as a prototype, generate customised compile-time warnings, | |
3431 | perform constant folding for a pure function, inline a subroutine | |
3432 | consisting of sufficiently simple ops, replace the whole call with a | |
3433 | custom op, and so on. This was previously all possible by hooking the | |
3434 | C<entersub> op checker, but the new mechanism makes it easy to tie the | |
3435 | hook to a specific subroutine. See L<perlapi/cv_set_call_checker>. | |
3436 | ||
3437 | To help in writing custom check hooks, several subtasks within standard | |
3438 | C<entersub> op checking have been separated out and exposed in the API. | |
3439 | ||
3440 | =head2 Improved support for custom OPs | |
3441 | ||
3442 | Custom ops can now be registered with the new C<custom_op_register> C | |
3443 | function and the C<XOP> structure. This will make it easier to add new | |
3444 | properties of custom ops in the future. Two new properties have been added | |
3445 | already, C<xop_class> and C<xop_peep>. | |
3446 | ||
3447 | C<xop_class> is one of the OA_*OP constants, and allows L<B> and other | |
3448 | introspection mechanisms to work with custom ops that aren't BASEOPs. | |
3449 | C<xop_peep> is a pointer to a function that will be called for ops of this | |
3450 | type from C<Perl_rpeep>. | |
3451 | ||
3452 | See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more | |
3453 | detail. | |
3454 | ||
3455 | The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still | |
3456 | supported but discouraged. | |
3457 | ||
1f539a1a FC |
3458 | =head2 Return value of C<delete $+{...}> |
3459 | ||
3460 | Custom regular expression engines can now determine the return value of | |
3461 | C<delete> on an entry of C<%+> or C<%->. | |
3462 | ||
3463 | XXX Mention the actual API. | |
3464 | ||
f8e88449 FC |
3465 | =head2 Changes to existing APIs |
3466 | ||
3467 | XXX This probably contains also internal changes unrelated to APIs. It | |
3468 | needs to be sorted out. Maybe we also need an ‘Other Changes’ or ‘Really | |
3469 | Internal Changes’ section. | |
3470 | ||
5076a392 FC |
3471 | =over 4 |
3472 | ||
3473 | =item * | |
3474 | ||
3475 | The protocol for unwinding the C stack at the last stage of a C<die> | |
3476 | has changed how it identifies the target stack frame. This now uses | |
3477 | a separate variable C<PL_restartjmpenv>, where previously it relied on | |
3478 | the C<blk_eval.cur_top_env> pointer in the C<eval> context frame that | |
3479 | has nominally just been discarded. This change means that code running | |
3480 | during various stages of Perl-level unwinding no longer needs to take | |
3481 | care to avoid destroying the ghost frame. | |
3482 | ||
3483 | =item * | |
3484 | ||
3485 | The format of entries on the scope stack has been changed, resulting in a | |
3486 | reduction of memory usage of about 10%. In particular, the memory used by | |
3487 | the scope stack to record each active lexical variable has been halved. | |
3488 | ||
3489 | =item * | |
3490 | ||
3491 | Memory allocation for pointer tables has been changed. Previously | |
3492 | C<Perl_ptr_table_store> allocated memory from the same arena system as C<SV> | |
3493 | bodies and C<HE>s, with freed memory remaining bound to those arenas until | |
3494 | interpreter exit. Now it allocates memory from arenas private to the specific | |
3495 | pointer table, and that memory is returned to the system when | |
3496 | C<Perl_ptr_table_free> is called. Additionally, allocation and release are both | |
3497 | less CPU intensive. | |
3498 | ||
3499 | =item * | |
3500 | ||
3501 | A new function, Perl_magic_methcall has been added that wraps the setup needed | |
3502 | to call a magic method like FETCH (the existing S_magic_methcall function has | |
3503 | been renamed S_magic_methcall1). | |
3504 | ||
3505 | =item * | |
3506 | ||
3507 | The implementation of sv_dup_inc() has changed from a macro to a function. | |
3508 | ||
3509 | =item * | |
3510 | ||
3511 | The C<find_rundefsvoffset> function has been deprecated. It appeared that | |
3512 | its design was insufficient to reliably get the lexical C<$_> at run-time. | |
3513 | ||
3514 | Use the new C<find_rundefsv> function or the C<UNDERBAR> macro instead. | |
3515 | They directly return the right SV representing C<$_>, whether it's lexical | |
3516 | or dynamic (789bd8 .. 03d5bc). | |
3517 | ||
3518 | =item * | |
3519 | ||
3520 | The following new functions or macros have been added to the public API: | |
3521 | C<SvNV_nomg>, C<sv_2nv_flags>, C<find_rundefsv>. | |
3522 | ||
3523 | =item * | |
3524 | ||
3525 | The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a | |
3526 | noop but should still be used to ensure past and future compatibility. | |
3527 | ||
3528 | =item * | |
3529 | ||
3530 | The ibcmp_* functions have been renamed and are now called foldEQ, | |
3531 | foldEQ_locale and foldEQ_utf8 (e6226b). | |
3532 | ||
3533 | =item * | |
3534 | ||
3535 | Under some circumstances, the C<CvGV()> field of a CV is now reference | |
3536 | counted. To ensure consistent behaviour, direct assignment to it, for | |
3537 | example C<CvGV(cv) = gv> is now a compile-time error. A new macro, | |
3538 | C<CvGV_set(cv,gv)> has been introduced to perform this operation safely. | |
3539 | Note that modification of this field is not part of of the public API, | |
3540 | regardless of this new macro. This change caused some | |
3541 | L<issues|/"Known Problems"> in modules that used the private C<GvGV()> | |
3542 | field. | |
3543 | ||
3544 | =item * | |
3545 | ||
3546 | It is now possible for XS code to hook into Perl's lexical scope | |
3547 | mechanism at compile time, using the new C<Perl_blockhook_register> | |
3548 | function. See L<perlguts/"Compile-time scope hooks">. | |
3549 | ||
3550 | =item * | |
3551 | ||
3552 | Added C<Perl_croak_no_modify()> to implement | |
3553 | C<Perl_croak("%s", PL_no_modify)> (6ad8f25) | |
3554 | ||
3555 | =item * | |
3556 | ||
3557 | Added prototypes for C<tie()> and C<untie()> to allow overloading (RT#75902) | |
3558 | (1db4d19) | |
3559 | ||
3560 | =item * | |
3561 | ||
3562 | Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>. C<my_stat()> and | |
3563 | C<my_lstat()> call get magic on the stack arg, so create C<_flags()> | |
3564 | variants that allow us to control this. (0d7d409) | |
3565 | ||
3566 | =item * | |
3567 | ||
3568 | Removed C<PERL_POLLUTE> | |
3569 | ||
3570 | The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for backwards | |
3571 | compatibility has been removed. It's use was always discouraged, and MakeMaker | |
3572 | contains a more specific escape hatch: | |
3573 | ||
3574 | perl Makefile.PL POLLUTE=1 | |
3575 | ||
3576 | This can be used for modules that have not been upgraded to 5.6 naming | |
3577 | conventions (and really should be completely obsolete by now). | |
3578 | ||
3579 | =item * | |
3580 | ||
3581 | Added C<PERL_STATIC_INLINE> | |
3582 | ||
3583 | The C<PERL_STATIC_INLINE> define has been added to provide the best-guess | |
3584 | incantation to use for static inline functions, if the C compiler supports | |
3585 | C99-style static inline. If it doesn't, it'll give a plain C<static>. | |
3586 | ||
3587 | C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports | |
3588 | inline functions. | |
3589 | ||
3590 | =item * | |
3591 | ||
3592 | C<CALL_FPTR> and C<CPERLscope> have been deprecated. | |
3593 | ||
3594 | Those are left from an old implementation of C<MULTIPLICITY> using C++ objects, | |
3595 | which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so | |
3596 | they shouldn't be used anymore. | |
3597 | ||
3598 | For compatibility, they are still defined for external C<XS> code. Only | |
3599 | extensions defining C<PERL_CORE> must be updated now. | |
3600 | ||
3601 | =item * | |
3602 | ||
3603 | C<lex_stuff_pvs()> has been added as a convenience macro wrapping | |
3604 | C<lex_stuff_pvn()> for literal strings. | |
3605 | ||
3606 | =item * | |
3607 | ||
3608 | The recursive part of the peephole optimizer is now hookable. | |
3609 | ||
3610 | In addition to C<PL_peepp>, for hooking into the toplevel peephole optimizer, a | |
3611 | C<PL_rpeepp> is now available to hook into the optimizer recursing into | |
3612 | side-chains of the optree. | |
3613 | ||
3614 | =item * | |
3615 | ||
3616 | See L</Regular expressions retain their localeness when interpolated>, | |
3617 | above. | |
3618 | ||
3619 | =item * | |
3620 | ||
3621 | The C<sv_cmp_flags>, C<sv_cmp_locale_flags>, C<sv_eq_flags> and | |
3622 | C<sv_collxfrm_flags> functions have been added. These are like their | |
3623 | non-_flags counterparts, but allow one to specify whether get-magic is | |
3624 | processed. | |
3625 | ||
3626 | The C<sv_cmp>, C<sv_cmp_locale>, C<sv_eq> and C<sv_collxfrm> functions have | |
3627 | been replaced with wrappers around the new functions. | |
3628 | ||
3629 | =item * | |
3630 | ||
3631 | A new C<sv_2bool_flags> function has been added. | |
3632 | ||
3633 | This is like C<sv_2bool>, but it lets the calling code decide whether | |
3634 | get-magic is handled. C<sv_2bool> is now a macro that calls the new | |
3635 | function. | |
3636 | ||
3637 | =item * | |
3638 | ||
3639 | A new macro, C<SvTRUE_nomg>, has been added. | |
3640 | ||
3641 | This is like C<SvTRUE>, except that it does not process magic. It uses the | |
3642 | new C<sv_2bool_flags> function. | |
3643 | ||
3644 | =item * | |
3645 | ||
3646 | C<sv_catsv_flags> no longer calls C<mg_get> on its second argument (the | |
3647 | source string) if the flags passed to it do not include SV_GMAGIC. So it | |
3648 | now matches the documentation. | |
3649 | ||
3650 | =item * | |
3651 | ||
3652 | A new interface has been added for custom check hooks on subroutines. See | |
3653 | L</Custom per-subroutine check hooks>, above. | |
3654 | ||
3655 | =item * | |
3656 | ||
3657 | List op building functions have been added to the | |
3658 | API. See L<op_append_elem|perlapi/op_append_elem>, | |
3659 | L<op_append_list|perlapi/op_append_list>, and | |
3660 | L<op_prepend_elem|perlapi/op_prepend_elem>. | |
3661 | ||
3662 | =item * | |
3663 | ||
3664 | The L<LINKLIST|perlapi/LINKLIST> macro, part of op building that | |
3665 | constructs the execution-order op chain, has been added to the API. | |
3666 | ||
3667 | =item * | |
3668 | ||
3669 | Many functions ending with pvn now have equivalent pv/pvs/sv versions. | |
3670 | ||
3671 | =item * | |
3672 | ||
3673 | The C<save_freeop>, C<save_op>, C<save_pushi32ptr> and C<save_pushptrptr> | |
3674 | functions have been added to the API. | |
3675 | ||
3676 | =item * | |
3677 | ||
3678 | The new API function C<parse_stmtseq()> parses a sequence of statements, up | |
3679 | to closing brace or EOF. | |
3680 | ||
3681 | =item * | |
3682 | ||
3683 | C<lex_start> has been added to the API, but is considered experimental. | |
3684 | ||
3685 | =item * | |
3686 | ||
3687 | A new C<parse_block> function has been added to the API [perl #78222]. | |
3688 | ||
3689 | =item * | |
3690 | ||
3691 | A new, experimental API has been added for accessing the internal | |
3692 | structure that Perl uses for C<%^H>. See the functions beginning with | |
3693 | C<cophh_> in L<perlapi>. | |
3694 | ||
3695 | =item * | |
3696 | ||
3697 | A stash can now have a list of effective names in addition to its usual | |
3698 | name. The first effective name can be accessed via the C<HvENAME> macro, | |
3699 | which is now the recommended name to use in MRO linearisations (C<HvNAME> | |
3700 | being a fallback if there is no C<HvENAME>). | |
3701 | ||
3702 | These names are added and deleted via C<hv_ename_add> and | |
3703 | C<hv_ename_delete>. These two functions are I<not> part of the API. | |
3704 | ||
3705 | =item * | |
3706 | ||
3707 | The way the parser handles labels has been cleaned up and refactored. As a | |
3708 | result, the C<newFOROP()> constructor function no longer takes a parameter | |
3709 | stating what label is to go in the state op. | |
3710 | ||
3711 | =item * | |
3712 | ||
3713 | The C<newWHILEOP()> and C<newFOROP()> functions no longer accept a line | |
3714 | number as a parameter. | |
3715 | ||
3716 | =item * | |
3717 | ||
3718 | A new C<parse_barestmt()> function has been added, for parsing a statement | |
3719 | without a label. | |
3720 | ||
3721 | =item * | |
3722 | ||
3723 | A new C<parse_label()> function has been added, that parses a statement | |
3724 | label, separate from statements. | |
3725 | ||
3726 | =item * | |
3727 | ||
3728 | The C<CvSTASH()> macro can now only be used as an rvalue. C<CvSTASH_set()> | |
3729 | has been added to replace assignment to C<CvSTASH()>. This is to ensure | |
3730 | that backreferences are handled properly. These macros are not part of the | |
3731 | API. | |
3732 | ||
3733 | =item * | |
3734 | ||
3735 | The C<op_scope()> and C<op_lvalue()> functions have been added to the API, | |
3736 | but are considered experimental. | |
3737 | ||
3738 | =item * | |
3739 | ||
3740 | The L<C<mg_findext()>|perlapi/mg_findext> and | |
3741 | L<C<sv_unmagicext()>|perlapi/sv_unmagicext> | |
3742 | functions have been added to the API. | |
3743 | They allow extension authors to find and remove magic attached to | |
3744 | scalars based on both the magic type and the magic virtual table, similar to how | |
3745 | C<sv_magicext()> attaches magic of a certain type and with a given virtual table | |
3746 | to a scalar. This eliminates the need for extensions to walk the list of | |
3747 | C<MAGIC> pointers of an C<SV> to find the magic that belongs to them. | |
3748 | ||
3749 | =item * | |
3750 | ||
3751 | The | |
3752 | L<C<parse_fullexpr()>|perlapi/parse_fullexpr>, | |
3753 | L<C<parse_listexpr()>|perlapi/parse_listexpr>, | |
3754 | L<C<parse_termexpr()>|perlapi/parse_termexpr>, and | |
3755 | L<C<parse_arithexpr()>|perlapi/parse_arithexpr> | |
3756 | functions have been added to the API. They perform | |
3757 | recursive-descent parsing of expressions at various precedence levels. | |
3758 | They are expected to be used by syntax plugins. | |
3759 | ||
3760 | =item * | |
3761 | ||
3762 | The opcode bodies for C<chop> and C<chomp> and for C<schop> and C<schomp> have | |
3763 | been merged. The implementation functions C<Perl_do_chop()> and | |
3764 | C<Perl_do_chomp()>, never part of the public API, have been merged and moved to | |
3765 | a static function in F<pp.c>. This shrinks the perl binary slightly, and should | |
3766 | not affect any code outside the core (unless it is relying on the order of side | |
3767 | effects when C<chomp> is passed a I<list> of values). | |
3768 | ||
3769 | =item * | |
3770 | ||
3771 | Some of the flags parameters to the uvuni_to_utf8_flags() and | |
3772 | utf8n_to_uvuni() have changed. This is a result of Perl now allowing | |
3773 | internal storage and manipulation of code points that are problematic | |
3774 | in some situations. Hence, the default actions for these functions has | |
3775 | been complemented to allow these code points. The new flags are | |
3776 | documented in L<perlapi>. Code that requires the problematic code | |
3777 | points to be rejected needs to change to use these flags. Some flag | |
3778 | names are retained for backward source compatibility, though they do | |
3779 | nothing, as they are now the default. However the flags | |
3780 | C<UNICODE_ALLOW_FDD0>, C<UNICODE_ALLOW_FFFF>, C<UNICODE_ILLEGAL>, and | |
3781 | C<UNICODE_IS_ILLEGAL> have been removed, as they stem from a | |
3782 | fundamentally broken model of how the Unicode non-character code points | |
3783 | should be handled, which is now described in | |
3784 | L<perlunicode/Non-character code points>. See also L</Selected Bug Fixes>. | |
3785 | ||
3786 | =item * | |
3787 | ||
3788 | Certain shared flags in the C<pmop.op_pmflags> and C<regexp.extflags> | |
3789 | structures have been removed. These are: C<Rxf_Pmf_LOCALE>, | |
3790 | C<Rxf_Pmf_UNICODE>, and C<PMf_LOCALE>. Instead there are encodes and | |
3791 | three static in-line functions for accessing the information: | |
3792 | C<get_regex_charset()>, C<set_regex_charset()>, and C<get_regex_charset_name()>, | |
3793 | which are defined in the places where the original flags were. | |
3794 | ||
3795 | =item * | |
3796 | ||
3797 | A new option has been added to C<pv_escape> to dump all characters above | |
3798 | ASCII in hexadecimal. Before, one could get all characters as hexadecimal | |
3799 | or the Latin1 non-ASCII as octal | |
3800 | ||
3801 | ||
3802 | =item * | |
3803 | ||
3804 | Generate pp_* prototypes in pp_proto.h, and remove pp.sym | |
3805 | ||
3806 | Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13 | |
3807 | locations that relied on them. | |
3808 | ||
3809 | regen/opcode.pl now generates prototypes for the PP functions directly, into | |
3810 | pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads | |
3811 | this, removing the only ordering dependency in the regen scripts. opcode.pl | |
3812 | is now responsible for prototypes for pp_* functions. (embed.pl remains | |
3813 | responsible for ck_* functions, reading from regen/opcodes) | |
3814 | ||
3815 | =item * | |
3816 | ||
3817 | Fix harmless invalid read in Perl_re_compile() (f6d9469) | |
3818 | ||
3819 | [perl #2460] described a case where electric fence reported an invalid | |
3820 | read. This could be reproduced under valgrind with blead and -e'/x/', | |
3821 | but only on a non-debugging build. | |
3822 | ||
3823 | This was because it was checking for certain pairs of nodes (e.g. BOL + END) | |
3824 | and wasn't allowing for EXACT nodes, which have the string at the next | |
3825 | node position when using a naive NEXTOPER(first). In the non-debugging | |
3826 | build, the nodes aren't initialised to zero, and a 1-char EXACT node isn't | |
3827 | long enough to spill into the type field of the "next node". | |
3828 | ||
3829 | Fix this by only using NEXTOPER(first) when we know the first node is | |
3830 | kosher. | |
3831 | ||
3832 | =item * | |
3833 | ||
3834 | Break out the generated function Perl_keywords() into F<keywords.c>, a new file. (26ea9e1) | |
3835 | ||
3836 | As it and Perl_yylex() both need FEATURE_IS_ENABLED, feature_is_enabled() is | |
3837 | no longer static, and the two macro definitions move from toke.c to perl.h | |
3838 | ||
3839 | Previously, one had to cut and paste the output of perl_keywords.pl into the | |
3840 | middle of toke.c, and it was not clear that it was generated code. | |
3841 | ||
3842 | =item * | |
3843 | ||
3844 | A lot of tests have been ported from Test to Test::More, e.g. in | |
3845 | 3842ad6. | |
3846 | ||
3847 | =item * | |
3848 | ||
3849 | Increase default PerlIO buffer size. (b83080d) | |
3850 | ||
3851 | The previous default size of a PerlIO buffer (4096 bytes) has been increased | |
3852 | to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling | |
3853 | this decade-old default increases read and write performance in the neighborhood | |
3854 | of 25% to 50% when using the default layers of perlio on top of unix. To choose | |
3855 | a non-default size, such as to get back the old value or to obtain and even | |
3856 | larger value, configure with: | |
3857 | ||
3858 | ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N | |
3859 | ||
3860 | where N is the desired size in bytes; it should probably be a multiple of | |
3861 | your page size. | |
3862 | ||
3863 | =back | |
3864 | ||
3865 | =head1 Selected Bug Fixes | |
3866 | ||
3867 | =over 4 | |
3868 | ||
3869 | =item * | |
3870 | ||
4ed2cea4 FC |
3871 | C<when(scalar){...}> no longer crashes, but produces a syntax error |
3872 | [perl #74114]. | |
3873 | ||
3874 | =item * | |
3875 | ||
3876 | The C-level C<lex_stuff_pvn> function would sometimes cause a spurious | |
3877 | syntax error on the last line of the file if it lacked a final semicolon | |
3878 | [perl #74006]. | |
3879 | ||
3880 | =item * | |
3881 | ||
3882 | The regular expression engine no longer loops when matching | |
3883 | C<"\N{LATIN SMALL LIGATURE FF}" =~ /f+/i> and similar expressions | |
3884 | [perl #72998]. | |
3885 | ||
3886 | =item * | |
3887 | ||
3888 | A label right before a string eval (C<foo: eval $string>) no longer causes | |
3889 | the label to be associated also with the first statement inside the eval | |
3890 | [perl #74290] (5.12.1). | |
3891 | ||
3892 | =item * | |
3893 | ||
5076a392 FC |
3894 | Naming a deprecated character in \N{...} will not leak memory. |
3895 | ||
3896 | =item * | |
3897 | ||
3898 | FETCH is no longer called needlessly on some tied variables. | |
3899 | ||
3900 | =item * | |
3901 | ||
3902 | The trie runtime code should no longer allocate massive amounts of memory, | |
3903 | fixing #74484. | |
3904 | ||
3905 | =item * | |
3906 | ||
3907 | Timely cleanup of SVs that are cloned into a new thread but then | |
3908 | discovered to be orphaned (i.e. their owners are -not- cloned) (e42956) | |
3909 | ||
3910 | =item * | |
3911 | ||
3912 | Don't accidentally clone lexicals in scope within active stack frames in | |
3913 | the parent when creating a child thread (RT #73086) (05d04d). | |
3914 | ||
3915 | =item * | |
3916 | ||
3917 | Avoid loading feature.pm when 'no 5.13.2;' or similar is | |
3918 | encountered (faee19). | |
3919 | ||
3920 | =item * | |
3921 | ||
3922 | Trap invalid use of SvIVX on SVt_REGEXP when assertions are on | |
3923 | (e77da3) | |
3924 | ||
3925 | =item * | |
3926 | ||
3927 | Don't stamp on $DB::single, $DB::trace and $DB::signal if they | |
3928 | already have values when $^P is assigned to (RT #72422) (4c0f30). | |
3929 | ||
3930 | =item * | |
3931 | ||
3932 | chop now correctly handles perl's extended UTF-8 (RT #73246) (65ab92) | |
3933 | ||
3934 | =item * | |
3935 | ||
3936 | Defer signal handling when shared SV locks are held to avoid | |
3937 | deadlocks (RT #74868) (65c742). | |
3938 | ||
3939 | =item * | |
3940 | ||
3941 | glob() no longer crashes when %File::Glob:: is empty and | |
3942 | CORE::GLOBAL::glob isn't present (4984aa). | |
3943 | ||
3944 | =item * | |
3945 | ||
3946 | perlbug now always permits the sender address to be changed | |
3947 | before sending - if you were having trouble sending bug reports before | |
3948 | now, this should fix it, we hope (e6eb90). | |
3949 | ||
3950 | =item * | |
3951 | ||
3952 | Overloading now works properly in conjunction with tied | |
3953 | variables. What formerly happened was that most ops checked their | |
3954 | arguments for overloading I<before> checking for magic, so for example | |
3955 | an overloaded object returned by a tied array access would usually be | |
3956 | treated as not overloaded (RT #57012) (6f1401, ed3b9b, 6a5f8c .. 24328f). | |
3957 | ||
3958 | =item * | |
3959 | ||
3960 | Independently, a bug was fixed that prevented $tied-E<gt>() from | |
3961 | always calling FETCH correctly (RT #8438) (7c7501) | |
3962 | ||
3963 | =item * | |
3964 | ||
3965 | Some work has been done on the internal pointers that link between symbol | |
3966 | tables (stashes), typeglobs and subroutines. This has the effect that | |
3967 | various edge cases related to deleting stashes or stash entries (e.g. | |
3968 | <%FOO:: = ()>), and complex typeglob or code reference aliasing, will no | |
3969 | longer crash the interpreter. | |
3970 | ||
3971 | =item * | |
3972 | ||
3973 | Fixed readline() when interrupted by signals so it no longer returns | |
3974 | the "same thing" as before or random memory | |
3975 | ||
3976 | =item * | |
3977 | ||
3978 | Fixed a regression of kill() when a match variable is used for the | |
3979 | process ID to kill (RT#75812) (8af710e) | |
3980 | ||
3981 | =item * | |
3982 | ||
3983 | Fixed several subtle bugs in sort() when @_ is accessed within a subroutine | |
3984 | used for sorting (RT#72334) (8f443ca) | |
3985 | ||
3986 | =item * | |
3987 | ||
3988 | Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691) | |
3989 | ||
3990 | =item * | |
3991 | ||
3992 | Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381) | |
3993 | ||
3994 | =item * | |
3995 | ||
3996 | Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa) | |
3997 | ||
3998 | =item * | |
3999 | ||
4000 | Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12 | |
4001 | (da8fb5d) | |
4002 | ||
4003 | =item * | |
4004 | ||
4005 | Avoids multiple FETCH/stringify on filetest ops (40c852d) | |
4006 | ||
4007 | =item * | |
4008 | ||
4009 | Fixed issue with string C<eval> not detecting taint of overloaded/tied | |
4010 | arguments (RT #75716) (895b760) | |
4011 | ||
4012 | =item * | |
4013 | ||
4014 | Fix potential crashes of string C<eval> when evaluating a object with | |
4015 | overloaded stringification by creating a stringified copy when necessary | |
4016 | (3e5c018) | |
4017 | ||
4018 | =item * | |
4019 | ||
4020 | Fixed bug where overloaded stringification could remove tainting | |
4021 | (RT #75716) (a02ec77) | |
4022 | ||
4023 | =item * | |
4024 | ||
4025 | Plugs more memory leaks in vms.c. (9e2bec0) | |
4026 | ||
4027 | =item * | |
4028 | ||
4029 | Fix pthread include error for Time::Piece (e9f284c) | |
4030 | ||
4031 | =item * | |
4032 | ||
4033 | A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set | |
4034 | C<@DB::args> has been fixed. | |
4035 | ||
4036 | =item * | |
4037 | ||
4038 | Several memory leaks when loading XS modules were fixed. | |
4039 | ||
4040 | =item * | |
4041 | ||
4042 | A panic in the regular expression optimizer has been fixed (RT#75762). | |
4043 | ||
4044 | =item * | |
4045 | ||
4046 | Assignments to lvalue subroutines now honor copy-on-write behavior again, which | |
4047 | has been broken since version 5.10.0 (RT#75656). | |
4048 | ||
4049 | =item * | |
4050 | ||
4051 | Assignments to glob copies now behave just like assignments to regular globs | |
4052 | (RT#1804). | |
4053 | ||
4054 | =item * | |
4055 | ||
4056 | Within signal handlers, C<$!> is now implicitly localized. | |
4057 | ||
4058 | =item * | |
4059 | ||
4060 | L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied | |
4061 | arguments. | |
4062 | ||
4063 | =item * | |
4064 | ||
4065 | L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">, | |
4066 | L<pos()|perlfunc/"index STR,SUBSTR,POSITION">, L<keys()|perlfunc/"keys HASH">, | |
4067 | and L<vec()|perlfunc/"vec EXPR,OFFSET,BITS"> could, when used in combination | |
4068 | with lvalues, result in leaking the scalar value they operate on, and cause its | |
4069 | destruction to happen too late. This has now been fixed. | |
4070 | ||
4071 | =item * | |
4072 | ||
4073 | Building with C<PERL_GLOBAL_STRUCT>, which has been broken accidentally in | |
4074 | 5.13.3, now works again. | |
4075 | ||
4076 | =item * | |
4077 | ||
4078 | A regression introduced in Perl 5.12.0, making | |
4079 | C<< my $x = 3; $x = length(undef) >> result in C<$x> set to C<3> has been | |
4080 | fixed. C<$x> will now be C<undef>. | |
4081 | ||
4082 | =item * | |
4083 | ||
4084 | A fatal error in regular expressions when processing UTF-8 data has been fixed [perl #75680]. | |
4085 | ||
4086 | =item * | |
4087 | ||
4088 | An erroneous regular expression engine optimization that caused regex verbs like | |
4089 | C<*COMMIT> to sometimes be ignored has been removed. | |
4090 | ||
4091 | =item * | |
4092 | ||
4093 | The Perl debugger now also works in taint mode [perl #76872]. | |
4094 | ||
4095 | =item * | |
4096 | ||
4097 | Several memory leaks in cloning and freeing threaded Perl interpreters have been | |
4098 | fixed [perl #77352]. | |
4099 | ||
4100 | =item * | |
4101 | ||
4102 | A possible string corruption when doing regular expression matches on overloaded | |
4103 | objects has been fixed [perl #77084]. | |
4104 | ||
4105 | =item * | |
4106 | ||
4107 | Magic applied to variables in the main package no longer affects other packages. | |
4108 | See L</Magic variables outside the main package> above [perl #76138]. | |
4109 | ||
4110 | =item * | |
4111 | ||
4112 | Opening a glob reference via C<< open $fh, "E<gt>", \*glob >> will no longer | |
4113 | cause the glob to be corrupted when the filehandle is printed to. This would | |
4114 | cause perl to crash whenever the glob's contents were accessed | |
4115 | [perl #77492]. | |
4116 | ||
4117 | =item * | |
4118 | ||
4119 | The postincrement and postdecrement operators, C<++> and C<-->, used to cause | |
4120 | leaks when being used on references. This has now been fixed. | |
4121 | ||
4122 | =item * | |
4123 | ||
4124 | A bug when replacing the glob of a loop variable within the loop has been fixed | |
4125 | [perl #21469]. This | |
4126 | means the following code will no longer crash: | |
4127 | ||
4128 | for $x (...) { | |
4129 | *x = *y; | |
4130 | } | |
4131 | ||
4132 | =item * | |
4133 | ||
4134 | Perl would segfault if the undocumented C<Internals> functions that used | |
4135 | reference prototypes were called with the C<&foo()> syntax, e.g. | |
4136 | C<&Internals::SvREADONLY(undef)> [perl #77776]. | |
4137 | ||
4138 | These functions now call C<SvROK> on their arguments before dereferencing them | |
4139 | with C<SvRV>, and we test for this case in F<t/lib/universal.t>. | |
4140 | ||
4141 | =item * | |
4142 | ||
4143 | When assigning a list with duplicated keys to a hash, the assignment used to | |
4144 | return garbage and/or freed values: | |
4145 | ||
4146 | @a = %h = (list with some duplicate keys); | |
4147 | ||
4148 | This has now been fixed [perl #31865]. | |
4149 | ||
4150 | =item * | |
4151 | ||
4152 | An earlier release of the 5.13 series of Perl changed the semantics of opening a | |
4153 | reference to a copy of a glob: | |
4154 | ||
4155 | my $var = *STDOUT; | |
4156 | open my $fh, '>', \$var; | |
4157 | ||
4158 | This was a mistake, and the previous behaviour from Perl 5.10 and 5.12, which is | |
4159 | to treat \$var as a scalar reference, has now been restored. | |
4160 | ||
4161 | =item * | |
4162 | ||
4163 | The regular expression bracketed character class C<[\8\9]> was effectively the | |
4164 | same as C<[89\000]>, incorrectly matching a NULL character. It also gave | |
4165 | incorrect warnings that the C<8> and C<9> were ignored. Now C<[\8\9]> is the | |
4166 | same as C<[89]> and gives legitimate warnings that C<\8> and C<\9> are | |
4167 | unrecognized escape sequences, passed-through. | |
4168 | ||
4169 | =item * | |
4170 | ||
4171 | C<warn()> and C<die()> now respect utf8-encoded scalars [perl #45549]. | |
4172 | ||
4173 | =item * | |
4174 | ||
4175 | A regular expression match in the right-hand side of a global substitution | |
4176 | (C<s///g>) that is in the same scope will no longer cause match variables | |
4177 | to have the wrong values on subsequent iterations. This can happen when an | |
4178 | array or hash subscript is interpolated in the right-hand side, as in | |
4179 | C<s|(.)|@a{ print($1), /./ }|g> [perl #19078]. | |
4180 | ||
4181 | =item * | |
4182 | ||
4183 | Constant-folding used to cause | |
4184 | ||
4185 | $text =~ ( 1 ? /phoo/ : /bear/) | |
4186 | ||
4187 | to turn into | |
4188 | ||
4189 | $text =~ /phoo/ | |
4190 | ||
4191 | at compile time. Now it correctly matches against C<$_> [perl #20444]. | |
4192 | ||
4193 | =item * | |
4194 | ||
4195 | Parsing Perl code (either with string C<eval> or by loading modules) from | |
4196 | within a C<UNITCHECK> block no longer causes the interpreter to crash | |
4197 | [perl #70614]. | |
4198 | ||
4199 | =item * | |
4200 | ||
4201 | When C<-d> is used on the shebang (C<#!>) line, the debugger now has access | |
4202 | to the lines of the main program. In the past, this sometimes worked and | |
4203 | sometimes did not, depending on what order things happened to be arranged | |
4204 | in memory [perl #71806]. | |
4205 | ||
4206 | =item * | |
4207 | ||
4208 | The C<y///> or C<tr///> operator now calls get-magic (e.g., the C<FETCH> | |
4209 | method of a tie) on its left-hand side just once, not twice [perl #76814]. | |
4210 | ||
4211 | =item * | |
4212 | ||
4213 | String comparison (C<eq>, C<ne>, C<lt>, C<gt>, C<le>, C<ge> and | |
4214 | C<cmp>) and logical not (C<not> and C<!>) operators no longer call magic | |
4215 | (e.g., tie methods) twice on their operands [perl #76814]. | |
4216 | ||
4217 | This bug was introduced in an earlier 5.13 release, and does not affect | |
4218 | perl 5.12. | |
4219 | ||
4220 | =item * | |
4221 | ||
4222 | When a tied (or other magic) variable is used as, or in, a regular | |
4223 | expression, it no longer has its C<FETCH> method called twice | |
4224 | [perl #76814]. | |
4225 | ||
4226 | This bug was introduced in an earlier 5.13 release, and does not affect | |
4227 | perl 5.12. | |
4228 | ||
4229 | =item * | |
4230 | ||
4231 | The C<-C> command line option can now be followed by other options | |
4232 | [perl #72434]. | |
4233 | ||
4234 | =item * | |
4235 | ||
4236 | Assigning a glob to a PVLV used to convert it to a plain string. Now it | |
4237 | works correctly, and a PVLV can hold a glob. This would happen when a | |
4238 | nonexistent hash or array element was passed to a subroutine: | |
4239 | ||
4240 | sub { $_[0] = *foo }->($hash{key}); | |
4241 | # $_[0] would have been the string "*main::foo" | |
4242 | ||
4243 | It also happened when a glob was assigned to, or returned from, an element | |
4244 | of a tied array or hash [perl #36051]. | |
4245 | ||
4246 | =item * | |
44691e6f | 4247 | |
5076a392 FC |
4248 | Creating a new thread when directory handles were open used to cause a |
4249 | crash, because the handles were not cloned, but simply passed to the new | |
4250 | thread, resulting in a double free. | |
44691e6f | 4251 | |
5076a392 FC |
4252 | Now directory handles are cloned properly, on systems that have a C<fchdir> |
4253 | function. On other systems, new threads simply do not inherit directory | |
4254 | handles from their parent threads [perl #75154]. | |
44691e6f | 4255 | |
5076a392 | 4256 | =item * |
44691e6f | 4257 | |
5076a392 FC |
4258 | The regular expression parser no longer hangs when parsing C<\18> and |
4259 | C<\88>. | |
44691e6f | 4260 | |
5076a392 FC |
4261 | This bug was introduced in version 5.13.5 and did not affect earlier |
4262 | versions [perl #78058]. | |
b7188eb5 | 4263 | |
5076a392 | 4264 | =item * |
b7188eb5 | 4265 | |
5076a392 | 4266 | Subroutine redefinition works once more in the debugger [perl #48332]. |
44691e6f | 4267 | |
5076a392 | 4268 | =item * |
658a9f31 | 4269 | |
5076a392 FC |
4270 | The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments |
4271 | [perl #20661]. | |
658a9f31 | 4272 | |
5076a392 | 4273 | =item * |
658a9f31 | 4274 | |
5076a392 FC |
4275 | Stringifying a scalar containing -0.0 no longer has the affect of turning |
4276 | false into true [perl #45133]. | |
b7188eb5 | 4277 | |
5076a392 | 4278 | =item * |
b7188eb5 | 4279 | |
5076a392 FC |
4280 | Aliasing packages by assigning to globs or deleting packages by deleting |
4281 | their containing stash elements used to have erratic effects on method | |
4282 | resolution, because the internal 'isa' caches were not reset. This has been | |
4283 | fixed. | |
b7188eb5 | 4284 | |
5076a392 | 4285 | =item * |
3aa0ac5a | 4286 | |
5076a392 FC |
4287 | C<sort> with a custom sort routine could crash if too many nested |
4288 | subroutine calls occurred from within the sort routine [perl #77930]. | |
3aa0ac5a | 4289 | |
5076a392 FC |
4290 | This bug was introduced in an earlier 5.13 release, and did not affect |
4291 | perl 5.12. | |
3aa0ac5a | 4292 | |
5076a392 | 4293 | =item * |
3aa0ac5a | 4294 | |
5076a392 FC |
4295 | The C<eval_sv> and C<eval_pv> C functions now set C<$@> correctly when |
4296 | there is a syntax error and no C<G_KEEPERR> flag, and never set it if the | |
4297 | C<G_KEEPERR> flag is present [perl #3719]. | |
270ca148 | 4298 | |
5076a392 | 4299 | =item * |
270ca148 | 4300 | |
5076a392 FC |
4301 | Nested C<map> and C<grep> blocks no longer leak memory when processing |
4302 | large lists [perl #48004]. | |
270ca148 | 4303 | |
5076a392 | 4304 | =item * |
44691e6f | 4305 | |
5076a392 | 4306 | Malformed C<version> objects no longer cause crashes [perl #78286]. |
44691e6f AB |
4307 | |
4308 | =item * | |
4309 | ||
5076a392 FC |
4310 | The interpreter no longer crashes when freeing deeply-nested arrays of |
4311 | arrays. Hashes have not been fixed yet [perl #44225]. | |
44691e6f | 4312 | |
5076a392 | 4313 | =item * |
44691e6f | 4314 | |
5076a392 FC |
4315 | The mechanism for freeing objects in globs used to leave dangling |
4316 | pointers to freed SVs, meaning Perl users could see corrupted state | |
4317 | during destruction. | |
44691e6f | 4318 | |
5076a392 FC |
4319 | Perl now only frees the affected slots of the GV, rather than freeing |
4320 | the GV itself. This makes sure that there are no dangling refs or | |
4321 | corrupted state during destruction. | |
65484cb9 | 4322 | |
5076a392 | 4323 | =item * |
b7188eb5 | 4324 | |
5076a392 FC |
4325 | The typeglob C<*,>, which holds the scalar variable C<$,> (output field |
4326 | separator), had the wrong reference count in child threads. | |
911a3729 | 4327 | |
5076a392 FC |
4328 | =item * |
4329 | ||
4330 | C<splice> now calls set-magic. This means that, for instance, changes made | |
4331 | by C<splice @ISA> are respected by method calls [perl #78400]. | |
452d0b70 DG |
4332 | |
4333 | =item * | |
4334 | ||
5076a392 | 4335 | C<use v5.8> no longer leaks memory [perl #78436]. |
911a3729 | 4336 | |
5076a392 | 4337 | =item * |
c8c13991 | 4338 | |
5076a392 FC |
4339 | The XS multicall API no longer causes subroutines to lose reference counts |
4340 | if called via the multicall interface from within those very subroutines. | |
4341 | This affects modules like List::Util. Calling one of its functions with an | |
4342 | active subroutine as the first argument could cause a crash [perl #78070]. | |
c8c13991 | 4343 | |
5076a392 FC |
4344 | =item * |
4345 | ||
4346 | The C<parse_stmt> C function added in earlier in the 5.13.x series has been | |
4347 | fixed to work with statements ending with C<}> [perl #78222]. | |
44691e6f | 4348 | |
f00d3350 BR |
4349 | =item * |
4350 | ||
5076a392 FC |
4351 | The C<parse_fullstmt> C function added in 5.13.5 has been fixed to work |
4352 | when called while an expression is being parsed. | |
fe3de278 | 4353 | |
5076a392 | 4354 | =item * |
35cdccfc | 4355 | |
5076a392 FC |
4356 | Characters in the Latin-1 non-ASCII range (0x80 to 0xFF) used not to match |
4357 | themselves if the string happened to be UTF8-encoded internally, the | |
4358 | regular expression was not, and the character in the regular expression was | |
4359 | inside a repeated group (e.g., | |
4360 | C<Encode::decode_utf8("\303\200") =~ /(\xc0)+/>) [perl #78464]. | |
35cdccfc | 4361 | |
5076a392 FC |
4362 | =item * |
4363 | ||
4364 | The C<(?d)> regular expression construct now overrides a previous C<(?u)> | |
4365 | or C<use feature "unicode_string"> [perl #78508]. | |
f5c40488 CBW |
4366 | |
4367 | =item * | |
4368 | ||
5076a392 FC |
4369 | A memory leak in C<do "file">, introduced in perl 5.13.6, has been fixed |
4370 | [perl #78488]. | |
b7188eb5 | 4371 | |
5076a392 | 4372 | =item * |
b7188eb5 | 4373 | |
5076a392 FC |
4374 | Various bugs related to typeglob dereferencing have been fixed. See |
4375 | L</Dereferencing typeglobs>, above. | |
0bb35765 | 4376 | |
5076a392 | 4377 | =item * |
911a3729 | 4378 | |
5076a392 FC |
4379 | The C<SvPVbyte> function available to XS modules now calls magic before |
4380 | downgrading the SV, to avoid warnings about wide characters [perl #72398]. | |
911a3729 | 4381 | |
5076a392 | 4382 | =item * |
58f55cb3 | 4383 | |
5076a392 FC |
4384 | The C<=> operator used to ignore magic (e.g., tie methods) on its |
4385 | right-hand side if the scalar happened to hold a typeglob. This could | |
4386 | happen if a typeglob was the last thing returned from or assigned to a tied | |
4387 | scalar [perl #77498]. | |
58f55cb3 | 4388 | |
5076a392 | 4389 | =item * |
6b3df227 | 4390 | |
5076a392 FC |
4391 | C<sprintf> was ignoring locales when called with constant arguments |
4392 | [perl #78632]. | |
6b3df227 | 4393 | |
5076a392 | 4394 | =item * |
c9989a74 | 4395 | |
5076a392 FC |
4396 | A non-ASCII character in the Latin-1 range could match both a Posix |
4397 | class, such as C<[[:alnum:]]>, and its inverse C<[[:^alnum:]]>. This is | |
4398 | now fixed for regular expressions compiled under the C<"u"> modifier. | |
4399 | See L</C<use feature "unicode_strings"> now applies to more regex matching>. [perl #18281]. | |
c9989a74 | 4400 | |
5076a392 FC |
4401 | =item * |
4402 | ||
4403 | Concatenating long strings under C<use encoding> no longer causes perl to | |
4404 | crash [perl #78674]. | |
b7188eb5 FC |
4405 | |
4406 | =item * | |
4407 | ||
5076a392 FC |
4408 | Typeglob assignments would crash if the glob's stash no longer existed, so |
4409 | long as the glob assigned to was named 'ISA' or the glob on either side of | |
4410 | the assignment contained a subroutine. | |
911a3729 | 4411 | |
5076a392 |