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