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