Commit | Line | Data |
---|---|---|
4b8803f0 RS |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | perl5240delta - what is new for perl v5.24.0 | |
6 | ||
7 | =head1 DESCRIPTION | |
8 | ||
9 | This document describes the differences between the 5.22.0 release and the | |
10 | 5.24.0 release. | |
11 | ||
12 | =head1 Core Enhancements | |
13 | ||
14 | =head2 Postfix dereferencing is no longer experimental | |
15 | ||
16 | Using the C<postderef> and C<postderef_qq> features no longer emits a | |
17 | warning. Existing code that disables the C<experimental::postderef> warning | |
18 | category that they previously used will continue to work. The C<postderef> | |
19 | feature has no effect; all Perl code can use postfix dereferencing, | |
20 | regardless of what feature declarations are in scope. The C<5.24> feature | |
21 | bundle now includes the C<postderef_qq> feature. | |
22 | ||
23 | =head2 Unicode 8.0 is now supported | |
24 | ||
25 | For details on what is in this release, see | |
26 | L<http://www.unicode.org/versions/Unicode8.0.0/>. | |
27 | ||
28 | =head2 perl will now croak when closing an in-place output file fails | |
29 | ||
30 | Until now, failure to close the output file for an in-place edit was not | |
31 | detected, meaning that the input file could be clobbered without the edit being | |
32 | successfully completed. Now, when the output file cannot be closed | |
33 | successfully, an exception is raised. | |
34 | ||
35 | =head2 New C<\b{lb}> boundary in regular expressions | |
36 | ||
37 | C<lb> stands for Line Break. It is a Unicode property | |
38 | that determines where a line of text is suitable to break (typically so | |
39 | that it can be output without overflowing the available horizontal | |
40 | space). This capability has long been furnished by the | |
41 | L<Unicode::LineBreak> module, but now a light-weight, non-customizable | |
42 | version that is suitable for many purposes is in core Perl. | |
43 | ||
44 | =head2 C<qr/(?[ ])/> now works in UTF-8 locales | |
45 | ||
46 | L<Extended Bracketed Character Classes|perlrecharclass/Extended Bracketed Character Classes> | |
47 | now will successfully compile when S<C<use locale>> is in effect. The compiled | |
48 | pattern will use standard Unicode rules. If the runtime locale is not a | |
49 | UTF-8 one, a warning is raised and standard Unicode rules are used | |
50 | anyway. No tainting is done since the outcome does not actually depend | |
51 | on the locale. | |
52 | ||
53 | =head2 Integer shift (C<< << >> and C<< >> >>) now more explicitly defined | |
54 | ||
55 | Negative shifts are reverse shifts: left shift becomes right shift, | |
56 | and right shift becomes left shift. | |
57 | ||
58 | Shifting by the number of bits in a native integer (or more) is zero, | |
59 | except when the "overshift" is right shifting a negative value under | |
60 | C<use integer>, in which case the result is -1 (arithmetic shift). | |
61 | ||
62 | Until now negative shifting and overshifting have been undefined | |
63 | because they have relied on whatever the C implementation happens | |
64 | to do. For example, for the overshift a common C behavior is | |
65 | "modulo shift": | |
66 | ||
67 | 1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1 # Common C behavior. | |
68 | ||
69 | # And the same for <<, while Perl now produces 0 for both. | |
70 | ||
71 | Now these behaviors are well-defined under Perl, regardless of what | |
72 | the underlying C implementation does. Note, however, that you are still | |
73 | constrained by the native integer width: you need to know how far left you | |
74 | can go. You can use for example: | |
75 | ||
76 | use Config; | |
77 | my $wordbits = $Config{uvsize} * 8; # Or $Config{uvsize} << 3. | |
78 | ||
79 | If you need a more bits on the left shift, you can use for example | |
80 | the C<bigint> pragma, or the C<Bit::Vector> module from CPAN. | |
81 | ||
82 | =head2 printf and sprintf now allow reordered precision arguments | |
83 | ||
84 | That is, C<< sprintf '|%.*2$d|', 2, 3 >> now returns C<|002|>. This extends | |
85 | the existing reordering mechanism (which allows reordering for arguments | |
86 | that are used as format fields, widths, and vector separators). | |
87 | ||
88 | =head2 More fields provided to C<sigaction> callback with C<SA_SIGINFO> | |
89 | ||
90 | When passing the C<SA_SIGINFO> flag to L<sigaction|POSIX/sigaction>, the | |
91 | C<errno>, C<status>, C<uid>, C<pid>, C<addr> and C<band> fields are now | |
92 | included in the hash passed to the handler, if supported by the | |
93 | platform. | |
94 | ||
95 | =head2 Hashbang redirection to Perl 6 | |
96 | ||
97 | Previously perl would redirect to another interpreter if it found a | |
98 | hashbang path unless the path contains "perl" (see L<perlrun>). To improve | |
99 | compatability with Perl 6 this behavior has been extended to also redirect | |
100 | if "perl" is followed by "6". | |
101 | ||
102 | =head1 Security | |
103 | ||
104 | =head2 Set proper umask before calling C<mkstemp(3)> | |
105 | ||
106 | In 5.22 perl started setting umask to 0600 before calling C<mkstemp(3)> | |
107 | and restoring it afterwards. This wrongfully tells C<open(2)> to strip | |
108 | the owner read and write bits from the given mode before applying it, | |
109 | rather than the intended negation of leaving only those bits in place. | |
110 | ||
111 | Systems that use mode 0666 in C<mkstemp(3)> (like old versions of | |
112 | glibc) create a file with permissions 0066, leaving world read and | |
113 | write permissions regardless of current umask. | |
114 | ||
115 | This has been fixed by using umask 0177 instead. [perl #127322] | |
116 | ||
117 | =head2 Fix out of boundary access in Win32 path handling | |
118 | ||
119 | This is CVE-2015-8608. For more information see | |
120 | L<[perl #126755]|https://rt.perl.org/Ticket/Display.html?id=126755> | |
121 | ||
122 | =head2 Fix loss of taint in canonpath | |
123 | ||
124 | This is CVE-2015-8607. For more information see | |
125 | L<[perl #126862]|https://rt.perl.org/Ticket/Display.html?id=126862> | |
126 | ||
127 | =head2 Avoid accessing uninitialized memory in win32 C<crypt()> | |
128 | ||
129 | Added validation that will detect both a short salt and invalid characters | |
130 | in the salt. | |
131 | L<[perl #126922]|https://rt.perl.org/Ticket/Display.html?id=126922> | |
132 | ||
133 | =head2 Remove duplicate environment variables from C<environ> | |
134 | ||
135 | Previously, if an environment variable appeared more than once in | |
136 | C<environ[]>, C<%ENV> would contain the last entry for that name, | |
137 | while a typical C<getenv()> would return the first entry. We now | |
138 | make sure C<%ENV> contains the same as what C<getenv> returns. | |
139 | ||
140 | Second, we remove duplicates from C<environ[]>, so if a setting | |
141 | with that name is set in C<%ENV>, we won't pass an unsafe value | |
142 | to a child process. | |
143 | ||
144 | [CVE-2016-2381] | |
145 | ||
146 | =head1 Incompatible Changes | |
147 | ||
148 | =head2 The C<autoderef> feature has been removed | |
149 | ||
150 | The experimental C<autoderef> feature (which allowed calling C<push>, | |
151 | C<pop>, C<shift>, C<unshift>, C<splice>, C<keys>, C<values>, and C<each> on | |
152 | a scalar argument) has been deemed unsuccessful. It has now been removed; | |
153 | trying to use the feature (or to disable the C<experimental::autoderef> | |
154 | warning it previously triggered) now yields an exception. | |
155 | ||
156 | =head2 Lexical $_ has been removed | |
157 | ||
158 | C<my $_> was introduced in Perl 5.10, and subsequently caused much confusion | |
159 | with no obvious solution. In Perl 5.18.0, it was made experimental on the | |
160 | theory that it would either be removed or redesigned in a less confusing (but | |
161 | backward-incompatible) way. Over the following years, no alternatives were | |
162 | proposed. The feature has now been removed and will fail to compile. | |
163 | ||
164 | =head2 C<qr/\b{wb}/> is now tailored to Perl expectations | |
165 | ||
166 | This is now more suited to be a drop-in replacement for plain C<\b>, but | |
167 | giving better results for parsing natural language. Previously it | |
168 | strictly followed the current Unicode rules which calls for it to match | |
169 | between each white space character. Now it doesn't generally match | |
170 | within spans of white space, behaving like C<\b> does. See | |
171 | L<perlrebackslash/\b{wb}> | |
172 | ||
173 | =head2 Regular expression compilation errors | |
174 | ||
175 | Some regular expression patterns that had runtime errors now | |
176 | don't compile at all. | |
177 | ||
178 | Almost all Unicode properties using the C<\p{}> and C<\P{}> regular | |
179 | expression pattern constructs are now checked for validity at pattern | |
180 | compilation time, and invalid ones will cause the program to not | |
181 | compile. In earlier releases, this check was often deferred until run | |
182 | time. Whenever an error check is moved from run- to compile time, | |
183 | erroneous code is caught 100% of the time, whereas before it would only | |
184 | get caught if and when the offending portion actually gets executed, | |
185 | which for unreachable code might be never. | |
186 | ||
187 | =head2 C<qr/\N{}/> now disallowed under C<use re "strict"> | |
188 | ||
189 | An empty C<\N{}> makes no sense, but for backwards compatibility is | |
190 | accepted as doing nothing, though a deprecation warning is raised by | |
191 | default. But now this is a fatal error under the experimental feature | |
192 | L<re/'strict' mode>. | |
193 | ||
194 | =head2 Nested declarations are now disallowed | |
195 | ||
196 | A C<my>, C<our>, or C<state> declaration is no longer allowed inside | |
197 | of another C<my>, C<our>, or C<state> declaration. | |
198 | ||
199 | For example, these are now fatal: | |
200 | ||
201 | my ($x, my($y)); | |
202 | our (my $x); | |
203 | ||
204 | L<[perl #125587]|https://rt.perl.org/Ticket/Display.html?id=125587> | |
205 | ||
206 | L<[perl #121058]|https://rt.perl.org/Ticket/Display.html?id=121058> | |
207 | ||
208 | =head2 The C</\C/> character class has been removed. | |
209 | ||
210 | This regular expression character class was deprecated in v5.20.0 and has | |
211 | produced a deprecation warning since v5.22.0. It is now a compile-time | |
212 | error. If you need to examine the individual bytes that make up a | |
213 | UTF8-encoded character, then use C<utf8::encode()> on the string (or a | |
214 | copy) first. | |
215 | ||
216 | =head2 C<chdir('')> no longer chdirs home | |
217 | ||
218 | Using C<chdir('')> or C<chdir(undef)> to chdir home has been deprecated since | |
219 | perl v5.8, and will now fail. Use C<chdir()> instead. | |
220 | ||
221 | =head2 ASCII characters in variable names must now be all visible | |
222 | ||
223 | It was legal until now on ASCII platforms for variable names to contain | |
224 | non-graphical ASCII control characters (ordinals 0 through 31, and 127, | |
225 | which are the C0 controls and C<DELETE>). This usage has been | |
226 | deprecated since v5.20, and as of now causes a syntax error. The | |
227 | variables these names referred to are special, reserved by Perl for | |
228 | whatever use it may choose, now, or in the future. Each such variable | |
229 | has an alternative way of spelling it. Instead of the single | |
230 | non-graphic control character, a two character sequence beginning with a | |
231 | caret is used, like C<$^]> and C<${^GLOBAL_PHASE}>. Details are at | |
232 | L<perlvar>. It remains legal, though unwise and deprecated (raising a | |
233 | deprecation warning), to use certain non-graphic non-ASCII characters in | |
234 | variables names when not under S<C<use utf8>>. No code should do this, | |
235 | as all such variables are reserved by Perl, and Perl doesn't currently | |
236 | define any of them (but could at any time, without notice). | |
237 | ||
238 | =head2 An off by one issue in C<$Carp::MaxArgNums> has been fixed | |
239 | ||
240 | C<$Carp::MaxArgNums> is supposed to be the number of arguments to display. | |
241 | Prior to this version, it was instead showing C<$Carp::MaxArgNums> + 1 arguments, | |
242 | contrary to the documentation. | |
243 | ||
244 | =head2 Only blanks and tabs are now allowed within C<[...]> within C<(?[...])>. | |
245 | ||
246 | The experimental Extended Bracketed Character Classes can contain regular | |
247 | bracketed character classes within them. These differ from regular ones in | |
248 | that white space is generally ignored, unless escaped by preceding it with a | |
249 | backslash. The white space that is ignored is now limited to just tab C<\t> | |
250 | and SPACE characters. Previously, it was any white space. See | |
251 | L<perlrecharclass/Extended Bracketed Character Classes>. | |
252 | ||
253 | =head1 Deprecations | |
254 | ||
255 | =head2 Using code points above the platform's C<IV_MAX> is now deprecated | |
256 | ||
257 | Unicode defines code points in the range C<0..0x10FFFF>. Some standards | |
258 | at one time defined them up to 2**31 - 1, but Perl has allowed them to | |
259 | be as high as anything that will fit in a word on the platform being | |
260 | used. However, use of those above the platform's C<IV_MAX> is broken in | |
261 | some constructs, notably C<tr///>, regular expression patterns involving | |
262 | quantifiers, and in some arithmetic and comparison operations, such as | |
263 | being the upper limit of a loop. Now the use of such code points raises | |
264 | a deprecation warning, unless that warning category is turned off. | |
265 | C<IV_MAX> is typically 2**31 -1 on 32-bit platforms, and 2**63-1 on | |
266 | 64-bit ones. | |
267 | ||
268 | =head2 Doing bitwise operations on strings containing code points above | |
269 | 0xFF is deprecated | |
270 | ||
271 | The string bitwise operators treat their operands as strings of bytes, | |
272 | and values beyond 0xFF are nonsensical in this context. To operate on | |
273 | encoded bytes, first encode the strings. To operate on code points' | |
274 | numeric values, use C<split> and C<map ord>. In the future, this | |
275 | warning will be replaced by an exception. | |
276 | ||
277 | =head2 C<sysread()>, C<syswrite()>, C<recv()> and C<send()> are deprecated on | |
278 | :utf8 handles | |
279 | ||
280 | The C<sysread()>, C<recv()>, C<syswrite()> and C<send()> operators | |
281 | are deprecated on handles that have the C<:utf8> layer, either | |
282 | explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer. | |
283 | ||
284 | Both C<sysread()> and C<recv()> currently use only the C<:utf8> flag for the | |
285 | stream, ignoring the actual layers. Since C<sysread()> and C<recv()> do no | |
286 | UTF-8 validation they can end up creating invalidly encoded scalars. | |
287 | ||
288 | Similarly, C<syswrite()> and C<send()> use only the C<:utf8> flag, otherwise | |
289 | ignoring any layers. If the flag is set, both write the value UTF-8 | |
290 | encoded, even if the layer is some different encoding, such as the | |
291 | example above. | |
292 | ||
293 | Ideally, all of these operators would completely ignore the C<:utf8> | |
294 | state, working only with bytes, but this would result in silently | |
295 | breaking existing code. To avoid this a future version of perl will | |
296 | throw an exception when any of C<sysread()>, C<recv()>, C<syswrite()> or C<send()> | |
297 | are called on handle with the C<:utf8> layer. | |
298 | ||
299 | =head1 Performance Enhancements | |
300 | ||
301 | =over 4 | |
302 | ||
303 | =item * | |
304 | ||
305 | The overhead of scope entry and exit has been considerably reduced, so | |
306 | for example subroutine calls, loops and basic blocks are all faster now. | |
307 | This empty function call now takes about a third less time to execute: | |
308 | ||
309 | sub f{} f(); | |
310 | ||
311 | =item * | |
312 | ||
313 | Many languages, such as Chinese, are caseless. Perl now knows about | |
314 | most common ones, and skips much of the work when | |
315 | a program tries to change case in them (like C<ucfirst()>) or match | |
316 | caselessly (C<qr//i>). This will speed up a program, such as a web | |
317 | server, that can operate on multiple languages, while it is operating on a | |
318 | caseless one. | |
319 | ||
320 | =item * | |
321 | ||
322 | C</fixed-substr/> has been made much faster. | |
323 | ||
324 | On platforms with a libc C<memchr()> implementation which makes good use of | |
325 | underlying hardware support, patterns which include fixed substrings will now | |
326 | often be much faster; for example with glibc on a recent x86_64 CPU, this: | |
327 | ||
328 | $s = "a" x 1000 . "wxyz"; | |
329 | $s =~ /wxyz/ for 1..30000 | |
330 | ||
331 | is now about 7 times faster. On systems with slow C<memchr()>, e.g. 32-bit ARM | |
332 | Raspberry Pi, there will be a small or little speedup. Conversely, some | |
333 | pathological cases, such as C<"ab" x 1000 =~ /aa/> will be slower now; up to 3 | |
334 | times slower on the rPi, 1.5x slower on x86_64. | |
335 | ||
336 | =item * | |
337 | ||
338 | Faster addition, subtraction and multiplication. | |
339 | ||
340 | Since 5.8.0, arithmetic became slower due to the need to support | |
341 | 64-bit integers. To deal with 64-bit integers, a lot more corner | |
342 | cases need to be checked, which adds time. We now detect common | |
343 | cases where there is no need to check for those corner cases, | |
344 | and special-case them. | |
345 | ||
346 | =item * | |
347 | ||
348 | Preincrement, predecrement, postincrement, and postdecrement have been | |
349 | made faster by internally splitting the functions which handled multiple | |
350 | cases into different functions. | |
351 | ||
352 | =item * | |
353 | ||
354 | Creating Perl debugger data structures (see L<perldebguts/"Debugger Internals">) | |
355 | for XSUBs and const subs has been removed. This removed one glob/scalar combo | |
356 | for each unique C<.c> file that XSUBs and const subs came from. On startup | |
357 | (C<perl -e"0">) about half a dozen glob/scalar debugger combos were created. | |
358 | Loading XS modules created more glob/scalar combos. These things were | |
359 | being created regardless of whether the perl debugger was being used, | |
360 | and despite the fact that it can't debug C code anyway | |
361 | ||
362 | =item * | |
363 | ||
364 | On Win32, C<stat>ing or C<-X>ing a path, if the file or directory does not | |
365 | exist, is now 3.5x faster than before. | |
366 | ||
367 | =item * | |
368 | ||
369 | Single arguments in list assign are now slightly faster: | |
370 | ||
371 | ($x) = (...); | |
372 | (...) = ($x); | |
373 | ||
374 | =item * | |
375 | ||
376 | Less peak memory is now used when compiling regular expression patterns. | |
377 | ||
378 | =back | |
379 | ||
380 | =head1 Modules and Pragmata | |
381 | ||
382 | =head2 Updated Modules and Pragmata | |
383 | ||
384 | =over | |
385 | ||
386 | =item * | |
387 | ||
388 | L<arybase> has been upgraded from version 0.10 to 0.11. | |
389 | ||
390 | =item * | |
391 | ||
392 | L<Attribute::Handlers> has been upgraded from version 0.97 to 0.99. | |
393 | ||
394 | =item * | |
395 | ||
396 | L<autodie> has been upgraded from version 2.26 to 2.29. | |
397 | ||
398 | =item * | |
399 | ||
400 | L<autouse> has been upgraded from version 1.08 to 1.11. | |
401 | ||
402 | =item * | |
403 | ||
404 | L<B> has been upgraded from version 1.58 to 1.62. | |
405 | ||
406 | =item * | |
407 | ||
408 | L<B::Deparse> has been upgraded from version 1.35 to 1.37. | |
409 | ||
410 | =item * | |
411 | ||
412 | L<base> has been upgraded from version 2.22 to 2.23. | |
413 | ||
414 | =item * | |
415 | ||
416 | L<Benchmark> has been upgraded from version 1.2 to 1.22. | |
417 | ||
418 | =item * | |
419 | ||
420 | L<bignum> has been upgraded from version 0.39 to 0.42. | |
421 | ||
422 | =item * | |
423 | ||
424 | L<bytes> has been upgraded from version 1.04 to 1.05. | |
425 | ||
426 | =item * | |
427 | ||
428 | L<Carp> has been upgraded from version 1.36 to 1.40. | |
429 | ||
430 | =item * | |
431 | ||
432 | L<Compress::Raw::Bzip2> has been upgraded from version 2.068 to 2.069. | |
433 | ||
434 | =item * | |
435 | ||
436 | L<Compress::Raw::Zlib> has been upgraded from version 2.068 to 2.069. | |
437 | ||
438 | =item * | |
439 | ||
440 | L<Config::Perl::V> has been upgraded from version 0.24 to 0.25. | |
441 | ||
442 | =item * | |
443 | ||
444 | L<CPAN::Meta> has been upgraded from version 2.150001 to 2.150005. | |
445 | ||
446 | =item * | |
447 | ||
448 | L<CPAN::Meta::Requirements> has been upgraded from version 2.132 to 2.140. | |
449 | ||
450 | =item * | |
451 | ||
452 | L<CPAN::Meta::YAML> has been upgraded from version 0.012 to 0.018. | |
453 | ||
454 | =item * | |
455 | ||
456 | L<Data::Dumper> has been upgraded from version 2.158 to 2.160. | |
457 | ||
458 | =item * | |
459 | ||
460 | L<Devel::Peek> has been upgraded from version 1.22 to 1.23. | |
461 | ||
462 | =item * | |
463 | ||
464 | L<Devel::PPPort> has been upgraded from version 3.31 to 3.32. | |
465 | ||
466 | =item * | |
467 | ||
468 | L<Dumpvalue> has been upgraded from version 1.17 to 1.18. | |
469 | ||
470 | =item * | |
471 | ||
472 | L<DynaLoader> has been upgraded from version 1.32 to 1.38. | |
473 | ||
474 | =item * | |
475 | ||
476 | L<Encode> has been upgraded from version 2.72 to 2.80. | |
477 | ||
478 | =item * | |
479 | ||
480 | L<encoding> has been upgraded from version 2.14 to 2.17. | |
481 | ||
482 | =item * | |
483 | ||
484 | L<encoding::warnings> has been upgraded from version 0.11 to 0.12. | |
485 | ||
486 | =item * | |
487 | ||
488 | L<English> has been upgraded from version 1.09 to 1.10. | |
489 | ||
490 | =item * | |
491 | ||
492 | L<Errno> has been upgraded from version 1.23 to 1.25. | |
493 | ||
494 | =item * | |
495 | ||
496 | L<experimental> has been upgraded from version 0.013 to 0.016. | |
497 | ||
498 | =item * | |
499 | ||
500 | L<ExtUtils::CBuilder> has been upgraded from version 0.280221 to 0.280225. | |
501 | ||
502 | =item * | |
503 | ||
504 | L<ExtUtils::Embed> has been upgraded from version 1.32 to 1.33. | |
505 | ||
506 | =item * | |
507 | ||
508 | L<ExtUtils::MakeMaker> has been upgraded from version 7.04_01 to 7.10_01. | |
509 | ||
510 | =item * | |
511 | ||
512 | L<ExtUtils::ParseXS> has been upgraded from version 3.28 to 3.31. | |
513 | ||
514 | =item * | |
515 | ||
516 | L<ExtUtils::Typemaps> has been upgraded from version 3.28 to 3.31. | |
517 | ||
518 | =item * | |
519 | ||
520 | L<feature> has been upgraded from version 1.40 to 1.42. | |
521 | ||
522 | =item * | |
523 | ||
524 | L<fields> has been upgraded from version 2.17 to 2.23. | |
525 | ||
526 | =item * | |
527 | ||
528 | L<File::Find> has been upgraded from version 1.29 to 1.34. | |
529 | ||
530 | =item * | |
531 | ||
532 | L<File::Glob> has been upgraded from version 1.24 to 1.26. | |
533 | ||
534 | =item * | |
535 | ||
536 | L<File::Path> has been upgraded from version 2.09 to 2.12_01. | |
537 | ||
538 | =item * | |
539 | ||
540 | L<File::Spec> has been upgraded from version 3.56 to 3.63. | |
541 | ||
542 | =item * | |
543 | ||
544 | L<Filter::Util::Call> has been upgraded from version 1.54 to 1.55. | |
545 | ||
546 | =item * | |
547 | ||
548 | L<Getopt::Long> has been upgraded from version 2.45 to 2.48. | |
549 | ||
550 | =item * | |
551 | ||
552 | L<Hash::Util> has been upgraded from version 0.18 to 0.19. | |
553 | ||
554 | =item * | |
555 | ||
556 | L<Hash::Util::FieldHash> has been upgraded from version 1.15 to 1.19. | |
557 | ||
558 | =item * | |
559 | ||
560 | L<HTTP::Tiny> has been upgraded from version 0.054 to 0.056. | |
561 | ||
562 | =item * | |
563 | ||
564 | L<I18N::Langinfo> has been upgraded from version 0.12 to 0.13. | |
565 | ||
566 | =item * | |
567 | ||
568 | L<if> has been upgraded from version 0.0604 to 0.0606. | |
569 | ||
570 | =item * | |
571 | ||
572 | L<IO> has been upgraded from version 1.35 to 1.36. | |
573 | ||
574 | =item * | |
575 | ||
576 | IO-Compress has been upgraded from version 2.068 to 2.069. | |
577 | ||
578 | =item * | |
579 | ||
580 | L<IPC::Open3> has been upgraded from version 1.18 to 1.20. | |
581 | ||
582 | =item * | |
583 | ||
584 | L<IPC::SysV> has been upgraded from version 2.04 to 2.06_01. | |
585 | ||
586 | =item * | |
587 | ||
588 | L<List::Util> has been upgraded from version 1.41 to 1.42_02. | |
589 | ||
590 | =item * | |
591 | ||
592 | L<locale> has been upgraded from version 1.06 to 1.08. | |
593 | ||
594 | =item * | |
595 | ||
596 | L<Locale::Codes> has been upgraded from version 3.34 to 3.37. | |
597 | ||
598 | =item * | |
599 | ||
600 | L<Math::BigInt> has been upgraded from version 1.9997 to 1.999715. | |
601 | ||
602 | =item * | |
603 | ||
604 | L<Math::BigInt::FastCalc> has been upgraded from version 0.31 to 0.40. | |
605 | ||
606 | =item * | |
607 | ||
608 | L<Math::BigRat> has been upgraded from version 0.2608 to 0.260802. | |
609 | ||
610 | =item * | |
611 | ||
612 | L<Module::CoreList> has been upgraded from version 5.20150520 to 5.20160320. | |
613 | ||
614 | =item * | |
615 | ||
616 | L<Module::Metadata> has been upgraded from version 1.000026 to 1.000031. | |
617 | ||
618 | =item * | |
619 | ||
620 | L<mro> has been upgraded from version 1.17 to 1.18. | |
621 | ||
622 | =item * | |
623 | ||
624 | L<ODBM_File> has been upgraded from version 1.12 to 1.14. | |
625 | ||
626 | =item * | |
627 | ||
628 | L<Opcode> has been upgraded from version 1.32 to 1.34. | |
629 | ||
630 | =item * | |
631 | ||
632 | L<parent> has been upgraded from version 0.232 to 0.234. | |
633 | ||
634 | =item * | |
635 | ||
636 | L<Parse::CPAN::Meta> has been upgraded from version 1.4414 to 1.4417. | |
637 | ||
638 | =item * | |
639 | ||
640 | L<Perl::OSType> has been upgraded from version 1.008 to 1.009. | |
641 | ||
642 | =item * | |
643 | ||
644 | L<perlfaq> has been upgraded from version 5.021009 to 5.021010. | |
645 | ||
646 | =item * | |
647 | ||
648 | L<PerlIO::encoding> has been upgraded from version 0.21 to 0.24. | |
649 | ||
650 | =item * | |
651 | ||
652 | L<PerlIO::mmap> has been upgraded from version 0.014 to 0.016. | |
653 | ||
654 | =item * | |
655 | ||
656 | L<PerlIO::scalar> has been upgraded from version 0.22 to 0.24. | |
657 | ||
658 | =item * | |
659 | ||
660 | L<PerlIO::via> has been upgraded from version 0.15 to 0.16. | |
661 | ||
662 | =item * | |
663 | ||
664 | L<Pod::Functions> has been upgraded from version 1.09 to 1.10. | |
665 | ||
666 | =item * | |
667 | ||
668 | L<Pod::Perldoc> has been upgraded from version 3.25 to 3.25_02. | |
669 | ||
670 | =item * | |
671 | ||
672 | L<Pod::Simple> has been upgraded from version 3.29 to 3.32. | |
673 | ||
674 | =item * | |
675 | ||
676 | L<Pod::Usage> has been upgraded from version 1.64 to 1.68. | |
677 | ||
678 | =item * | |
679 | ||
680 | L<POSIX> has been upgraded from version 1.53 to 1.65. | |
681 | ||
682 | =item * | |
683 | ||
684 | L<Scalar::Util> has been upgraded from version 1.41 to 1.42_02. | |
685 | ||
686 | =item * | |
687 | ||
688 | L<SDBM_File> has been upgraded from version 1.13 to 1.14. | |
689 | ||
690 | =item * | |
691 | ||
692 | L<SelfLoader> has been upgraded from version 1.22 to 1.23. | |
693 | ||
694 | =item * | |
695 | ||
696 | L<Socket> has been upgraded from version 2.018 to 2.020_03. | |
697 | ||
698 | =item * | |
699 | ||
700 | L<Storable> has been upgraded from version 2.53 to 2.56. | |
701 | ||
702 | =item * | |
703 | ||
704 | L<strict> has been upgraded from version 1.09 to 1.11. | |
705 | ||
706 | =item * | |
707 | ||
708 | L<Term::ANSIColor> has been upgraded from version 4.03 to 4.04. | |
709 | ||
710 | =item * | |
711 | ||
712 | L<Term::Cap> has been upgraded from version 1.15 to 1.17. | |
713 | ||
714 | =item * | |
715 | ||
716 | L<Test> has been upgraded from version 1.26 to 1.28. | |
717 | ||
718 | =item * | |
719 | ||
720 | L<Test::Harness> has been upgraded from version 3.35 to 3.36. | |
721 | ||
722 | =item * | |
723 | ||
724 | L<Thread::Queue> has been upgraded from version 3.05 to 3.08. | |
725 | ||
726 | =item * | |
727 | ||
728 | L<threads> has been upgraded from version 2.01 to 2.06. | |
729 | ||
730 | =item * | |
731 | ||
732 | L<threads::shared> has been upgraded from version 1.48 to 1.50. | |
733 | ||
734 | =item * | |
735 | ||
736 | L<Tie::File> has been upgraded from version 1.01 to 1.02. | |
737 | ||
738 | =item * | |
739 | ||
740 | L<Tie::Scalar> has been upgraded from version 1.03 to 1.04. | |
741 | ||
742 | =item * | |
743 | ||
744 | L<Time::HiRes> has been upgraded from version 1.9726 to 1.9732. | |
745 | ||
746 | =item * | |
747 | ||
748 | L<Time::Piece> has been upgraded from version 1.29 to 1.31. | |
749 | ||
750 | =item * | |
751 | ||
752 | L<Unicode::Collate> has been upgraded from version 1.12 to 1.14. | |
753 | ||
754 | =item * | |
755 | ||
756 | L<Unicode::Normalize> has been upgraded from version 1.18 to 1.25. | |
757 | ||
758 | =item * | |
759 | ||
760 | L<Unicode::UCD> has been upgraded from version 0.61 to 0.64. | |
761 | ||
762 | =item * | |
763 | ||
764 | L<UNIVERSAL> has been upgraded from version 1.12 to 1.13. | |
765 | ||
766 | =item * | |
767 | ||
768 | L<utf8> has been upgraded from version 1.17 to 1.19. | |
769 | ||
770 | =item * | |
771 | ||
772 | L<version> has been upgraded from version 0.9909 to 0.9916. | |
773 | ||
774 | =item * | |
775 | ||
776 | L<warnings> has been upgraded from version 1.32 to 1.36. | |
777 | ||
778 | =item * | |
779 | ||
780 | L<Win32> has been upgraded from version 0.51 to 0.52. | |
781 | ||
782 | =item * | |
783 | ||
784 | L<Win32API::File> has been upgraded from version 0.1202 to 0.1203. | |
785 | ||
786 | =item * | |
787 | ||
788 | L<XS::Typemap> has been upgraded from version 0.13 to 0.14. | |
789 | ||
790 | =item * | |
791 | ||
792 | L<XSLoader> has been upgraded from version 0.20 to 0.21. | |
793 | ||
794 | =back | |
795 | ||
796 | =head1 Documentation | |
797 | ||
798 | =head2 Changes to Existing Documentation | |
799 | ||
800 | =head3 L<perlapi> | |
801 | ||
802 | =over 4 | |
803 | ||
804 | =item * | |
805 | ||
806 | The process of using undocumented globals has been documented, namely, that one | |
807 | should send email to L<perl5-porters@perl.org|mailto:perl5-porters@perl.org> | |
808 | first to get the go-ahead for documenting and using an undocumented function or | |
809 | global variable. | |
810 | ||
811 | =back | |
812 | ||
813 | =head3 L<perlcall> | |
814 | ||
815 | =over 4 | |
816 | ||
817 | =item * | |
818 | ||
819 | A number of cleanups have been made to perlcall, including: | |
820 | ||
821 | =over 4 | |
822 | ||
823 | =item * | |
824 | ||
825 | use C<EXTEND(SP, n)> and C<PUSHs()> instead of C<XPUSHs()> where applicable | |
826 | and update prose to match | |
827 | ||
828 | =item * | |
829 | ||
830 | add POPu, POPul and POPpbytex to the "complete list of POP macros" | |
831 | and clarify the documentation for some of the existing entries, and | |
832 | a note about side-effects | |
833 | ||
834 | =item * | |
835 | ||
836 | add API documentation for POPu and POPul | |
837 | ||
838 | =item * | |
839 | ||
840 | use ERRSV more efficiently | |
841 | ||
842 | =item * | |
843 | ||
844 | approaches to thread-safety storage of SVs. | |
845 | ||
846 | =back | |
847 | ||
848 | =back | |
849 | ||
850 | =head3 L<perlfunc> | |
851 | ||
852 | =over 4 | |
853 | ||
854 | =item * | |
855 | ||
856 | The documentation of C<hex> has been revised to clarify valid inputs. | |
857 | ||
858 | =item * | |
859 | ||
860 | Better explain meaning of negative PIDs in C<waitpid>. | |
861 | L<[perl #127080]|https://rt.perl.org/Ticket/Display.html?id=127080> | |
862 | ||
863 | =item * | |
864 | ||
865 | General cleanup: there's more consistency now (in POD usage, grammar, code | |
866 | examples), better practices in code examples (use of C<my>, removal of bareword | |
867 | filehandles, dropped usage of C<&> when calling subroutines, ...), etc. | |
868 | ||
869 | =back | |
870 | ||
871 | =head3 L<perlguts> | |
872 | ||
873 | =over 4 | |
874 | ||
875 | =item * | |
876 | ||
877 | A new section has been added, L<perlguts/"Dynamic Scope and the Context | |
878 | Stack">, which explains how the perl context stack works. | |
879 | ||
880 | =back | |
881 | ||
882 | =head3 L<perllocale> | |
883 | ||
884 | =over 4 | |
885 | ||
886 | =item * | |
887 | ||
888 | A stronger caution about using locales in threaded applications is | |
889 | given. Locales are not thread-safe, and you can get wrong results or | |
890 | even segfaults if you use them there. | |
891 | ||
892 | =back | |
893 | ||
894 | =head3 L<perlmodlib> | |
895 | ||
896 | =over 4 | |
897 | ||
898 | =item * | |
899 | ||
900 | We now recommend contacting the module-authors list or PAUSE in seeking | |
901 | guidance on the naming of modules. | |
902 | ||
903 | =back | |
904 | ||
905 | =head3 L<perlop> | |
906 | ||
907 | =over 4 | |
908 | ||
909 | =item * | |
910 | ||
911 | The documentation of C<qx//> now describes how C<$?> is affected. | |
912 | ||
913 | =back | |
914 | ||
915 | =head3 L<perlpolicy> | |
916 | ||
917 | =over 4 | |
918 | ||
919 | =item * | |
920 | ||
921 | This note has been added to perlpolicy: | |
922 | ||
923 | While civility is required, kindness is encouraged; if you have any | |
924 | doubt about whether you are being civil, simply ask yourself, "Am I | |
925 | being kind?" and aspire to that. | |
926 | ||
927 | =back | |
928 | ||
929 | =head3 L<perlreftut> | |
930 | ||
931 | =over 4 | |
932 | ||
933 | =item * | |
934 | ||
935 | Fix some examples to be L<strict> clean. | |
936 | ||
937 | =back | |
938 | ||
939 | =head3 L<perlrebackslash> | |
940 | ||
941 | =over 4 | |
942 | ||
943 | =item * | |
944 | ||
945 | Clarify that in languages like Japanese and Thai, dictionary lookup | |
946 | is required to determine word boundaries. | |
947 | ||
948 | =back | |
949 | ||
950 | =head3 L<perlsub> | |
951 | ||
952 | =over 4 | |
953 | ||
954 | =item * | |
955 | ||
956 | Updated to note that anonymous subroutines can have signatures. | |
957 | ||
958 | =back | |
959 | ||
960 | =head3 L<perlsyn> | |
961 | ||
962 | =over 4 | |
963 | ||
964 | =item * | |
965 | ||
966 | Fixed a broken example where C<=> was used instead of | |
967 | C<==> in conditional in do/while example. | |
968 | ||
969 | =back | |
970 | ||
971 | =head3 L<perltie> | |
972 | ||
973 | =over 4 | |
974 | ||
975 | =item * | |
976 | ||
977 | The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified. | |
978 | ||
979 | =back | |
980 | ||
981 | =head3 L<perlunicode> | |
982 | ||
983 | =over 4 | |
984 | ||
985 | =item * | |
986 | ||
987 | Discourage use of 'In' as a prefix signifying the Unicode Block property. | |
988 | ||
989 | =back | |
990 | ||
991 | =head3 L<perlvar> | |
992 | ||
993 | =over 4 | |
994 | ||
995 | =item * | |
996 | ||
997 | The documentation of C<$@> was reworded to clarify that it is not just for | |
998 | syntax errors in C<eval>. | |
999 | L<[perl #124034]|https://rt.perl.org/Ticket/Display.html?id=124034> | |
1000 | ||
1001 | =item * | |
1002 | ||
1003 | The specific true value of C<$!{E...}> is now documented, noting that it is | |
1004 | subject to change and not guaranteed. | |
1005 | ||
1006 | =item * | |
1007 | ||
1008 | Use of C<$OLD_PERL_VERSION> is now discouraged. | |
1009 | ||
1010 | =back | |
1011 | ||
1012 | =head3 L<perlxs> | |
1013 | ||
1014 | =over 4 | |
1015 | ||
1016 | =item * | |
1017 | ||
1018 | The documentation of C<PROTOTYPES> has been corrected; they are I<disabled> | |
1019 | by default, not I<enabled>. | |
1020 | ||
1021 | =back | |
1022 | ||
1023 | =head1 Diagnostics | |
1024 | ||
1025 | The following additions or changes have been made to diagnostic output, | |
1026 | including warnings and fatal error messages. For the complete list of | |
1027 | diagnostic messages, see L<perldiag>. | |
1028 | ||
1029 | =head2 New Diagnostics | |
1030 | ||
1031 | =head3 New Errors | |
1032 | ||
1033 | =over 4 | |
1034 | ||
1035 | =item * | |
1036 | ||
1037 | L<%s must not be a named sequence in transliteration operator|perldiag/"%s must not be a named sequence in transliteration operator"> | |
1038 | ||
1039 | =item * | |
1040 | ||
1041 | L<Can't find Unicode property definition "%s" in regex;|perldiag/"Can't find Unicode property definition "%s" in regex; marked by <-- HERE in m/%s/"> | |
1042 | ||
1043 | =item * | |
1044 | ||
1045 | L<Can't redeclare "%s" in "%s"|perldiag/"Can't redeclare "%s" in "%s""> | |
1046 | ||
1047 | =item * | |
1048 | ||
1049 | L<Character following \p must be '{' or a single-character Unicode property name in regex;|perldiag/"Character following \%c must be '{' or a single-character Unicode property name in regex; marked by <-- HERE in m/%s/"> | |
1050 | ||
1051 | =item * | |
1052 | ||
1053 | L<Empty \%c in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol> | |
1054 | |perldiag/"Empty \%c in regex; marked by <-- HERE in mE<sol>%sE<sol>"> | |
1055 | ||
1056 | =item * | |
1057 | ||
1058 | L<Illegal user-defined property name|perldiag/"Illegal user-defined property name"> | |
1059 | ||
1060 | =item * | |
1061 | ||
1062 | L<Invalid number '%s' for -C option.|perldiag/"Invalid number '%s' for -C option."> | |
1063 | ||
1064 | =item * | |
1065 | ||
1066 | L<<< Sequence (?... not terminated in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"Sequence (?... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>> | |
1067 | ||
1068 | =item * | |
1069 | ||
1070 | L<<< Sequence (?PE<lt>... not terminated in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol> | |
1071 | |perldiag/"Sequence (?PE<lt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>> | |
1072 | ||
1073 | =item * | |
1074 | ||
1075 | L<Sequence (?PE<gt>... not terminated in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol> | |
1076 | |perldiag/"Sequence (?PE<gt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>"> | |
1077 | ||
1078 | =back | |
1079 | ||
1080 | =head3 New Warnings | |
1081 | ||
1082 | =over 4 | |
1083 | ||
1084 | =item * | |
1085 | ||
1086 | L<Assuming NOT a POSIX class since %s in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>| | |
1087 | perldiag/Assuming NOT a POSIX class since %s in regex; marked by <-- HERE in mE<sol>%sE<sol>> | |
1088 | ||
1089 | =item * | |
1090 | ||
1091 | L<%s() is deprecated on :utf8 handles|perldiag/"%s() is deprecated on :utf8 handles"> | |
1092 | ||
1093 | =back | |
1094 | ||
1095 | =head2 Changes to Existing Diagnostics | |
1096 | ||
1097 | =over 4 | |
1098 | ||
1099 | =item * | |
1100 | ||
1101 | Accessing the C<IO> part of a glob as C<FILEHANDLE> instead of C<IO> is no | |
1102 | longer deprecated. It is discouraged to encourage uniformity (so that, for | |
1103 | example, one can grep more easily) but it will not be removed. | |
1104 | L<[perl #127060]|https://rt.perl.org/Ticket/Display.html?id=127060> | |
1105 | ||
1106 | =item * | |
1107 | ||
1108 | The diagnostic C<< Hexadecimal float: internal error >> has been changed to | |
1109 | C<< Hexadecimal float: internal error (%s) >> to include more information. | |
1110 | ||
1111 | =item * | |
1112 | ||
1113 | L<Can't modify non-lvalue subroutine call of &%s|perldiag/"Can't modify non-lvalue subroutine call of &%s"> | |
1114 | ||
1115 | This error now reports the name of the non-lvalue subroutine you attempted to | |
1116 | use as an lvalue. | |
1117 | ||
1118 | =item * | |
1119 | ||
1120 | When running out of memory during an attempt the increase the stack | |
1121 | size, previously, perl would die using the cryptic message | |
1122 | C<< panic: av_extend_guts() negative count (-9223372036854775681) >>. | |
1123 | This has been fixed to show the prettier message: | |
1124 | L<< Out of memory during stack extend|perldiag/"Out of memory during %s extend" >> | |
1125 | ||
1126 | =back | |
1127 | ||
1128 | =head1 Configuration and Compilation | |
1129 | ||
1130 | =over 4 | |
1131 | ||
1132 | =item * | |
1133 | ||
1134 | C<Configure> now acts as if the C<-O> option is always passed, allowing command | |
1135 | line options to override saved configuration. This should eliminate confusion | |
1136 | when command line options are ignored for no obvious reason. C<-O> is now | |
1137 | permitted, but ignored. | |
1138 | ||
1139 | =item * | |
1140 | ||
1141 | Bison 3.0 is now supported. | |
1142 | ||
1143 | =item * | |
1144 | ||
1145 | F<Configure> no longer probes for F<libnm> by default. Originally | |
1146 | this was the "New Math" library, but the name has been re-used by the | |
1147 | GNOME NetworkManager. | |
1148 | L<[perl #127131]|https://rt.perl.org/Ticket/Display.html?id=127131> | |
1149 | ||
1150 | =item * | |
1151 | ||
1152 | Added F<Configure> probes for C<newlocale>, C<freelocale>, and C<uselocale>. | |
1153 | ||
1154 | =item * | |
1155 | ||
1156 | C<< PPPort.so/PPPort.dll >> no longer get installed, as they are | |
1157 | not used by C<< PPPort.pm >>, only by its test files. | |
1158 | ||
1159 | =item * | |
1160 | ||
1161 | It is now possible to specify which compilation date to show on | |
1162 | C<< perl -V >> output, by setting the macro C<< PERL_BUILD_DATE >>. | |
1163 | ||
1164 | =item * | |
1165 | ||
1166 | Using the C<NO_HASH_SEED> define in combination with the default hash algorithm | |
1167 | C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling | |
1168 | the interpreter, since Perl 5.17.10. This has been fixed. | |
1169 | ||
1170 | =item * | |
1171 | ||
1172 | F<Configure> should handle spaces in paths a little better. | |
1173 | ||
1174 | =item * | |
1175 | ||
1176 | No longer generate EBCDIC POSIX-BC tables. We don't believe anyone is | |
1177 | using Perl and POSIX-BC at this time, and by not generating these tables | |
1178 | it saves time during development, and makes the resulting tar ball smaller. | |
1179 | ||
1180 | =item * | |
1181 | ||
1182 | The GNU Make makefile for Win32 now supports parallel builds. [perl #126632] | |
1183 | ||
1184 | =item * | |
1185 | ||
1186 | You can now build perl with MSVC++ on Win32 using GNU Make. [perl #126632] | |
1187 | ||
1188 | =item * | |
1189 | ||
1190 | The Win32 miniperl now has a real C<getcwd> which increases build performance | |
1191 | resulting in C<getcwd()> being 605x faster in Win32 miniperl. | |
1192 | ||
1193 | =item * | |
1194 | ||
1195 | Configure now takes C<-Dusequadmath> into account when calculating the | |
1196 | C<alignbytes> configuration variable. Previously the mis-calculated | |
1197 | C<alignbytes> could cause alignment errors on debugging builds. [perl | |
1198 | #127894] | |
1199 | ||
1200 | =back | |
1201 | ||
1202 | =head1 Testing | |
1203 | ||
1204 | =over 4 | |
1205 | ||
1206 | =item * | |
1207 | ||
1208 | A new test (F<t/op/aassign.t>) has been added to test the list assignment operator | |
1209 | C<OP_AASSIGN>. | |
1210 | ||
1211 | =item * | |
1212 | ||
1213 | Parallel building has been added to the dmake C<makefile.mk> makefile. All | |
1214 | Win32 compilers are supported. | |
1215 | ||
1216 | =back | |
1217 | ||
1218 | =head1 Platform Support | |
1219 | ||
1220 | =head2 Platform-Specific Notes | |
1221 | ||
1222 | =over 4 | |
1223 | ||
1224 | =item AmigaOS | |
1225 | ||
1226 | =over 4 | |
1227 | ||
1228 | =item * | |
1229 | ||
1230 | The AmigaOS port has been reintegrated into the main tree, based off of | |
1231 | Perl 5.22.1. | |
1232 | ||
1233 | =back | |
1234 | ||
1235 | =item Cygwin | |
1236 | ||
1237 | =over 4 | |
1238 | ||
1239 | =item * | |
1240 | ||
1241 | Tests are more robust against unusual cygdrive prefixes. | |
1242 | L<[perl #126834]|https://rt.perl.org/Ticket/Display.html?id=126834> | |
1243 | ||
1244 | =back | |
1245 | ||
1246 | =item EBCDIC | |
1247 | ||
1248 | =over 4 | |
1249 | ||
1250 | =item UTF-EBCDIC extended | |
1251 | ||
1252 | UTF-EBCDIC is like UTF-8, but for EBCDIC platforms. It now has been | |
1253 | extended so that it can represent code points up to 2 ** 64 - 1 on | |
1254 | platforms with 64-bit words. This brings it into parity with UTF-8. | |
1255 | This enhancement requires an incompatible change to the representation | |
1256 | of code points in the range 2 ** 30 to 2 ** 31 -1 (the latter was the | |
1257 | previous maximum representable code point). This means that a file that | |
1258 | contains one of these code points, written out with previous versions of | |
1259 | perl cannot be read in, without conversion, by a perl containing this | |
1260 | change. We do not believe any such files are in existence, but if you | |
1261 | do have one, submit a ticket at L<perlbug@perl.org|mailto:perlbug@perl.org>, | |
1262 | and we will write a conversion script for you. | |
1263 | ||
1264 | =item EBCDIC C<cmp()> and C<sort()> fixed for UTF-EBCDIC strings | |
1265 | ||
1266 | Comparing two strings that were both encoded in UTF-8 (or more | |
1267 | precisely, UTF-EBCDIC) did not work properly until now. Since C<sort()> | |
1268 | uses C<cmp()>, this fixes that as well. | |
1269 | ||
1270 | =item EBCDIC C<tr///> and C<y///> fixed for C<\N{}>, and C<S<use utf8>> ranges | |
1271 | ||
1272 | Perl v5.22 introduced the concept of portable ranges to regular | |
1273 | expression patterns. A portable range matches the same set of | |
1274 | characters no matter what platform is being run on. This concept is now | |
1275 | extended to C<tr///>. See | |
1276 | C<L<trE<sol>E<sol>E<sol>|perlop/trE<sol>SEARCHLISTE<sol>REPLACEMENTLISTE<sol>cdsr>>. | |
1277 | ||
1278 | There were also some problems with these operations under S<C<use | |
1279 | utf8>>, which are now fixed | |
1280 | ||
1281 | =back | |
1282 | ||
1283 | =item FreeBSD | |
1284 | ||
1285 | =over 4 | |
1286 | ||
1287 | =item * | |
1288 | ||
1289 | Use the C<fdclose()> function from FreeBSD if it is available. | |
1290 | L<[perl #126847]|https://rt.perl.org/Ticket/Display.html?id=126847> | |
1291 | ||
1292 | =back | |
1293 | ||
1294 | =item IRIX | |
1295 | ||
1296 | =over 4 | |
1297 | ||
1298 | =item * | |
1299 | ||
1300 | Under some circumstances IRIX stdio C<fgetc()> and C<fread()> set the errno to | |
1301 | C<ENOENT>, which made no sense according to either IRIX or POSIX docs. Errno | |
1302 | is now cleared in such cases. | |
1303 | L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977> | |
1304 | ||
1305 | =item * | |
1306 | ||
1307 | Problems when multiplying long doubles by infinity have been fixed. | |
1308 | L<[perl #126396]|https://rt.perl.org/Ticket/Display.html?id=126396> | |
1309 | ||
1310 | =back | |
1311 | ||
1312 | =item MacOS X | |
1313 | ||
1314 | =over 4 | |
1315 | ||
1316 | =item * | |
1317 | ||
1318 | Until now OS X builds of perl have specified a link target of 10.3 (Panther, | |
1319 | 2003) but have not specified a compiler target. From now on, builds of perl on | |
1320 | OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X | |
1321 | version and specify that as the explicit build target in both compiler and | |
1322 | linker flags, thus preserving binary compatibility for extensions built later | |
1323 | regardless of changes in OS X, SDK, or compiler and linker versions. To | |
1324 | override the default value used in the build and preserved in the flags, | |
1325 | specify C<export MACOSX_DEPLOYMENT_TARGET=10.N> before configuring and building | |
1326 | perl, where 10.N is the version of OS X you wish to target. In OS X 10.5 or | |
1327 | earlier there is no change to the behavior present when those systems were | |
1328 | current; the link target is still OS X 10.3 and there is no explicit compiler | |
1329 | target. | |
1330 | ||
1331 | =item * | |
1332 | ||
1333 | Builds with both -DDEBUGGING and threading enabled would fail with a | |
1334 | "panic: free from wrong pool" error when built or tested from Terminal | |
1335 | on OS X. This was caused by perl's internal management of the | |
1336 | environment conflicting with an atfork handler using the libc | |
1337 | C<setenv()> function to update the environment. | |
1338 | ||
1339 | Perl now uses C<setenv()>/C<unsetenv()> to update the environment on OS X. | |
1340 | L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240> | |
1341 | ||
1342 | =back | |
1343 | ||
1344 | =item Solaris | |
1345 | ||
1346 | =over 4 | |
1347 | ||
1348 | =item * | |
1349 | ||
1350 | All Solaris variants now build a shared libperl | |
1351 | ||
1352 | Solaris and variants like OpenIndiana now always build with the shared | |
1353 | Perl library (Configure -Duseshrplib). This was required for the | |
1354 | OpenIndiana builds, but this has also been the setting for Oracle/Sun | |
1355 | Perl builds for several years. | |
1356 | ||
1357 | =back | |
1358 | ||
1359 | =item Tru64 | |
1360 | ||
1361 | =over 4 | |
1362 | ||
1363 | =item * | |
1364 | ||
1365 | Workaround where Tru64 balks when prototypes are listed as | |
1366 | C<< PERL_STATIC_INLINE >>, but where the test is build with | |
1367 | C<< -DPERL_NO_INLINE_FUNCTIONS >>. | |
1368 | ||
1369 | =back | |
1370 | ||
1371 | =item VMS | |
1372 | ||
1373 | =over 4 | |
1374 | ||
1375 | =item * | |
1376 | ||
1377 | On VMS, the math function prototypes in C<math.h> are now visible under C++. | |
1378 | Now building the POSIX extension with C++ will no longer crash. | |
1379 | ||
1380 | =item * | |
1381 | ||
1382 | VMS has had C<setenv>/C<unsetenv> since v7.0 (released in 1996), | |
1383 | C<Perl_vmssetenv> now always uses C<setenv>/C<unsetenv>. | |
1384 | ||
1385 | =item * | |
1386 | ||
1387 | Perl now implements its own C<killpg> by scanning for processes in the | |
1388 | specified process group, which may not mean exactly the same thing as a Unix | |
1389 | process group, but allows us to send a signal to a parent (or master) process | |
1390 | and all of its sub-processes. At the perl level, this means we can now send a | |
1391 | negative pid like so: | |
1392 | ||
1393 | kill SIGKILL, -$pid; | |
1394 | ||
1395 | to signal all processes in the same group as C<$pid>. | |
1396 | ||
1397 | =item * | |
1398 | ||
1399 | For those C<%ENV> elements based on the CRTL environ array, we've always | |
1400 | preserved case when setting them but did look-ups only after upcasing the | |
1401 | key first, which made lower- or mixed-case entries go missing. This problem | |
1402 | has been corrected by making C<%ENV> elements derived from the environ array | |
1403 | case-sensitive on look-up as well as case-preserving on store. | |
1404 | ||
1405 | =item * | |
1406 | ||
1407 | Environment look-ups for C<PERL5LIB> and C<PERLLIB> previously only | |
1408 | considered logical names, but now consider all sources of C<%ENV> as | |
1409 | determined by C<PERL_ENV_TABLES> and as documented in L<perlvms/%ENV>. | |
1410 | ||
1411 | =item * | |
1412 | ||
1413 | The minimum supported version of VMS is now v7.3-2, released in 2003. As a | |
1414 | side effect of this change, VAX is no longer supported as the terminal | |
1415 | release of OpenVMS VAX was v7.3 in 2001. | |
1416 | ||
1417 | =back | |
1418 | ||
1419 | =item Win32 | |
1420 | ||
1421 | =over 4 | |
1422 | ||
1423 | =item * | |
1424 | ||
1425 | A new build option C<USE_NO_REGISTRY> has been added to the makefiles. This | |
1426 | option is off by default, meaning the default is to do Windows registry | |
1427 | lookups. This option stops Perl from looking inside the registry for anything. | |
1428 | For what values are looked up in the registry see L<perlwin32>. Internally, in | |
1429 | C, the name of this option is C<WIN32_NO_REGISTRY>. | |
1430 | ||
1431 | =item * | |
1432 | ||
1433 | The behavior of Perl using C<HKEY_CURRENT_USER\Software\Perl> and | |
1434 | C<HKEY_LOCAL_MACHINE\Software\Perl> to lookup certain values, including C<%ENV> | |
1435 | vars starting with C<PERL> has changed. Previously, the 2 keys were checked | |
1436 | for entries at all times through the perl process's life time even if | |
1437 | they did not | |
1438 | exist. For performance reasons, now, if the root key (i.e. | |
1439 | C<HKEY_CURRENT_USER\Software\Perl> or C<HKEY_LOCAL_MACHINE\Software\Perl>) does | |
1440 | not exist at process start time, it will not be checked again for C<%ENV> | |
1441 | override entries for the remainder of the perl process's life. This more | |
1442 | closely matches Unix behavior in that the environment is copied or inherited | |
1443 | on startup and changing the variable in the parent process or another process | |
1444 | or editing F<.bashrc> will not change the environmental variable in other | |
1445 | existing, running, processes. | |
1446 | ||
1447 | =item * | |
1448 | ||
1449 | One glob fetch was removed for each C<-X> or C<stat> call whether done from | |
1450 | Perl code or internally from Perl's C code. The glob being looked up was | |
1451 | C<${^WIN32_SLOPPY_STAT}> which is a special variable. This makes C<-X> and | |
1452 | C<stat> slightly faster. | |
1453 | ||
1454 | =item * | |
1455 | ||
1456 | During miniperl's process startup, during the build process, 4 to 8 IO calls | |
1457 | related to the process starting F<.pl> and the F<buildcustomize.pl> file were | |
1458 | removed from the code opening and executing the first 1 or 2 F<.pl> files. | |
1459 | ||
1460 | =item * | |
1461 | ||
1462 | Builds using Microsoft Visual C++ 2003 and earlier no longer produce | |
1463 | an "INTERNAL COMPILER ERROR" message. [perl #126045] | |
1464 | ||
1465 | =item * | |
1466 | ||
1467 | Visual C++ 2013 builds will now execute on XP and higher. Previously they would | |
1468 | only execute on Vista and higher. | |
1469 | ||
1470 | =item * | |
1471 | ||
1472 | You can now build perl with GNU Make and GCC. [perl #123440] | |
1473 | ||
1474 | =item * | |
1475 | ||
1476 | C<truncate($filename, $size)> now works for files over 4GB in size. | |
1477 | [perl #125347] | |
1478 | ||
1479 | =item * | |
1480 | ||
1481 | Parallel building has been added to the dmake C<makefile.mk> makefile. All | |
1482 | Win32 compilers are supported. | |
1483 | ||
1484 | =item * | |
1485 | ||
1486 | Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would | |
1487 | result in an invalid C<$Config{archname}> for the resulting perl. | |
1488 | [perl #127584] | |
1489 | ||
1490 | =item * | |
1491 | ||
1492 | Errors set by Winsock functions are now put directly into C<$^E>, and the | |
1493 | relevant C<WSAE*> error codes are now exported from the L<Errno> and L<POSIX> | |
1494 | modules for testing this against. | |
1495 | ||
1496 | The previous behavior of putting the errors (converted to POSIX-style C<E*> | |
1497 | error codes since Perl 5.20.0) into C<$!> was buggy due to the non-equivalence | |
1498 | of like-named Winsock and POSIX error constants, a relationship between which | |
1499 | has unfortunately been established in one way or another since Perl 5.8.0. | |
1500 | ||
1501 | The new behavior provides a much more robust solution for checking Winsock | |
1502 | errors in portable software without accidentally matching POSIX tests that were | |
1503 | intended for other OSes and may have different meanings for Winsock. | |
1504 | ||
1505 | The old behavior is currently retained, warts and all, for backwards | |
1506 | compatibility, but users are encouraged to change any code that tests C<$!> | |
1507 | against C<E*> constants for Winsock errors to instead test C<$^E> against | |
1508 | C<WSAE*> constants. After a suitable deprecation period, the old behavior may | |
1509 | be removed, leaving C<$!> unchanged after Winsock function calls, to avoid any | |
1510 | possible confusion over which error variable to check. | |
1511 | ||
1512 | =back | |
1513 | ||
1514 | =item ppc64el | |
1515 | ||
1516 | =over 4 | |
1517 | ||
1518 | =item floating point | |
1519 | ||
1520 | The floating point format of ppc64el (Debian naming for little-endian | |
1521 | PowerPC) is now detected correctly. | |
1522 | ||
1523 | =back | |
1524 | ||
1525 | =back | |
1526 | ||
1527 | =head1 Internal Changes | |
1528 | ||
1529 | =over 4 | |
1530 | ||
1531 | =item * | |
1532 | ||
1533 | The implementation of perl's context stack system, and its internal API, | |
1534 | have been heavily reworked. Note that no significant changes have been | |
1535 | made to any external APIs, but XS code which relies on such internal | |
1536 | details may need to be fixed. The main changes are: | |
1537 | ||
1538 | =over 4 | |
1539 | ||
1540 | =item * | |
1541 | ||
1542 | The C<PUSHBLOCK()>, C<POPSUB()> etc. macros have been replaced with static | |
1543 | inline functions such as C<cx_pushblock()>, C<cx_popsub()> etc. These use | |
1544 | function args rather than implicitly relying on local vars such as | |
1545 | C<gimme> and C<newsp> being available. Also their functionality has | |
1546 | changed: in particular, C<cx_popblock()> no longer decrements | |
1547 | C<cxstack_ix>. The ordering of the steps in the C<pp_leave*> functions | |
1548 | involving C<cx_popblock()>, C<cx_popsub()> etc. has changed. See the new | |
1549 | documentation, L<perlguts/"Dynamic Scope and the Context Stack">, for | |
1550 | details on how to use them. | |
1551 | ||
1552 | =item * | |
1553 | ||
1554 | Various macros, which now consistently have a CX_ prefix, have been added: | |
1555 | ||
1556 | CX_CUR(), CX_LEAVE_SCOPE(), CX_POP() | |
1557 | ||
1558 | or renamed: | |
1559 | ||
1560 | CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST() | |
1561 | ||
1562 | =item * | |
1563 | ||
1564 | C<cx_pushblock()> now saves C<PL_savestack_ix> and C<PL_tmps_floor>, so | |
1565 | C<pp_enter*> and C<pp_leave*> no longer do | |
1566 | ||
1567 | ENTER; SAVETMPS; ....; LEAVE | |
1568 | ||
1569 | =item * | |
1570 | ||
1571 | C<cx_popblock()> now also restores C<PL_curpm>. | |
1572 | ||
1573 | =item * | |
1574 | ||
1575 | In C<dounwind()> for every context type, the current savestack frame is | |
1576 | now processed before each context is popped; formerly this was only done | |
1577 | for sub-like context frames. This action has been removed from | |
1578 | C<cx_popsub()> and placed into its own macro, C<CX_LEAVE_SCOPE(cx)>, which | |
1579 | must be called before C<cx_popsub()> etc. | |
1580 | ||
1581 | C<dounwind()> now also does a C<cx_popblock()> on the last popped frame | |
1582 | (formerly it only did the C<cx_popsub()> etc. actions on each frame). | |
1583 | ||
1584 | =item * | |
1585 | ||
1586 | The temps stack is now freed on scope exit; previously, temps created | |
1587 | during the last statement of a block wouldn't be freed until the next | |
1588 | C<nextstate> following the block (apart from an existing hack that did | |
1589 | this for recursive subs in scalar context); and in something like | |
1590 | C<f(g())>, the temps created by the last statement in C<g()> would | |
1591 | formerly not be freed until the statement following the return from | |
1592 | C<f()>. | |
1593 | ||
1594 | =item * | |
1595 | ||
1596 | Most values that were saved on the savestack on scope entry are now | |
1597 | saved in suitable new fields in the context struct, and saved and | |
1598 | restored directly by C<cx_pushfoo()> and C<cx_popfoo()>, which is much | |
1599 | faster. | |
1600 | ||
1601 | =item * | |
1602 | ||
1603 | Various context struct fields have been added, removed or modified. | |
1604 | ||
1605 | =item * | |
1606 | ||
1607 | The handling of C<@_> in C<cx_pushsub()> and C<cx_popsub()> has been | |
1608 | considerably tidied up, including removing the C<argarray> field from the | |
1609 | context struct, and extracting out some common (but rarely used) code into | |
1610 | a separate function, C<clear_defarray()>. Also, useful subsets of | |
1611 | C<cx_popsub()> which had been unrolled in places like C<pp_goto> have been | |
1612 | gathered into the new functions C<cx_popsub_args()> and | |
1613 | C<cx_popsub_common()>. | |
1614 | ||
1615 | =item * | |
1616 | ||
1617 | C<pp_leavesub> and C<pp_leavesublv> now use the same function as the rest | |
1618 | of the C<pp_leave*>'s to process return args. | |
1619 | ||
1620 | =item * | |
1621 | ||
1622 | C<CXp_FOR_PAD> and C<CXp_FOR_GV> flags have been added, and | |
1623 | C<CXt_LOOP_FOR> has been split into C<CXt_LOOP_LIST>, C<CXt_LOOP_ARY>. | |
1624 | ||
1625 | =item * | |
1626 | ||
1627 | Some variables formerly declared by C<dMULTICALL> (but not documented) have | |
1628 | been removed. | |
1629 | ||
1630 | =back | |
1631 | ||
1632 | =item * | |
1633 | ||
1634 | The obscure C<PL_timesbuf> variable, effectively a vestige of Perl 1, has | |
1635 | been removed. It was documented as deprecated in Perl 5.20, with a statement | |
1636 | that it would be removed early in the 5.21.x series; that has now finally | |
1637 | happened. | |
1638 | L<[perl #121351]|https://rt.perl.org/Ticket/Display.html?id=121351> | |
1639 | ||
1640 | =item * | |
1641 | ||
1642 | An unwarranted assertion in C<Perl_newATTRSUB_x()> has been removed. If | |
1643 | a stub subroutine | |
1644 | definition with a prototype has been seen, then any subsequent stub (or | |
1645 | definition) of the same subroutine with an attribute was causing an assertion | |
1646 | failure because of a null pointer. | |
1647 | L<[perl #126845]|https://rt.perl.org/Ticket/Display.html?id=126845> | |
1648 | ||
1649 | =item * | |
1650 | ||
1651 | C<::> has been replaced by C<__> in C<ExtUtils::ParseXS>, like it's done for | |
1652 | parameters/return values. This is more consistent, and simplifies writing XS | |
1653 | code wrapping C++ classes into a nested Perl namespace (it requires only | |
1654 | a typedef for C<Foo__Bar> rather than two, one for C<Foo_Bar> and the other | |
1655 | for C<Foo::Bar>). | |
1656 | ||
1657 | =item * | |
1658 | ||
1659 | The C<to_utf8_case()> function is now deprecated. Instead use | |
1660 | C<toUPPER_utf8>, C<toTITLE_utf8>, C<toLOWER_utf8>, and C<toFOLD_utf8>. | |
1661 | (See L<http://nntp.perl.org/group/perl.perl5.porters/233287>.) | |
1662 | ||
1663 | =item * | |
1664 | ||
1665 | Perl core code and the threads extension have been annotated so that, | |
1666 | if Perl is configured to use threads, then during compile-time clang (3.6 | |
1667 | or later) will warn about suspicious uses of mutexes. | |
1668 | See L<http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more | |
1669 | information. | |
1670 | ||
1671 | =item * | |
1672 | ||
1673 | The C<signbit()> emulation has been enhanced. This will help older | |
1674 | and/or more exotic platforms or configurations. | |
1675 | ||
1676 | ||
1677 | =item * | |
1678 | ||
1679 | Most EBCDIC-specific code in the core has been unified with non-EBCDIC | |
1680 | code, to avoid repetition and make maintenance easier. | |
1681 | ||
1682 | =item * | |
1683 | ||
1684 | MSWin32 code for C<$^X> has been moved out of the F<win32> directory to | |
1685 | F<caretx.c>, where other operating systems set that variable. | |
1686 | ||
1687 | =item * | |
1688 | ||
1689 | C<< sv_ref() >> is now part of the API. | |
1690 | ||
1691 | =item * | |
1692 | ||
1693 | L<perlapi/sv_backoff> had its return type changed from C<int> to C<void>. It | |
1694 | previously has always returned C<0> since Perl 5.000 stable but that was | |
1695 | undocumented. Although C<sv_backoff> is marked as public API, XS code is not | |
1696 | expected to be impacted since the proper API call would be through public API | |
1697 | C<sv_setsv(sv, &PL_sv_undef)>, or quasi-public C<SvOOK_off>, or non-public | |
1698 | C<SvOK_off> calls, and the return value of C<sv_backoff> was previously a | |
1699 | meaningless constant that can be rewritten as C<(sv_backoff(sv),0)>. | |
1700 | ||
1701 | =item * | |
1702 | ||
1703 | The C<EXTEND> and C<MEXTEND> macros have been improved to avoid various issues | |
1704 | with integer truncation and wrapping. In particular, some casts formerly used | |
1705 | within the macros have been removed. This means for example that passing an | |
1706 | unsigned C<nitems> argument is likely to raise a compiler warning now | |
1707 | (it's always been documented to require a signed value; formerly int, | |
1708 | lately SSize_t). | |
1709 | ||
1710 | =item * | |
1711 | ||
1712 | C<PL_sawalias> and C<GPf_ALIASED_SV> have been removed. | |
1713 | ||
1714 | =item * | |
1715 | ||
1716 | C<GvASSIGN_GENERATION> and C<GvASSIGN_GENERATION_set> have been removed. | |
1717 | ||
1718 | =back | |
1719 | ||
1720 | =head1 Selected Bug Fixes | |
1721 | ||
1722 | =over 4 | |
1723 | ||
1724 | =item * | |
1725 | ||
1726 | It now works properly to specify a user-defined property, such as | |
1727 | ||
1728 | qr/\p{mypkg1::IsMyProperty}/i | |
1729 | ||
1730 | with C</i> caseless matching, an explicit package name, and | |
1731 | I<IsMyProperty> not defined at the time of the pattern compilation. | |
1732 | ||
1733 | =item * | |
1734 | ||
1735 | Perl's C<memcpy()>, C<memmove()>, C<memset()> and C<memcmp()> fallbacks are now | |
1736 | more compatible with the originals. [perl #127619] | |
1737 | ||
1738 | =item * | |
1739 | ||
1740 | Fixed the issue where a C<< s///r >>) with B<< -DPERL_NO_COW >> attempts | |
1741 | to modify the source SV, resulting in the program dying. [perl #127635] | |
1742 | ||
1743 | =item * | |
1744 | ||
1745 | Fixed an EBCDIC-platform-only case where a pattern could fail to match. This | |
1746 | occurred when matching characters from the set of C1 controls when the | |
1747 | target matched string was in UTF-8. | |
1748 | ||
1749 | =item * | |
1750 | ||
1751 | Narrow the filename check in F<strict.pm> and F<warnings.pm>. Previously, | |
1752 | it assumed that if the filename (without the F<.pmc?> extension) differed | |
1753 | from the package name, if was a misspelled use statement (i.e. C<use Strict> | |
1754 | instead of C<use strict>). We now check whether there's really a | |
1755 | miscapitalization happening, and not some other issue. | |
1756 | ||
1757 | =item * | |
1758 | ||
1759 | Turn an assertion into a more user friendly failure when parsing | |
1760 | regexes. [perl #127599] | |
1761 | ||
1762 | =item * | |
1763 | ||
1764 | Correctly raise an error when trying to compile patterns with | |
1765 | unterminated character classes while there are trailing backslashes. | |
1766 | [perl #126141]. | |
1767 | ||
1768 | =item * | |
1769 | ||
1770 | Line numbers larger than 2**31-1 but less than 2**32 are no longer | |
1771 | returned by C<caller()> as negative numbers. [perl #126991] | |
1772 | ||
1773 | =item * | |
1774 | ||
1775 | C<< unless ( I<assignment> ) >> now properly warns when syntax | |
1776 | warnings are enabled. [perl #127122] | |
1777 | ||
1778 | =item * | |
1779 | ||
1780 | Setting an C<ISA> glob to an array reference now properly adds | |
1781 | C<isaelem> magic to any existing elements. Previously modifying such | |
1782 | an element would not update the ISA cache, so method calls would call | |
1783 | the wrong function. Perl would also crash if the C<ISA> glob was | |
1784 | destroyed, since new code added in 5.23.7 would try to release the | |
1785 | C<isaelem> magic from the elements. [perl #127351] | |
1786 | ||
1787 | =item * | |
1788 | ||
1789 | If a here-doc was found while parsing another operator, the parser had | |
1790 | already read end of file, and the here-doc was not terminated, perl | |
1791 | could produce an assertion or a segmentation fault. This now reliably | |
1792 | complains about the unterminated here-doc. [perl #125540] | |
1793 | ||
1794 | =item * | |
1795 | ||
1796 | C<untie()> would sometimes return the last value returned by the C<UNTIE()> | |
1797 | handler as well as it's normal value, messing up the stack. [perl | |
1798 | #126621] | |
1799 | ||
1800 | =item * | |
1801 | ||
1802 | Fixed an operator precedence problem when C< castflags & 2> is true. | |
1803 | [perl #127474] | |
1804 | ||
1805 | =item * | |
1806 | ||
1807 | Caching of DESTROY methods could result in a non-pointer or a | |
1808 | non-STASH stored in the C<SvSTASH()> slot of a stash, breaking the B | |
1809 | C<STASH()> method. The DESTROY method is now cached in the MRO metadata | |
1810 | for the stash. [perl #126410] | |
1811 | ||
1812 | =item * | |
1813 | ||
1814 | The AUTOLOAD method is now called when searching for a DESTROY method, | |
1815 | and correctly sets C<$AUTOLOAD> too. [perl #124387] [perl #127494] | |
1816 | ||
1817 | =item * | |
1818 | ||
1819 | Avoid parsing beyond the end of the buffer when processing a C<#line> | |
1820 | directive with no filename. [perl #127334] | |
1821 | ||
1822 | =item * | |
1823 | ||
1824 | Perl now raises a warning when a regular expression pattern looks like | |
1825 | it was supposed to contain a POSIX class, like C<qr/[[:alpha:]]/>, but | |
1826 | there was some slight defect in its specification which causes it to | |
1827 | instead be treated as a regular bracketed character class. An example | |
1828 | would be missing the second colon in the above like this: | |
1829 | C<qr/[[:alpha]]/>. This compiles to match a sequence of two characters. | |
1830 | The second is C<"]">, and the first is any of: C<"[">, C<":">, C<"a">, | |
1831 | C<"h">, C<"l">, or C<"p">. This is unlikely to be the intended | |
1832 | meaning, and now a warning is raised. No warning is raised unless the | |
1833 | specification is very close to one of the 14 legal POSIX classes. (See | |
1834 | L<perlrecharclass/POSIX Character Classes>.) | |
1835 | [perl #8904] | |
1836 | ||
1837 | =item * | |
1838 | ||
1839 | Certain regex patterns involving a complemented POSIX class in an | |
1840 | inverted bracketed character class, and matching something else | |
1841 | optionally would improperly fail to match. An example of one that could | |
1842 | fail is C<qr/_?[^\Wbar]\x{100}/>. This has been fixed. | |
1843 | [perl #127537] | |
1844 | ||
1845 | =item * | |
1846 | ||
1847 | Perl 5.22 added support to the C99 hexadecimal floating point notation, | |
1848 | but sometimes misparses hex floats. This has been fixed. | |
1849 | [perl #127183] | |
1850 | ||
1851 | =item * | |
1852 | ||
1853 | A regression that allowed undeclared barewords in hash keys to work despite | |
1854 | strictures has been fixed. | |
1855 | L<[perl #126981]|https://rt.perl.org/Ticket/Display.html?id=126981> | |
1856 | ||
1857 | =item * | |
1858 | ||
1859 | Calls to the placeholder C<&PL_sv_yes> used internally when an C<import()> | |
1860 | or C<unimport()> method isn't found now correctly handle scalar context. | |
1861 | L<[perl #126042]|https://rt.perl.org/Ticket/Display.html?id=126042> | |
1862 | ||
1863 | =item * | |
1864 | ||
1865 | Report more context when we see an array where we expect to see an | |
1866 | operator and avoid an assertion failure. | |
1867 | L<[perl #123737]|https://rt.perl.org/Ticket/Display.html?id=123737> | |
1868 | ||
1869 | =item * | |
1870 | ||
1871 | Modifying an array that was previously a package C<@ISA> no longer | |
1872 | causes assertion failures or crashes. | |
1873 | L<[perl #123788]|https://rt.perl.org/Ticket/Display.html?id=123788> | |
1874 | ||
1875 | =item * | |
1876 | ||
1877 | Retain binary compatibility across plain and DEBUGGING perl builds. | |
1878 | L<[perl #127212]|https://rt.perl.org/Ticket/Display.html?id=127212> | |
1879 | ||
1880 | =item * | |
1881 | ||
1882 | Avoid leaking memory when setting C<$ENV{foo}> on darwin. | |
1883 | L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240> | |
1884 | ||
1885 | =item * | |
1886 | ||
1887 | C</...\G/> no longer crashes on utf8 strings. When C<\G> is a fixed number | |
1888 | of characters from the start of the regex, perl needs to count back that | |
1889 | many characters from the current C<pos()> position and start matching from | |
1890 | there. However, it was counting back bytes rather than characters, which | |
1891 | could lead to panics on utf8 strings. | |
1892 | ||
1893 | =item * | |
1894 | ||
1895 | In some cases operators that return integers would return negative | |
1896 | integers as large positive integers. | |
1897 | L<[perl #126635]|https://rt.perl.org/Ticket/Display.html?id=126635> | |
1898 | ||
1899 | =item * | |
1900 | ||
1901 | The C<pipe()> operator would assert for DEBUGGING builds instead of | |
1902 | producing the correct error message. The condition asserted on is | |
1903 | detected and reported on correctly without the assertions, so the | |
1904 | assertions were removed. | |
1905 | L<[perl #126480]|https://rt.perl.org/Ticket/Display.html?id=126480> | |
1906 | ||
1907 | =item * | |
1908 | ||
1909 | In some cases, failing to parse a here-doc would attempt to use freed | |
1910 | memory. This was caused by a pointer not being restored correctly. | |
1911 | L<[perl #126443]|https://rt.perl.org/Ticket/Display.html?id=126443> | |
1912 | ||
1913 | =item * | |
1914 | ||
1915 | C<< @x = sort { *a = 0; $a <=> $b } 0 .. 1 >> no longer frees the GP | |
1916 | for *a before restoring its SV slot. | |
1917 | L<[perl #124097]|https://rt.perl.org/Ticket/Display.html?id=124097> | |
1918 | ||
1919 | =item * | |
1920 | ||
1921 | Multiple problems with the new hexadecimal floating point printf | |
1922 | format C<%a> were fixed: | |
1923 | L<[perl #126582]|https://rt.perl.org/Ticket/Display.html?id=126582>, | |
1924 | L<[perl #126586]|https://rt.perl.org/Ticket/Display.html?id=126586>, | |
1925 | L<[perl #126822]|https://rt.perl.org/Ticket/Display.html?id=126822> | |
1926 | ||
1927 | =item * | |
1928 | ||
1929 | Calling C<mg_set()> in C<leave_scope()> no longer leaks. | |
1930 | ||
1931 | =item * | |
1932 | ||
1933 | A regression from Perl v5.20 was fixed in which debugging output of regular | |
1934 | expression compilation was wrong. (The pattern was correctly compiled, but | |
1935 | what got displayed for it was wrong.) | |
1936 | ||
1937 | =item * | |
1938 | ||
1939 | C<\b{sb}> works much better. In Perl v5.22.0, this new construct didn't | |
1940 | seem to give the expected results, yet passed all the tests in the | |
1941 | extensive suite furnished by Unicode. It turns out that it was because | |
1942 | these were short input strings, and the failures had to do with longer | |
1943 | inputs. | |
1944 | ||
1945 | =item * | |
1946 | ||
1947 | Certain syntax errors in | |
1948 | L<perlrecharclass/Extended Bracketed Character Classes> caused panics | |
1949 | instead of the proper error message. This has now been fixed. [perl | |
1950 | #126481] | |
1951 | ||
1952 | =item * | |
1953 | ||
1954 | Perl 5.20 added a message when a quantifier in a regular | |
1955 | expression was useless, but then caused the parser to skip it; | |
1956 | this caused the surplus quantifier to be silently ignored, instead | |
1957 | of throwing an error. This is now fixed. [perl #126253] | |
1958 | ||
1959 | =item * | |
1960 | ||
1961 | The switch to building non-XS modules last in win32/makefile.mk (introduced | |
1962 | by design as part of the changes to enable parallel building) caused the | |
1963 | build of POSIX to break due to problems with the version module. This | |
1964 | is now fixed. | |
1965 | ||
1966 | =item * | |
1967 | ||
1968 | Improved parsing of hex float constants. | |
1969 | ||
1970 | =item * | |
1971 | ||
1972 | Fixed an issue with C<< pack >> where C<< pack "H" >> (and C<< pack "h" >>) | |
1973 | could read past the source when given a non-utf8 source, and a utf8 target. | |
1974 | [perl #126325] | |
1975 | ||
1976 | =item * | |
1977 | ||
1978 | Fixed several cases where perl would abort due to a segmentation fault, | |
1979 | or a C-level assert. [perl #126615], [perl #126602], [perl #126193]. | |
1980 | ||
1981 | =item * | |
1982 | ||
1983 | There were places in regular expression patterns where comments (C<(?#...)>) | |
1984 | weren't allowed, but should have been. This is now fixed. | |
1985 | L<[perl #116639]|https://rt.perl.org/Ticket/Display.html?id=116639> | |
1986 | ||
1987 | =item * | |
1988 | ||
1989 | Some regressions from Perl 5.20 have been fixed, in which some syntax errors in | |
1990 | L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs | |
1991 | within regular expression patterns could cause a segfault instead of a proper | |
1992 | error message. | |
1993 | L<[perl #126180]|https://rt.perl.org/Ticket/Display.html?id=126180> | |
1994 | L<[perl #126404]|https://rt.perl.org/Ticket/Display.html?id=126404> | |
1995 | ||
1996 | =item * | |
1997 | ||
1998 | Another problem with | |
1999 | L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> | |
2000 | constructs has been fixed wherein things like C<\c]> could cause panics. | |
2001 | L<[perl #126181]|https://rt.perl.org/Ticket/Display.html?id=126181> | |
2002 | ||
2003 | =item * | |
2004 | ||
2005 | Some problems with attempting to extend the perl stack to around 2G or 4G | |
2006 | entries have been fixed. This was particularly an issue on 32-bit perls built | |
2007 | to use 64-bit integers, and was easily noticeable with the list repetition | |
2008 | operator, e.g. | |
2009 | ||
2010 | @a = (1) x $big_number | |
2011 | ||
2012 | Formerly perl may have crashed, depending on the exact value of C<$big_number>; | |
2013 | now it will typically raise an exception. | |
2014 | L<[perl #125937]|https://rt.perl.org/Ticket/Display.html?id=125937> | |
2015 | ||
2016 | =item * | |
2017 | ||
2018 | In a regex conditional expression C<(?(condition)yes-pattern|no-pattern)>, if | |
2019 | the condition is C<(?!)> then perl failed the match outright instead of | |
2020 | matching the no-pattern. This has been fixed. | |
2021 | L<[perl #126222]|https://rt.perl.org/Ticket/Display.html?id=126222> | |
2022 | ||
2023 | =item * | |
2024 | ||
2025 | The special backtracking control verbs C<(*VERB:ARG)> now all allow an optional | |
2026 | argument and set C<REGERROR>/C<REGMARK> appropriately as well. | |
2027 | L<[perl #126186]|https://rt.perl.org/Ticket/Display.html?id=126186> | |
2028 | ||
2029 | =item * | |
2030 | ||
2031 | Several bugs, including a segmentation fault, have been fixed with the boundary | |
2032 | checking constructs (introduced in Perl 5.22) C<\b{gcb}>, C<\b{sb}>, C<\b{wb}>, | |
2033 | C<\B{gcb}>, C<\B{sb}>, and C<\B{wb}>. All the C<\B{}> ones now match an empty | |
2034 | string; none of the C<\b{}> ones do. | |
2035 | L<[perl #126319]|https://rt.perl.org/Ticket/Display.html?id=126319> | |
2036 | ||
2037 | =item * | |
2038 | ||
2039 | Duplicating a closed file handle for write no longer creates a | |
2040 | filename of the form F<GLOB(0xXXXXXXXX)>. [perl #125115] | |
2041 | ||
2042 | =item * | |
2043 | ||
2044 | Warning fatality is now ignored when rewinding the stack. This | |
2045 | prevents infinite recursion when the now fatal error also causes | |
2046 | rewinding of the stack. [perl #123398] | |
2047 | ||
2048 | =item * | |
2049 | ||
2050 | In perl v5.22.0, the logic changed when parsing a numeric parameter to the -C | |
2051 | option, such that the successfully parsed number was not saved as the option | |
2052 | value if it parsed to the end of the argument. [perl #125381] | |
2053 | ||
2054 | =item * | |
2055 | ||
2056 | The PadlistNAMES macro is an lvalue again. | |
2057 | ||
2058 | =item * | |
2059 | ||
2060 | Zero -DPERL_TRACE_OPS memory for sub-threads. | |
2061 | ||
2062 | C<perl_clone_using()> was missing Zero init of PL_op_exec_cnt[]. This | |
2063 | caused sub-threads in threaded -DPERL_TRACE_OPS builds to spew exceedingly | |
2064 | large op-counts at destruct. These counts would print %x as "ABABABAB", | |
2065 | clearly a mem-poison value. | |
2066 | ||
2067 | =item * | |
2068 | ||
2069 | A leak in the XS typemap caused one scalar to be leaked each time a C<FILE *> | |
2070 | or a C<PerlIO *> was C<OUTPUT:>ed or imported to Perl, since perl 5.000. These | |
2071 | particular typemap entries are thought to be extremely rarely used by XS | |
2072 | modules. [perl #124181] | |
2073 | ||
2074 | =item * | |
2075 | ||
2076 | C<alarm()> and C<sleep()> will now warn if the argument is a negative number | |
2077 | and return undef. Previously they would pass the negative value to the | |
2078 | underlying C function which may have set up a timer with a surprising value. | |
2079 | ||
2080 | =item * | |
2081 | ||
2082 | Perl can again be compiled with any Unicode version. This used to | |
2083 | (mostly) work, but was lost in v5.18 through v5.20. The property | |
2084 | C<Name_Alias> did not exist prior to Unicode 5.0. L<Unicode::UCD> | |
2085 | incorrectly said it did. This has been fixed. | |
2086 | ||
2087 | =item * | |
2088 | ||
2089 | Very large code-points (beyond Unicode) in regular expressions no | |
2090 | longer cause a buffer overflow in some cases when converted to UTF-8. | |
2091 | L<[perl #125826]|https://rt.perl.org/Ticket/Display.html?id=125826> | |
2092 | ||
2093 | =item * | |
2094 | ||
2095 | The integer overflow check for the range operator (...) in list | |
2096 | context now correctly handles the case where the size of the range is | |
2097 | larger than the address space. This could happen on 32-bits with | |
2098 | -Duse64bitint. | |
2099 | L<[perl #125781]|https://rt.perl.org/Ticket/Display.html?id=125781> | |
2100 | ||
2101 | =item * | |
2102 | ||
2103 | A crash with C<< %::=(); J->${\"::"} >> has been fixed. | |
2104 | L<[perl #125541]|https://rt.perl.org/Ticket/Display.html?id=125541> | |
2105 | ||
2106 | =item * | |
2107 | ||
2108 | C<qr/(?[ () ])/> no longer segfaults, giving a syntax error message instead. | |
2109 | [perl #125805] | |
2110 | ||
2111 | =item * | |
2112 | ||
2113 | Regular expression possessive quantifier v5.20 regression now fixed. | |
2114 | C<qr/>I<PAT>C<{>I<min>,I<max>C<}+>C</> is supposed to behave identically | |
2115 | to C<qr/(?E<gt>>I<PAT>C<{>I<min>,I<max>C<})/>. Since v5.20, this didn't | |
2116 | work if I<min> and I<max> were equal. [perl #125825] | |
2117 | ||
2118 | =item * | |
2119 | ||
2120 | C<< BEGIN <> >> no longer segfaults and properly produces an error | |
2121 | message. [perl #125341] | |
2122 | ||
2123 | =item * | |
2124 | ||
2125 | In C<tr///> an illegal backwards range like C<tr/\x{101}-\x{100}//> was | |
2126 | not always detected, giving incorrect results. This is now fixed. | |
2127 | ||
2128 | =back | |
2129 | ||
2130 | =head1 Acknowledgements | |
2131 | ||
2132 | Perl 5.24.0 represents approximately 11 months of development since Perl 5.24.0 | |
2133 | and contains approximately 360,000 lines of changes across 1,800 files from 75 | |
2134 | authors. | |
2135 | ||
2136 | Excluding auto-generated files, documentation and release tools, there were | |
2137 | approximately 250,000 lines of changes to 1,200 .pm, .t, .c and .h files. | |
2138 | ||
2139 | Perl continues to flourish into its third decade thanks to a vibrant community | |
2140 | of users and developers. The following people are known to have contributed the | |
2141 | improvements that became Perl 5.24.0: | |
2142 | ||
2143 | Aaron Crane, Aaron Priven, Abigail, Achim Gratz, Alexander D'Archangel, Alex | |
2144 | Vandiver, Andreas König, Andy Broad, Andy Dougherty, Aristotle Pagaltzis, | |
2145 | Chase Whitener, Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn | |
2146 | Ilmari Mannsåker, Dan Collins, Daniel Dragan, David Golden, David Mitchell, | |
2147 | Doug Bell, Dr.Ruud, Ed Avis, Ed J, Father Chrysostomos, Herbert Breunung, | |
2148 | H.Merijn Brand, Hugo van der Sanden, Ivan Pozdeev, James E Keenan, Jan Dubois, | |
2149 | Jarkko Hietaniemi, Jerry D. Hedden, Jim Cromie, John Peacock, John SJ Anderson, | |
2150 | Karen Etheridge, Karl Williamson, kmx, Leon Timmermans, Ludovic E. R. | |
2151 | Tolhurst-Cleaver, Lukas Mai, Martijn Lievaart, Matthew Horsfall, Mattia Barbon, | |
2152 | Max Maischein, Mohammed El-Afifi, Nicholas Clark, Nicolas R., Niko Tyni, Peter | |
2153 | John Acklam, Peter Martini, Peter Rabbitson, Pip Cet, Rafael Garcia-Suarez, | |
2154 | Reini Urban, Ricardo Signes, Sawyer X, Shlomi Fish, Sisyphus, Stanislaw Pusep, | |
2155 | Steffen Müller, Stevan Little, Steve Hay, Sullivan Beck, Thomas Sibley, Todd | |
2156 | Rinaldo, Tom Hukins, Tony Cook, Unicode Consortium, Victor Adam, Vincent Pit, | |
2157 | Vladimir Timofeev, Yves Orton, Zachary Storer, Zefram. | |
2158 | ||
2159 | The list above is almost certainly incomplete as it is automatically generated | |
2160 | from version control history. In particular, it does not include the names of | |
2161 | the (very much appreciated) contributors who reported issues to the Perl bug | |
2162 | tracker. | |
2163 | ||
2164 | Many of the changes included in this version originated in the CPAN modules | |
2165 | included in Perl's core. We're grateful to the entire CPAN community for | |
2166 | helping Perl to flourish. | |
2167 | ||
2168 | For a more complete list of all of Perl's historical contributors, please see | |
2169 | the F<AUTHORS> file in the Perl source distribution. | |
2170 | ||
2171 | =head1 Reporting Bugs | |
2172 | ||
2173 | If you find what you think is a bug, you might check the articles recently | |
2174 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
2175 | https://rt.perl.org/ . There may also be information at | |
2176 | http://www.perl.org/ , the Perl Home Page. | |
2177 | ||
2178 | If you believe you have an unreported bug, please run the L<perlbug> program | |
2179 | included with your release. Be sure to trim your bug down to a tiny but | |
2180 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
2181 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
2182 | ||
2183 | If the bug you are reporting has security implications which make it | |
2184 | inappropriate to send to a publicly archived mailing list, then see | |
2185 | L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> | |
2186 | for details of how to report the issue. | |
2187 | ||
2188 | =head1 SEE ALSO | |
2189 | ||
2190 | The F<Changes> file for an explanation of how to view exhaustive details on | |
2191 | what changed. | |
2192 | ||
2193 | The F<INSTALL> file for how to build Perl. | |
2194 | ||
2195 | The F<README> file for general stuff. | |
2196 | ||
2197 | The F<Artistic> and F<Copying> files for copyright information. | |
2198 | ||
2199 | =cut |