Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
7065301c | 5 | perldelta - what is new for perl v5.21.1 |
c68523cb | 6 | |
238894db | 7 | =head1 DESCRIPTION |
c68523cb | 8 | |
7065301c | 9 | This document describes differences between the 5.21.0 release and the 5.21.1 |
238894db | 10 | release. |
c68523cb | 11 | |
7065301c RS |
12 | If you are upgrading from an earlier release such as 5.20.0, first read |
13 | L<perl5210delta>, which describes differences between 5.20.0 and 5.21.0. | |
14 | ||
15 | =head1 Notice | |
16 | ||
081463c3 MH |
17 | This release removes a number of previously deprecated constructs, many |
18 | that have been around for a long time. Please see L</"Incompatible Changes"> | |
19 | for more information. | |
7065301c RS |
20 | |
21 | =head1 Core Enhancements | |
22 | ||
09edd811 KW |
23 | =head2 Unicode 7.0 is now supported |
24 | ||
25 | For details on what is in this release, see | |
26 | L<http://www.unicode.org/versions/Unicode7.0.0/>. | |
27 | ||
7e957246 MH |
28 | =head2 Experimental C Backtrace API |
29 | ||
30 | Starting from Perl 5.21.1, on some platforms Perl supports retrieving | |
31 | the C level backtrace (similar to what symbolic debuggers like gdb do). | |
32 | ||
33 | The backtrace returns the stack trace of the C call frames, | |
34 | with the symbol names (function names), the object names (like "perl"), | |
35 | and if it can, also the source code locations (file:line). | |
36 | ||
37 | The supported platforms are Linux and OS X (some *BSD might work at | |
38 | least partly, but they have not yet been tested). | |
39 | ||
40 | The feature needs to be enabled with C<Configure -Dusecbacktrace>. | |
41 | ||
42 | Also included is a C API to retrieve backtraces. | |
43 | ||
44 | See L<perlhacktips/"C backtrace"> for more information. | |
45 | ||
8373491a KW |
46 | =head2 C<qr/foo/x> now ignores any Unicode pattern white space |
47 | ||
48 | The C</x> regular expression modifier allows the pattern to contain | |
49 | white space and comments, both of which are ignored, for improved | |
50 | readability. Until now, not all the white space characters that Unicode | |
51 | designates for this purpose were handled. The additional ones now | |
52 | recognized are | |
53 | U+0085 NEXT LINE, | |
54 | U+200E LEFT-TO-RIGHT MARK, | |
55 | U+200F RIGHT-TO-LEFT MARK, | |
56 | U+2028 LINE SEPARATOR, | |
57 | and | |
58 | U+2029 PARAGRAPH SEPARATOR. | |
59 | ||
d6ded950 KW |
60 | =head2 S<C<use locale>> can restrict which locale categories are affected |
61 | ||
62 | It is now possible to pass a parameter to S<C<use locale>> to specify | |
63 | a subset of locale categories to be locale-aware, with the remaining | |
64 | ones unaffected. See L<perllocale/The "use locale" pragma> for details. | |
65 | ||
7065301c RS |
66 | =head1 Incompatible Changes |
67 | ||
98b7895c MH |
68 | =head2 C<\N{}> with a sequence of multiple spaces is now a fatal error. |
69 | ||
70 | This has been deprecated since v5.18. | |
71 | ||
7357bd17 KW |
72 | =head2 In double-quotish C<\cI<X>>, I<X> must now be a printable ASCII character |
73 | ||
74 | In prior releases, failure to do this raised a deprecation warning. | |
7065301c | 75 | |
cd209d9d KW |
76 | =head2 Splitting the tokens C<(?> and C<(*> in regular expressions is |
77 | now a fatal compilation error. | |
78 | ||
79 | These had been deprecated since v5.18. | |
80 | ||
8373491a KW |
81 | =head2 5 additional characters are treated as white space under C</x> in |
82 | regex patterns (unless escaped) | |
83 | ||
84 | The use of these characters with C</x> outside bracketed character | |
85 | classes and when not preceeded by a backslash has raised a deprecation | |
86 | warning since v5.18. Now they will be ignored. See L</qrE<sol>fooE<sol>x> | |
87 | for the list of the five characters. | |
88 | ||
89 | =head2 Comment lines within S<C<(?[ ])>> now are ended only by a C<\n> | |
90 | ||
91 | S<C<(?[ ])>> is an experimental feature, introduced in v5.18. It operates | |
92 | as if C</x> is always enabled. But there was a difference, comment | |
93 | lines (following a C<#> character) were terminated by anything matching | |
94 | C<\R> which includes all vertical whitespace, such as form feeds. For | |
95 | consistency, this is now changed to match what terminates comment lines | |
96 | outside S<C<(?[ ])>>, namely a C<\n> (even if escaped), which is the | |
97 | same as what terminates a heredoc string and formats. | |
98 | ||
b5adc3e5 DIM |
99 | =head2 Omitting % and @ on hash and array names is no longer permitted |
100 | ||
101 | Really old Perl let you omit the @ on array names and the % on hash | |
102 | names in some spots. This has issued a deprecation warning since Perl | |
103 | 5.0, and is no longer permitted. | |
104 | ||
2c6ee1a7 KW |
105 | =head2 C<"$!"> text is now in English outside C<"use locale"> scope |
106 | ||
107 | Previously, the text, unlike almost everything else, always came out | |
108 | based on the current underlying locale of the program. (Also affected | |
109 | on some systems is C<"$^E>".) For programs that are unprepared to | |
110 | handle locale, this can cause garbage text to be displayed. It's better | |
111 | to display text that is translatable via some tool than garbage text | |
112 | which is much harder to figure out. | |
113 | ||
5320b60d KW |
114 | =head2 C<"$!"> text will be returned in UTF-8 when appropriate |
115 | ||
116 | The stringification of C<$!> and C<$^E> will have the UTF-8 flag set | |
117 | when the text is actually non-ASCII UTF-8. This will enable programs | |
118 | that are set up to be locale-aware to properly output messages in the | |
119 | user's native language. Code that needs to continue the 5.20 and | |
120 | earlier behavior can do the stringification within the scopes of both | |
121 | 'use bytes' and 'use locale ":messages". No other Perl operations will | |
122 | be affected by locale; only C<$!> and C<$^E> stringification. The | |
123 | 'bytes' pragma causes the UTF-8 flag to not be set, just as in previous | |
124 | Perl releases. This resolves [perl #112208]. | |
125 | ||
c3383756 DIM |
126 | =head2 Support for C<?PATTERN?> without explicit operator has been removed |
127 | ||
128 | Starting regular expressions matching only once directly with the | |
129 | question mark delimiter is now a syntax error, so that the question mark | |
130 | can be available for use in new operators. Write C<m?PATTERN?> instead, | |
131 | explicitly using the C<m> operator: the question mark delimiter still | |
132 | invokes match-once behaviour. | |
133 | ||
36304e49 KW |
134 | =head2 C<defined(@array)> and C<defined(%hash)> are now fatal errors |
135 | ||
136 | These have been deprecated since v5.6.1 and have raised deprecation | |
137 | warnings since v5.16. | |
138 | ||
139 | =head2 Using a hash or an array as a reference are now fatal errors. | |
140 | ||
141 | For example, C<%foo-E<gt>{"bar"}> now causes a fatal compilation | |
142 | error. These have been deprecated since before v5.8, and have raised | |
143 | deprecation warnings since then. | |
144 | ||
7065301c RS |
145 | =head1 Deprecations |
146 | ||
df758df2 KW |
147 | =head2 Using a NO-BREAK space in a character alias for C<\N{...}> is now |
148 | deprecated | |
149 | ||
150 | This non-graphic character is essentially indistinguishable from a | |
151 | regular space, and so should not be allowed. See | |
152 | L<charnames/CUSTOM ALIASES>. | |
153 | ||
412f55bb KW |
154 | =head2 A literal C<"{"> should now be escaped in a pattern |
155 | ||
156 | If you want a literal left curly bracket (also called a left brace) in a | |
157 | regular expression pattern, you should now escape it by either | |
158 | preceding it with a backslash (C<"\{">) or enclosing it within square | |
159 | brackets C<"[{]">, or by using C<\Q>; otherwise a deprecation warning | |
160 | will be raised. This was first announced as forthcoming in the v5.16 | |
161 | release; it will allow future extensions to the language to happen. | |
162 | ||
7065301c RS |
163 | =head1 Performance Enhancements |
164 | ||
7065301c RS |
165 | =over 4 |
166 | ||
167 | =item * | |
168 | ||
8a16341a MH |
169 | Many internal functions have been refactored to improve performance and reduce |
170 | their memory footprints. | |
d133a3dd MH |
171 | |
172 | L<[perl #121436]|https://rt.perl.org/Ticket/Display.html?id=121436> | |
8a16341a MH |
173 | L<[perl #121906]|https://rt.perl.org/Ticket/Display.html?id=121906> |
174 | L<[perl #121969]|https://rt.perl.org/Ticket/Display.html?id=121969> | |
7065301c | 175 | |
6bb82be0 MH |
176 | =item * |
177 | ||
178 | C<-T> and C<-B> filetests will return sooner when an empty file is detected. | |
179 | ||
180 | L<perl #121489|https://rt.perl.org/Ticket/Display.html?id=121489> | |
181 | ||
7065301c RS |
182 | =back |
183 | ||
7ef8b31d | 184 | =head1 Modules and Pragmata |
f6f3144e | 185 | |
7065301c RS |
186 | XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> |
187 | go here. If Module::CoreList is updated, generate an initial draft of the | |
188 | following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary | |
189 | for important changes should then be added by hand. In an ideal world, | |
190 | dual-life modules would have a F<Changes> file that could be cribbed. | |
191 | ||
192 | [ Within each section, list entries as a =item entry ] | |
193 | ||
194 | =head2 New Modules and Pragmata | |
24a38d90 RS |
195 | |
196 | =over 4 | |
197 | ||
198 | =item * | |
199 | ||
7065301c RS |
200 | XXX |
201 | ||
202 | =back | |
203 | ||
204 | =head2 Updated Modules and Pragmata | |
205 | ||
206 | =over 4 | |
24a38d90 RS |
207 | |
208 | =item * | |
209 | ||
56cdf413 TC |
210 | L<Carp> has been upgraded from version 1.3301 to 1.34. |
211 | ||
212 | Carp::Heavy now ignores version mismatches with Carp if Carp is newer | |
213 | than 1.12, since Carp::Heavy's guts were merged into Carp at that | |
214 | point. | |
215 | L<[perl #121574]|https://rt.perl.org/Ticket/Display.html?id=121574> | |
216 | ||
217 | =item * | |
218 | ||
f9dc9a54 TC |
219 | L<Data::Dumper> has been upgraded from version 2.151 to 2.152. |
220 | ||
221 | Changes to resolve Coverity issues. | |
222 | ||
223 | XS dumps incorrectly stored the name of code references stored in a | |
224 | GLOB. | |
225 | L<[perl #122070]|https://rt.perl.org/Ticket/Display.html?id=122070> | |
226 | ||
227 | =item * | |
228 | ||
28e02325 SH |
229 | L<Encode> has been upgraded from version 2.60_01 to 2.62. |
230 | ||
231 | B<piconv> now has better error handling when the encoding name is nonexistent, | |
232 | and a build breakage when upgrading L<Encode> in perl-5.8.2 and earlier has | |
233 | been fixed. | |
234 | ||
235 | =item * | |
236 | ||
cb526893 TC |
237 | L<Hash::Util> has been upgraded from version 0.16 to 0.17. |
238 | ||
239 | Minor bug fixes and documentation fixes to Hash::Util::hash_stats() | |
240 | ||
241 | =item * | |
242 | ||
5abafd4c SH |
243 | The libnet collection of modules has been upgraded from version 1.25 to 1.27. |
244 | ||
245 | There are only whitespace changes to the installed files. | |
246 | ||
247 | =item * | |
248 | ||
7a945bf5 SH |
249 | The Locale-Codes collection of modules has been upgraded from vesion 3.30 to 3.31. |
250 | ||
251 | Fixed a bug in the scripts used to extract data from spreadsheets that | |
252 | prevented the SHP currency code from being found. | |
253 | L<[cpan #94229]|https://rt.cpan.org/Ticket/Display.html?id=94229> | |
254 | ||
255 | =item * | |
256 | ||
4ed8f5ed TC |
257 | L<Math::BigInt> has been upgraded from version 1.9993 to 1.9994. |
258 | ||
259 | Synchronize POD changes from the CPAN release. | |
260 | ||
ee15bb65 TC |
261 | C<< Math::BigFloat->blog(x) >> would sometimes return blog(2*x) when |
262 | the accuracy was greater than 70 digits. | |
263 | ||
264 | The result of C<< Math::BigFloat->bdiv() >> in list context now | |
265 | satisfies C<< x = quotient * divisor + remainder >>. | |
266 | ||
4ed8f5ed TC |
267 | =item * |
268 | ||
234105dd TC |
269 | L<Math::BigRat> has been upgraded from version 0.2606 to 0.2607. |
270 | ||
271 | Synchronize POD changes from the CPAN release. | |
272 | ||
273 | =item * | |
274 | ||
f97d984b | 275 | L<Module::Metadata> has been upgraded from version 1.000022 to 1.000024. |
b9beed70 SH |
276 | |
277 | Support installations on older perls with an L<ExtUtils::MakeMaker> earlier | |
278 | than 6.63_03 | |
279 | ||
280 | =item * | |
281 | ||
f9dc9a54 TC |
282 | L<OS2::Process> has been upgraded from version 1.09 to 1.10. |
283 | ||
284 | =item * | |
285 | ||
c13fd1a2 TC |
286 | L<perl5db.pl> has been upgraded from version 1.44 to 1.45. |
287 | ||
288 | fork() in the debugger under C<tmux> will now create a new window for | |
891822fa TC |
289 | the forked process. L<[perl |
290 | #121333]|https://rt.perl.org/Ticket/Display.html?id=121333> | |
291 | ||
292 | The debugger now saves the current working directory on startup and | |
293 | restores it when you restart your program with C<R> or <rerun>. L<[perl | |
294 | #121509]|https://rt.perl.org/Ticket/Display.html?id=121509> | |
24a38d90 | 295 | |
cb526893 TC |
296 | =item * |
297 | ||
f9dc9a54 TC |
298 | L<PerlIO::encoding> has been upgraded from version 0.18 to 0.19. |
299 | ||
300 | No changes in behaviour. | |
301 | ||
302 | =item * | |
303 | ||
304 | L<PerlIO::mmap> has been upgraded from version 0.012 to 0.013. | |
305 | ||
306 | No changes in behaviour. | |
307 | ||
308 | =item * | |
309 | ||
310 | L<PerlIO::scalar> has been upgraded from version 0.18 to 0.19. | |
311 | ||
312 | No changes in behaviour. | |
313 | ||
314 | =item * | |
315 | ||
f8187d97 SH |
316 | L<Unicode::Collate> has been upgraded from version 1.04 to 1.07. |
317 | ||
318 | Version 0.67's improved discontiguous contractions is invalidated by default | |
319 | and is supported as a parameter 'long_contraction'. | |
320 | ||
95f3e8d2 SH |
321 | =item * |
322 | ||
323 | L<Unicode::Normalize> has been upgraded from version 1.17 to 1.18. | |
324 | ||
325 | The XSUB implementation has been removed in favour of pure Perl. | |
326 | ||
3eaa3d14 YO |
327 | =item * |
328 | ||
cb526893 TC |
329 | A mismatch between the documentation and the code in utf8::downgrade() |
330 | was fixed in favour of the documentation. The optional second argument | |
331 | is now correctly treated as a perl boolean (true/false semantics) and | |
332 | not as an integer. | |
3eaa3d14 | 333 | |
238894db | 334 | =back |
24a38d90 | 335 | |
92fa985e | 336 | =head2 Removed Modules and Pragmata |
24a38d90 | 337 | |
238894db | 338 | =over 4 |
24a38d90 RS |
339 | |
340 | =item * | |
341 | ||
7065301c RS |
342 | XXX |
343 | ||
344 | =back | |
345 | ||
346 | =head1 Documentation | |
347 | ||
7065301c RS |
348 | =head2 Changes to Existing Documentation |
349 | ||
9c0f2733 | 350 | =head3 L<perlfunc> |
7065301c RS |
351 | |
352 | =over 4 | |
353 | ||
354 | =item * | |
355 | ||
9c0f2733 MH |
356 | C<-l> now notes that it will return false if symlinks aren't supported by the |
357 | file system. | |
358 | ||
359 | L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523> | |
7065301c | 360 | |
902c1f75 MH |
361 | =item * |
362 | ||
363 | Note that C<exec LIST> and C<system LIST> may fall back to the shell on | |
364 | Win32. Only C<exec PROGRAM LIST> and C<system PROGRAM LIST> indirect object | |
365 | syntax will reliably avoid using the shell. | |
366 | ||
367 | This has also been noted in L<perlport>. | |
368 | ||
369 | L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046> | |
370 | ||
7065301c RS |
371 | =back |
372 | ||
58f25ac1 MH |
373 | =head3 L<perlapi> |
374 | ||
375 | =over 4 | |
376 | ||
377 | =item * | |
378 | ||
2402c6dd MH |
379 | Note that C<SvSetSV> doesn't do set magic. |
380 | ||
381 | =item * | |
382 | ||
58f25ac1 MH |
383 | C<sv_usepvn_flags> - Fix documentation to mention the use of C<NewX> instead of |
384 | C<malloc>. | |
385 | ||
386 | L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869> | |
387 | ||
4c6609d3 MH |
388 | =item * |
389 | ||
390 | Clarify where C<NUL> may be embedded or is required to terminate a string. | |
391 | ||
5bafdaa4 MH |
392 | =item * |
393 | ||
394 | Previously missing documentation due to formatting errors are now included. | |
395 | ||
396 | =item * | |
397 | ||
398 | Entries are now organized into groups rather than by file where they are found. | |
399 | ||
400 | =item * | |
401 | ||
402 | Alphabetical sorting of entries is now handled by the POD generator to make | |
403 | entries easier to find when scanning. | |
404 | ||
58f25ac1 MH |
405 | =back |
406 | ||
12042f24 MH |
407 | =head3 L<perlhacktips> |
408 | ||
409 | =over 4 | |
410 | ||
411 | =item * | |
412 | ||
413 | Updated documentation for the C<test.valgrind> C<make> target. | |
414 | ||
415 | L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431> | |
416 | ||
417 | =back | |
418 | ||
2705070b MH |
419 | =head3 L<perlre> |
420 | ||
421 | =over 4 | |
422 | ||
423 | =item * | |
424 | ||
425 | The C</x> modifier has been clarified to note that comments cannot be continued | |
426 | onto the next line by escaping them. | |
427 | ||
428 | =back | |
429 | ||
b10906fb MH |
430 | =head3 L<Unicode::UCD> |
431 | ||
432 | =over 4 | |
433 | ||
434 | =item * | |
435 | ||
436 | The documentation includes many clarifications and fixes. | |
437 | ||
438 | =back | |
439 | ||
7065301c RS |
440 | =head1 Diagnostics |
441 | ||
442 | The following additions or changes have been made to diagnostic output, | |
443 | including warnings and fatal error messages. For the complete list of | |
444 | diagnostic messages, see L<perldiag>. | |
445 | ||
7065301c RS |
446 | =head2 New Diagnostics |
447 | ||
7065301c RS |
448 | =head3 New Errors |
449 | ||
450 | =over 4 | |
24a38d90 RS |
451 | |
452 | =item * | |
453 | ||
28462159 MH |
454 | L<In '(?...)', the '(' and '?' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(?...)', the '(' and '?' must be adjacent in regex; marked by <-- HERE in m/%s/"> |
455 | ||
456 | (F) The two-character sequence C<"(?"> in | |
457 | this context in a regular expression pattern should be an | |
458 | indivisible token, with nothing intervening between the C<"("> | |
459 | and the C<"?">, but you separated them. | |
460 | ||
461 | =item * | |
462 | ||
463 | L<In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by <-- HERE in m/%s/"> | |
464 | ||
465 | (F) The two-character sequence C<"(*"> in | |
466 | this context in a regular expression pattern should be an | |
467 | indivisible token, with nothing intervening between the C<"("> | |
468 | and the C<"*">, but you separated them. | |
469 | ||
470 | =item * | |
471 | ||
472 | L<charnames alias definitions may not contain a sequence of multiple spaces|perldiag/"charnames alias definitions may not contain a sequence of multiple spaces"> | |
473 | ||
474 | (F) You defined a character name which had multiple space | |
475 | characters in a row. Change them to single spaces. Usually these | |
476 | names are defined in the C<:alias> import argument to C<use charnames>, but | |
477 | they could be defined by a translator installed into C<$^H{charnames}>. | |
478 | See L<charnames/CUSTOM ALIASES>. | |
479 | ||
480 | =item * | |
481 | ||
482 | L<charnames alias definitions may not contain trailing white-space|perldiag/"charnames alias definitions may not contain trailing white-space"> | |
483 | ||
484 | (F) You defined a character name which ended in a space | |
485 | character. Remove the trailing space(s). Usually these names are | |
486 | defined in the C<:alias> import argument to C<use charnames>, but they | |
487 | could be defined by a translator installed into C<$^H{charnames}>. | |
488 | See L<charnames/CUSTOM ALIASES>. | |
489 | ||
490 | =item * | |
491 | ||
492 | L<Can't use a hash as a reference|perldiag/"Can't use a hash as a reference"> | |
493 | ||
494 | (F) You tried to use a hash as a reference, as in | |
495 | C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl <= 5.6.1 | |
496 | used to allow this syntax, but shouldn't have. | |
497 | ||
498 | =item * | |
499 | ||
500 | L<Can't use an array as a reference|perldiag/"Can't use an array as a reference"> | |
501 | ||
502 | (F) You tried to use an array as a reference, as in | |
503 | C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl <= 5.6.1 used to | |
504 | allow this syntax, but shouldn't have. | |
505 | ||
506 | =item * | |
507 | ||
508 | L<Can't use 'defined(@array)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(@array)' (Maybe you should just omit the defined()?)"> | |
509 | ||
510 | (F) defined() is not useful on arrays because it | |
511 | checks for an undefined I<scalar> value. If you want to see if the | |
512 | array is empty, just use C<if (@array) { # not empty }> for example. | |
513 | ||
514 | =item * | |
515 | ||
516 | L<Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)"> | |
517 | ||
518 | (F) C<defined()> is not usually right on hashes. | |
519 | ||
520 | Although C<defined %hash> is false on a plain not-yet-used hash, it | |
521 | becomes true in several non-obvious circumstances, including iterators, | |
522 | weak references, stash names, even remaining true after C<undef %hash>. | |
523 | These things make C<defined %hash> fairly useless in practice, so it now | |
524 | generates a fatal error. | |
525 | ||
526 | If a check for non-empty is what you wanted then just put it in boolean | |
527 | context (see L<perldata/Scalar values>): | |
528 | ||
529 | if (%hash) { | |
530 | # not empty | |
531 | } | |
532 | ||
533 | If you had C<defined %Foo::Bar::QUUX> to check whether such a package | |
534 | variable exists then that's never really been reliable, and isn't | |
535 | a good way to enquire about the features of a package, or whether | |
536 | it's loaded, etc. | |
537 | ||
538 | =item * | |
539 | ||
540 | L<Illegal suidscript|perldiag/"Illegal suidscript"> | |
541 | ||
542 | (F) The script run under suidperl was somehow illegal. | |
7065301c RS |
543 | |
544 | =back | |
545 | ||
546 | =head3 New Warnings | |
547 | ||
548 | =over 4 | |
24a38d90 RS |
549 | |
550 | =item * | |
551 | ||
28462159 MH |
552 | L<Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%s/"> |
553 | ||
554 | (D deprecated, regexp) You used a literal C<"{"> character in a regular | |
555 | expression pattern. You should change to use C<"\{"> instead, because a future | |
556 | version of Perl (tentatively v5.26) will consider this to be a syntax error. If | |
557 | the pattern delimiters are also braces, any matching right brace | |
558 | (C<"}">) should also be escaped to avoid confusing the parser, for | |
559 | example, | |
560 | ||
561 | qr{abc\{def\}ghi} | |
562 | ||
563 | =item * | |
564 | ||
565 | L<NO-BREAK SPACE in a charnames alias definition is deprecated|perldiag/"NO-BREAK SPACE in a charnames alias definition is deprecated"> | |
566 | ||
567 | (D deprecated) You defined a character name which contained a no-break | |
568 | space character. Change it to a regular space. Usually these names are | |
569 | defined in the C<:alias> import argument to C<use charnames>, but they | |
570 | could be defined by a translator installed into C<$^H{charnames}>. See | |
571 | L<charnames/CUSTOM ALIASES>. | |
572 | ||
573 | =item * | |
574 | ||
575 | L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental"> | |
576 | ||
577 | (S experimental::win32_perlio) The C<:win32> PerlIO layer is | |
578 | experimental. If you want to take the risk of using this layer, | |
579 | simply disable this warning: | |
580 | ||
581 | no warnings "experimental::win32_perlio"; | |
582 | ||
583 | =item * | |
584 | ||
585 | L<Negative repeat count does nothing|perldiag/"Negative repeat count does nothing"> | |
586 | ||
587 | (W numeric) You tried to execute the | |
588 | L<C<x>|perlop/Multiplicative Operators> repetition operator fewer than 0 | |
589 | times, which doesn't make sense. | |
590 | ||
591 | =item * | |
592 | ||
593 | L<localtime(%f) failed|perldiag/"localtime(%f) failed"> | |
594 | ||
595 | (W overflow) You called C<localtime> with a number that it could not handle: | |
596 | too large, too small, or NaN. The returned value is C<undef>. | |
597 | ||
598 | =item * | |
599 | ||
600 | L<gmtime(%f) failed|perldiag/"gmtime(%f) failed"> | |
601 | ||
602 | (W overflow) You called C<gmtime> with a number that it could not handle: | |
603 | too large, too small, or NaN. The returned value is C<undef>. | |
604 | ||
605 | =item * | |
606 | ||
097675bf TC |
607 | L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">: |
608 | ||
609 | (S experimental::win32_perlio) The C<:win32> PerlIO layer is | |
610 | experimental. If you want to take the risk of using this layer, | |
611 | simply disable this warning: | |
612 | ||
613 | no warnings "experimental::win32_perlio"; | |
24a38d90 | 614 | |
28462159 | 615 | =item * |
b3211734 KW |
616 | |
617 | L<Negative repeat count does nothing|perldiag/Negative repeat count does nothing> | |
618 | ||
619 | (W numeric) This warns when the repeat count of the | |
620 | L<C<x>|perlop/Multiplicative Operators> repetition operator is | |
621 | negative. | |
622 | ||
623 | This warning may be changed or removed if it turn out that it was | |
624 | unwise to have added it. | |
625 | ||
238894db | 626 | =back |
24a38d90 | 627 | |
7065301c | 628 | =head2 Changes to Existing Diagnostics |
24a38d90 | 629 | |
7065301c RS |
630 | =over 4 |
631 | ||
632 | =item * | |
633 | ||
b08d439a MH |
634 | L<Variable length lookbehind not implemented in regex mE<sol>%sE<sol>|perldiag/"Variable length lookbehind not implemented in regex m/%s/"> |
635 | ||
636 | Information about Unicode behaviour has been added. | |
637 | ||
638 | =item * | |
639 | ||
747b6130 MH |
640 | <> should be quotes |
641 | ||
642 | This warning has been changed to | |
643 | L<< <> at require-statement should be quotes|perldiag/"<> at require-statement should be quotes" >> | |
644 | to make the issue more identifiable. | |
645 | ||
646 | =item * | |
647 | ||
723edb96 TC |
648 | L<Unsuccessful %s on filename containing newline|perldiag/"Unsuccessful %s on filename containing newline"> |
649 | ||
650 | This warning is now only produced when the newline is at the end of | |
651 | the filename. | |
7065301c RS |
652 | |
653 | =back | |
654 | ||
655 | =head1 Utility Changes | |
656 | ||
eb561242 | 657 | =head2 F<x2p/> |
7065301c RS |
658 | |
659 | =over 4 | |
660 | ||
661 | =item * | |
24a38d90 | 662 | |
eb561242 MH |
663 | The F<x2p/> directory has been removed from the Perl core. |
664 | ||
665 | This removes find2perl, s2p and a2p. They have all been released to CPAN as | |
666 | separate distributions (App::find2perl, App::s2p, App::a2p). | |
7065301c RS |
667 | |
668 | =back | |
669 | ||
670 | =head1 Configuration and Compilation | |
671 | ||
7065301c RS |
672 | =over 4 |
673 | ||
674 | =item * | |
675 | ||
12042f24 MH |
676 | C<make test.valgrind> now supports parallel testing. |
677 | ||
678 | For example: | |
679 | ||
680 | TEST_JOBS=9 make test.valgrind | |
681 | ||
682 | See L<perlhacktips/valgrind> for more information. | |
683 | ||
684 | L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431> | |
7065301c | 685 | |
b2e61987 KW |
686 | =item * |
687 | ||
688 | The MAD (Misc Attribute Decoration) build option has been removed | |
689 | ||
690 | This was an unmaintained attempt at preserving | |
691 | the Perl parse tree more faithfully so that automatic conversion of | |
692 | Perl 5 to Perl 6 would have been easier. | |
693 | ||
694 | This build-time configuration option had been unmaintained for years, | |
695 | and had probably seriously diverged on both Perl 5 and Perl 6 sides. | |
696 | ||
7065301c RS |
697 | =back |
698 | ||
7065301c RS |
699 | =head1 Platform Support |
700 | ||
7065301c RS |
701 | =head2 Discontinued Platforms |
702 | ||
7065301c RS |
703 | =over 4 |
704 | ||
f05550c0 | 705 | =item NeXTSTEP/OPENSTEP |
7065301c | 706 | |
f05550c0 BF |
707 | NeXTSTEP was proprietary OS bundled with NeXT's workstations in the early |
708 | to mid 90's; OPENSTEP was an API specification that provided a NeXTSTEP-like | |
709 | environment on a non-NeXTSTEP system. Both are now long dead, so support | |
710 | for building Perl on them has been removed. | |
7065301c RS |
711 | |
712 | =back | |
713 | ||
714 | =head2 Platform-Specific Notes | |
715 | ||
7065301c RS |
716 | =over 4 |
717 | ||
7d0ccdba MH |
718 | =item OpenBSD |
719 | ||
720 | On OpenBSD, Perl will now default to using the system C<malloc> due to the | |
721 | security features it provides. Perl's own malloc wrapper has been in use | |
722 | since v5.14 due to performance reasons, but the OpenBSD project believes | |
723 | the tradeoff is worth it and would prefer that users who need the speed | |
724 | specifically ask for it. | |
725 | ||
726 | L<[perl #122000]|https://rt.perl.org/Ticket/Display.html?id=122000>. | |
727 | ||
7065301c RS |
728 | =back |
729 | ||
730 | =head1 Internal Changes | |
731 | ||
7065301c RS |
732 | =over 4 |
733 | ||
734 | =item * | |
735 | ||
8dab3ba5 | 736 | The deprecated variable C<PL_sv_objcount> has been removed. |
7065301c | 737 | |
4c28b29c KW |
738 | =item * |
739 | ||
740 | Perl now tries to keep the locale category C<LC_NUMERIC> set to "C" | |
741 | except around operations that need it to be set to the program's | |
742 | underlying locale. This protects the many XS modules that cannot cope | |
743 | with the decimal radix character not being a dot. Prior to this | |
744 | release, Perl initialized this category to "C", but a call to | |
745 | C<POSIX::setlocale()> would change it. Now such a call will change the | |
746 | underlying locale of the C<LC_NUMERIC> category for the program, but the | |
747 | locale exposed to XS code will remain "C". There is an API under | |
748 | development for those relatively few modules that need to use the | |
749 | underlying locale. This API will be nailed down during the course of | |
750 | developing v5.21. Send email to L<mailto:perl5-porters@perl.org> for | |
751 | guidance. | |
752 | ||
c9fcb674 KW |
753 | =item * |
754 | ||
755 | A new macro L<C<isUTF8_CHAR>|perlapi/isUTF8_CHAR> has been written which | |
756 | efficiently determines if the string given by its parameters begins | |
757 | with a well-formed UTF-8 encoded character. | |
758 | ||
7065301c RS |
759 | =back |
760 | ||
761 | =head1 Selected Bug Fixes | |
762 | ||
7065301c RS |
763 | =over 4 |
764 | ||
765 | =item * | |
766 | ||
30536d4a TC |
767 | index() and rindex() no longer crash when used on strings over 2GB in |
768 | size. | |
769 | L<[perl #121562]|https://rt.perl.org/Ticket/Display.html?id=121562>. | |
7065301c | 770 | |
0c2c57a8 DD |
771 | =item * |
772 | ||
773 | A small previously intentional memory leak in PERL_SYS_INIT/PERL_SYS_INIT3 on | |
774 | Win32 builds was fixed. This might affect embedders who repeatedly create and | |
775 | destroy perl engines within the same process. | |
776 | ||
a835cd47 KW |
777 | =item * |
778 | ||
779 | C<POSIX::localeconv()> now returns the data for the program's underlying | |
780 | locale even when called from outside the scope of S<C<use locale>>. | |
781 | ||
03ceeedf KW |
782 | =item * |
783 | ||
784 | C<POSIX::localeconv()> now works properly on platforms which don't have | |
785 | C<LC_NUMERIC> and/or C<LC_MONETARY>, or for which Perl has been compiled | |
786 | to disregard either or both of these locale categories. In such | |
787 | circumstances, there are now no entries for the corresponding values in | |
788 | the hash returned by C<localeconv()>. | |
789 | ||
c1284011 KW |
790 | =item * |
791 | ||
792 | C<POSIX::localeconv()> now marks appropriately the values it returns as | |
793 | UTF-8 or not. Previously they were always returned as a bytes, even if | |
794 | they were supposed to be encoded as UTF-8. | |
795 | ||
375f5f06 KW |
796 | =item * |
797 | ||
798 | On Microsoft Windows, within the scope of C<S<use locale>>, the following | |
799 | POSIX character classes gave results for many locales that did not | |
800 | conform to the POSIX standard: | |
801 | C<[[:alnum:]]>, | |
802 | C<[[:alpha:]]>, | |
803 | C<[[:blank:]]>, | |
804 | C<[[:digit:]]>, | |
805 | C<[[:graph:]]>, | |
806 | C<[[:lower:]]>, | |
807 | C<[[:print:]]>, | |
808 | C<[[:punct:]]>, | |
809 | C<[[:upper:]]>, | |
810 | C<[[:word:]]>, | |
811 | and | |
812 | C<[[:xdigit:]]>. | |
813 | These are because the underlying Microsoft implementation does not | |
814 | follow the standard. Perl now takes special precautions to correct for | |
815 | this. | |
816 | ||
2884baee MH |
817 | =item * |
818 | ||
819 | Many issues have been detected by L<Coverity|http://www.coverity.com/> and | |
820 | fixed. | |
821 | ||
5af51eb4 BF |
822 | =item * |
823 | ||
824 | system() and friends should now work properly on more Android builds. | |
825 | ||
826 | Due to an oversight, the value specified through -Dtargetsh to Configure | |
827 | would end up being ignored by some of the build process. This caused perls | |
828 | cross-compiled for Android to end up with defective versions of system(), | |
829 | exec() and backticks: the commands would end up looking for C</bin/sh> | |
830 | instead of C</system/bin/sh>, and so would fail for the vast majority | |
831 | of devices, leaving C<$!> as C<ENOENT>. | |
832 | ||
412f55bb KW |
833 | =item * |
834 | ||
835 | C<qr(...\(...\)...)>, | |
836 | C<qr[...\[...\]...]>, | |
837 | and | |
838 | C<qr{...\{...\}...}> | |
839 | now work. Previously it was impossible to escape these three | |
840 | left-characters with a backslash within a regular expression pattern | |
841 | where otherwise they would be considered metacharacters, and the pattern | |
842 | opening delimiter was the character, and the closing delimiter was its | |
843 | mirror character. | |
844 | ||
7065301c RS |
845 | =back |
846 | ||
7065301c | 847 | =head1 Acknowledgements |
24a38d90 | 848 | |
7065301c | 849 | XXX Generate this with: |
52e02e68 | 850 | |
7065301c | 851 | perl Porting/acknowledgements.pl v5.21.1..HEAD |
f5b73711 | 852 | |
44691e6f AB |
853 | =head1 Reporting Bugs |
854 | ||
e08634c5 SH |
855 | If you find what you think is a bug, you might check the articles recently |
856 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
238894db | 857 | https://rt.perl.org/ . There may also be information at |
7ef8b31d | 858 | http://www.perl.org/ , the Perl Home Page. |
44691e6f | 859 | |
e08634c5 SH |
860 | If you believe you have an unreported bug, please run the L<perlbug> program |
861 | included with your release. Be sure to trim your bug down to a tiny but | |
862 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
863 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
44691e6f AB |
864 | |
865 | If the bug you are reporting has security implications, which make it | |
e08634c5 SH |
866 | inappropriate to send to a publicly archived mailing list, then please send it |
867 | to perl5-security-report@perl.org. This points to a closed subscription | |
868 | unarchived mailing list, which includes all the core committers, who will be | |
869 | able to help assess the impact of issues, figure out a resolution, and help | |
f9001595 | 870 | co-ordinate the release of patches to mitigate or fix the problem across all |
e08634c5 SH |
871 | platforms on which Perl is supported. Please only use this address for |
872 | security issues in the Perl core, not for modules independently distributed on | |
873 | CPAN. | |
44691e6f AB |
874 | |
875 | =head1 SEE ALSO | |
876 | ||
e08634c5 SH |
877 | The F<Changes> file for an explanation of how to view exhaustive details on |
878 | what changed. | |
44691e6f AB |
879 | |
880 | The F<INSTALL> file for how to build Perl. | |
881 | ||
882 | The F<README> file for general stuff. | |
883 | ||
884 | The F<Artistic> and F<Copying> files for copyright information. | |
885 | ||
886 | =cut |