Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
39c4a6cf PM |
5 | [ this is a template for a new perldelta file. Any text flagged as XXX needs |
6 | to be processed before release. ] | |
7 | ||
8 | perldelta - what is new for perl v5.21.4 | |
c68523cb | 9 | |
238894db | 10 | =head1 DESCRIPTION |
c68523cb | 11 | |
39c4a6cf | 12 | This document describes differences between the 5.21.3 release and the 5.21.4 |
238894db | 13 | release. |
c68523cb | 14 | |
39c4a6cf PM |
15 | If you are upgrading from an earlier release such as 5.21.2, first read |
16 | L<perl5213delta>, which describes differences between 5.21.2 and 5.21.3. | |
7065301c | 17 | |
39c4a6cf | 18 | =head1 Notice |
7e957246 | 19 | |
39c4a6cf | 20 | XXX Any important notices here |
7e957246 | 21 | |
39c4a6cf | 22 | =head1 Core Enhancements |
f88f10f5 | 23 | |
39c4a6cf PM |
24 | XXX New core language features go here. Summarize user-visible core language |
25 | enhancements. Particularly prominent performance optimisations could go | |
26 | here, but most should go in the L</Performance Enhancements> section. | |
21f3b41e | 27 | |
39c4a6cf | 28 | [ List each enhancement as a =head2 entry ] |
f88f10f5 | 29 | |
5b319db8 JH |
30 | =head2 Infinity and NaN (not-a-number) handling improved |
31 | ||
32 | Floating point values are able to hold the special values infinity | |
33 | (also -infinity), and NaN (not-a-number). Now we more robustly recognize | |
34 | and propagate the value in computations, and on output normalize them | |
35 | to C<Inf> and C<NaN>. | |
36 | ||
019bf663 | 37 | See also the L<POSIX> enhancements. |
5b319db8 | 38 | |
0346c3a9 | 39 | =head1 Security |
7e957246 | 40 | |
39c4a6cf PM |
41 | XXX Any security-related notices go here. In particular, any security |
42 | vulnerabilities closed should be noted here rather than in the | |
43 | L</Selected Bug Fixes> section. | |
13900f93 | 44 | |
39c4a6cf | 45 | [ List each security issue as a =head2 entry ] |
8bdb3f93 | 46 | |
13900f93 | 47 | =head1 Incompatible Changes |
8bdb3f93 | 48 | |
39c4a6cf | 49 | XXX For a release on a stable branch, this section aspires to be: |
1178d2cf | 50 | |
39c4a6cf PM |
51 | There are no changes intentionally incompatible with 5.XXX.XXX |
52 | If any exist, they are bugs, and we request that you submit a | |
53 | report. See L</Reporting Bugs> below. | |
1178d2cf | 54 | |
39c4a6cf | 55 | [ List each incompatible change as a =head2 entry ] |
f6f3144e | 56 | |
2b03450b FC |
57 | =head2 Changes to the C<*> prototype |
58 | ||
59 | The C<*> character in a subroutine's prototype used to allow barewords | |
60 | to take precedence over most, but not all subroutines. It was never | |
61 | consistent and exhibited buggy behaviour. | |
62 | ||
63 | Now it has been changed, so subroutines always take precedence over | |
64 | barewords, which brings it into conformity with similarly prototyped | |
65 | built-in functions: | |
66 | ||
67 | sub splat($) { ... } | |
68 | sub foo { ... } | |
69 | splat(foo); # now always splat(foo()) | |
70 | splat(bar); # still splat('bar') as before | |
71 | close(foo); # close(foo()) | |
72 | close(bar); # close('bar') | |
73 | ||
39c4a6cf | 74 | =head1 Deprecations |
7065301c | 75 | |
39c4a6cf | 76 | XXX Any deprecated features, syntax, modules etc. should be listed here. |
7065301c | 77 | |
39c4a6cf | 78 | =head2 Module removals |
b3e82ed1 | 79 | |
39c4a6cf | 80 | XXX Remove this section if inapplicable. |
ca58223b | 81 | |
39c4a6cf PM |
82 | The following modules will be removed from the core distribution in a |
83 | future release, and will at that time need to be installed from CPAN. | |
84 | Distributions on CPAN which require these modules will need to list them as | |
85 | prerequisites. | |
ca58223b | 86 | |
39c4a6cf PM |
87 | The core versions of these modules will now issue C<"deprecated">-category |
88 | warnings to alert you to this fact. To silence these deprecation warnings, | |
89 | install the modules in question from CPAN. | |
23b03637 | 90 | |
39c4a6cf PM |
91 | Note that these are (with rare exceptions) fine modules that you are encouraged |
92 | to continue to use. Their disinclusion from core primarily hinges on their | |
93 | necessity to bootstrapping a fully functional, CPAN-capable Perl installation, | |
94 | not usually on concerns over their design. | |
23b03637 | 95 | |
39c4a6cf | 96 | =over |
85e8fb10 | 97 | |
39c4a6cf | 98 | =item XXX |
85e8fb10 | 99 | |
39c4a6cf PM |
100 | XXX Note that deprecated modules should be listed here even if they are listed |
101 | as an updated module in the L</Modules and Pragmata> section. | |
134f90c2 | 102 | |
39c4a6cf | 103 | =back |
134f90c2 | 104 | |
39c4a6cf | 105 | [ List each other deprecation as a =head2 entry ] |
ff433f2d | 106 | |
39c4a6cf | 107 | =head1 Performance Enhancements |
ff433f2d | 108 | |
39c4a6cf PM |
109 | XXX Changes which enhance performance without changing behaviour go here. |
110 | There may well be none in a stable release. | |
134f90c2 | 111 | |
39c4a6cf | 112 | [ List each enhancement as a =item entry ] |
134f90c2 | 113 | |
39c4a6cf | 114 | =over 4 |
7d19f6a1 | 115 | |
7d19f6a1 PM |
116 | =item * |
117 | ||
4f81ab9c | 118 | Subroutines with an empty prototype and bodies containing just C<undef> are |
8f5ad91b SH |
119 | now eligible for inlining. |
120 | L<[perl #122728]|https://rt.perl.org/Ticket/Display.html?id=122728> | |
55e8b286 | 121 | |
07600c14 FC |
122 | =item * |
123 | ||
124 | Subroutines in packages no longer need to carry typeglobs around with them. | |
125 | Declaring a subroutine will now put a simple sub reference in the stash if | |
126 | possible, saving memory. The typeglobs still notionally exist, so | |
127 | accessing them will cause the subroutine reference to be upgraded to a | |
128 | typeglob. This optimisation does not currently apply to XSUBs or exported | |
129 | subroutines, and method calls will undo it, since they cache things in | |
8f5ad91b SH |
130 | typeglobs. |
131 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> | |
07600c14 | 132 | |
39c4a6cf | 133 | =back |
55e8b286 | 134 | |
39c4a6cf | 135 | =head1 Modules and Pragmata |
d99849ae | 136 | |
39c4a6cf PM |
137 | XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> |
138 | go here. If Module::CoreList is updated, generate an initial draft of the | |
139 | following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary | |
140 | for important changes should then be added by hand. In an ideal world, | |
141 | dual-life modules would have a F<Changes> file that could be cribbed. | |
d99849ae | 142 | |
39c4a6cf | 143 | [ Within each section, list entries as a =item entry ] |
ff433f2d | 144 | |
39c4a6cf | 145 | =head2 New Modules and Pragmata |
ff433f2d | 146 | |
39c4a6cf | 147 | =over 4 |
ff433f2d PM |
148 | |
149 | =item * | |
150 | ||
39c4a6cf | 151 | XXX |
0bb39c26 | 152 | |
39c4a6cf | 153 | =back |
0bb39c26 | 154 | |
39c4a6cf | 155 | =head2 Updated Modules and Pragmata |
9c97a342 | 156 | |
39c4a6cf | 157 | =over 4 |
d99849ae PM |
158 | |
159 | =item * | |
160 | ||
c37b2ad0 SH |
161 | L<Archive::Tar> has been upgraded from version 2.00 to 2.02. |
162 | ||
163 | Tests can now be run in parallel. | |
164 | ||
165 | =item * | |
166 | ||
8435afd1 SH |
167 | L<Attribute::Handlers> has been upgraded from version 0.96 to 0.97. |
168 | ||
169 | =item * | |
170 | ||
171 | L<attributes> has been upgraded from version 0.22 to 0.23. | |
172 | ||
173 | =item * | |
174 | ||
07600c14 FC |
175 | L<B> has been upgraded from version 1.50 to 1.51. |
176 | ||
177 | It provides a new C<B::safename> function, based on the existing | |
178 | C<< B::GV->SAFENAME >>, that converts "\cOPEN" to "^OPEN". | |
6ab3666b | 179 | |
233a4069 JK |
180 | =item * |
181 | ||
d0ab07ee JK |
182 | L<B::Concise> has been upgraded from version 0.992 to 0.993. |
183 | ||
608e531f SH |
184 | =item * |
185 | ||
65452717 FC |
186 | L<B::Deparse> has been upgraded from version 1.27 to 1.28. |
187 | ||
8435afd1 SH |
188 | It now deparses C<our(I<LIST>)> and typed lexical (C<my Dog $spot>) correctly. |
189 | ||
190 | =item * | |
191 | ||
192 | L<bignum> has been upgraded from version 0.37 to 0.38. | |
193 | ||
194 | =item * | |
195 | ||
196 | L<constant> has been upgraded from version 1.31 to 1.32. | |
197 | ||
198 | It now accepts fully-qualified constant names, allowing constants to be defined | |
199 | in packages other than the caller. | |
65452717 FC |
200 | |
201 | =item * | |
202 | ||
608e531f | 203 | L<CPAN::Meta::Requirements> has been upgraded from version 2.126 to 2.128. |
74d5bfab AS |
204 | |
205 | =item * | |
5c31a0ca SH |
206 | |
207 | L<Data::Dumper> has been upgraded from version 2.152 to 2.154. | |
208 | ||
209 | =item * | |
74d5bfab | 210 | |
8435afd1 SH |
211 | L<experimental> has been upgraded from version 0.008 to 0.010. |
212 | ||
213 | =item * | |
214 | ||
215 | L<ExtUtils::CBuilder> has been upgraded from version 0.280217 to 0.280219. | |
8f5ad91b | 216 | L<[perl #122675]|https://rt.perl.org/Ticket/Display.html?id=122675> |
74d5bfab | 217 | |
d0ab07ee JK |
218 | =item * |
219 | ||
8435afd1 | 220 | L<ExtUtils::Install> has been upgraded from version 1.68 to 2.04. |
39091b75 JK |
221 | |
222 | =item * | |
223 | ||
8435afd1 | 224 | L<ExtUtils::Manifest> has been upgraded from version 1.65 to 1.68. |
8f5ad91b | 225 | L<[perl #122415]|https://rt.perl.org/Ticket/Display.html?id=122415> |
ecd53122 JK |
226 | |
227 | =item * | |
228 | ||
9eace98c JK |
229 | L<File::Find> has been upgraded from version 1.27 to 1.28. |
230 | ||
231 | C<find()> and C<finddepth()> will now warn if passed inappropriate or | |
232 | misspelled options. | |
233 | ||
234 | =item * | |
235 | ||
236 | L<Getopt::Std> has been upgraded from version 1.10 to 1.11. | |
237 | ||
238 | =item * | |
239 | ||
8435afd1 | 240 | L<HTTP::Tiny> has been upgraded from version 0.047 to 0.049. |
d0ab07ee JK |
241 | |
242 | =item * | |
243 | ||
8435afd1 | 244 | L<IO> has been upgraded from version 1.33 to 1.34. |
d0ab07ee JK |
245 | |
246 | =item * | |
247 | ||
8435afd1 SH |
248 | L<IO::Socket::IP> has been upgraded from version 0.31 to 0.32. |
249 | ||
250 | =item * | |
d0ab07ee | 251 | |
8435afd1 | 252 | L<Locale::Codes> has been upgraded from version 3.31 to 3.32. |
316ab8c6 SH |
253 | |
254 | =item * | |
255 | ||
256 | L<Math::BigInt> has been upgraded from version 1.9996 to 1.9997. | |
8435afd1 SH |
257 | |
258 | =item * | |
259 | ||
260 | L<Module::CoreList> has been upgraded from version 5.021003 to 5.20140915. | |
261 | ||
262 | =item * | |
263 | ||
264 | L<overload> has been upgraded from version 1.22 to 1.23. | |
265 | ||
266 | =item * | |
267 | ||
268 | PathTools has been upgraded from version 3.49 to 3.50. | |
5b319db8 | 269 | |
d0ab07ee JK |
270 | =item * |
271 | ||
272 | L<Pod::Perldoc> has been upgraded from version 3.23 to 3.24. | |
273 | ||
274 | =item * | |
275 | ||
8435afd1 SH |
276 | L<POSIX> has been upgraded from version 1.42 to 1.43. |
277 | ||
278 | The C99 math functions and constants (for example acosh, round, M_E, M_PI) have | |
279 | been added. | |
46274848 SH |
280 | |
281 | =item * | |
282 | ||
8435afd1 | 283 | Scalar-List-Utils has been upgraded from version 1.39 to 1.41. |
d0ab07ee | 284 | |
8435afd1 SH |
285 | =item * |
286 | ||
287 | L<Term::ReadLine> has been upgraded from version 1.14 to 1.15. | |
288 | ||
289 | =item * | |
290 | ||
291 | L<Test::Harness> has been upgraded from version 3.32 to 3.33. | |
292 | ||
293 | =item * | |
294 | ||
295 | L<Test::Simple> has been upgraded from version 1.001003 to 1.001006. | |
bfc60ea2 | 296 | |
d0ab07ee JK |
297 | =item * |
298 | ||
299 | L<threads> has been upgraded from version 1.95 to 1.96. | |
300 | ||
8435afd1 SH |
301 | =item * |
302 | ||
303 | L<Time::Piece> has been upgraded from version 1.27 to 1.29. | |
304 | ||
305 | =item * | |
306 | ||
307 | L<version> has been upgraded from version 0.9908 to 0.9909. | |
308 | ||
39c4a6cf | 309 | =back |
9c97a342 | 310 | |
39c4a6cf | 311 | =head2 Removed Modules and Pragmata |
d99849ae | 312 | |
39c4a6cf | 313 | =over 4 |
d99849ae | 314 | |
ff433f2d PM |
315 | =item * |
316 | ||
39c4a6cf | 317 | XXX |
ff433f2d | 318 | |
13900f93 | 319 | =back |
aac7f82f | 320 | |
13900f93 | 321 | =head1 Documentation |
aac7f82f | 322 | |
39c4a6cf PM |
323 | XXX Changes to files in F<pod/> go here. Consider grouping entries by |
324 | file and be sure to link to the appropriate page, e.g. L<perlfunc>. | |
6d9b7c7c | 325 | |
39c4a6cf | 326 | =head2 New Documentation |
2a395b86 | 327 | |
39c4a6cf | 328 | XXX Changes which create B<new> files in F<pod/> go here. |
2a395b86 | 329 | |
39c4a6cf | 330 | =head3 L<XXX> |
2a395b86 | 331 | |
39c4a6cf | 332 | XXX Description of the purpose of the new file here |
2a395b86 | 333 | |
39c4a6cf | 334 | =head2 Changes to Existing Documentation |
2a395b86 | 335 | |
39c4a6cf PM |
336 | XXX Changes which significantly change existing files in F<pod/> go here. |
337 | However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics> | |
338 | section. | |
339 | ||
8435afd1 | 340 | =head3 L<perlsyn> |
2a395b86 PM |
341 | |
342 | =over 4 | |
343 | ||
344 | =item * | |
345 | ||
8435afd1 | 346 | An ambiguity in the documentation of the Ellipsis statement has |
8f5ad91b SH |
347 | been corrected. |
348 | L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661> | |
8435afd1 SH |
349 | |
350 | =back | |
351 | ||
352 | =head3 L<perlxs> | |
353 | ||
354 | =over 4 | |
2a395b86 | 355 | |
12d22d1f JK |
356 | =item * |
357 | ||
8435afd1 | 358 | Added a discussion of locale issues in XS code. |
12d22d1f | 359 | |
2a395b86 PM |
360 | =back |
361 | ||
39c4a6cf | 362 | =head1 Diagnostics |
2a395b86 | 363 | |
39c4a6cf PM |
364 | The following additions or changes have been made to diagnostic output, |
365 | including warnings and fatal error messages. For the complete list of | |
366 | diagnostic messages, see L<perldiag>. | |
2a395b86 | 367 | |
39c4a6cf PM |
368 | XXX New or changed warnings emitted by the core's C<C> code go here. Also |
369 | include any changes in L<perldiag> that reconcile it to the C<C> code. | |
2a395b86 | 370 | |
39c4a6cf | 371 | =head2 New Diagnostics |
0f4a583b | 372 | |
39c4a6cf PM |
373 | XXX Newly added diagnostic messages go under here, separated into New Errors |
374 | and New Warnings | |
2a395b86 | 375 | |
39c4a6cf | 376 | =head3 New Errors |
2a395b86 PM |
377 | |
378 | =over 4 | |
379 | ||
380 | =item * | |
381 | ||
39c4a6cf | 382 | XXX L<message|perldiag/"message"> |
2a395b86 PM |
383 | |
384 | =back | |
385 | ||
39c4a6cf | 386 | =head3 New Warnings |
2a395b86 PM |
387 | |
388 | =over 4 | |
389 | ||
390 | =item * | |
391 | ||
39c4a6cf | 392 | XXX L<message|perldiag/"message"> |
2a395b86 PM |
393 | |
394 | =back | |
6d9b7c7c | 395 | |
39c4a6cf PM |
396 | =head2 Changes to Existing Diagnostics |
397 | ||
398 | XXX Changes (i.e. rewording) of diagnostic messages go here | |
7f55cec0 | 399 | |
13900f93 | 400 | =over 4 |
7f55cec0 SH |
401 | |
402 | =item * | |
403 | ||
623141a1 FC |
404 | L<Global symbol "%s" requires explicit package name|perldiag/Global symbol "%s" requires explicit package name (did you forget to declare "my %s"?)> |
405 | ||
406 | This message has had '(did you forget to declare "my %s"?)' appended to it, | |
4c9184fd SH |
407 | to make it more helpful to new Perl programmers. |
408 | L<[perl #121638]|https://rt.perl.org/Ticket/Display.html?id=121638> | |
aac7f82f | 409 | |
13900f93 | 410 | =back |
aac7f82f | 411 | |
363d3025 FC |
412 | =head2 Diagnostic Removals |
413 | ||
414 | =over 4 | |
415 | ||
416 | =item * | |
417 | ||
334464b3 FC |
418 | "Constant is not a FOO reference" |
419 | ||
420 | Compile-time checking of constant dereferencing (e.g., | |
421 | C<< my_constant->() >>) has been removed, since it was not taking | |
8f5ad91b SH |
422 | overloading into account. |
423 | L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> | |
424 | L<[perl #122607]|https://rt.perl.org/Ticket/Display.html?id=122607> | |
334464b3 FC |
425 | |
426 | =item * | |
427 | ||
363d3025 FC |
428 | The warning "Ambiguous use of -foo resolved as -&foo()" has been removed. |
429 | There is actually no ambiguity here, and this impedes the use of negated | |
430 | constants; e.g., C<-Inf>. | |
431 | ||
ef5a9509 FC |
432 | =item * |
433 | ||
434 | The little-known C<my Class $var> syntax (see L<fields> and L<attributes>) | |
435 | could get confused in the scope of C<use utf8> if C<Class> were a constant | |
436 | whose value contained Latin-1 characters. | |
437 | ||
363d3025 FC |
438 | =back |
439 | ||
39c4a6cf | 440 | =head1 Utility Changes |
091fed7c | 441 | |
39c4a6cf PM |
442 | XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here. |
443 | Most of these are built within the directory F<utils>. | |
902c1f75 | 444 | |
39c4a6cf PM |
445 | [ List utility changes as a =head2 entry for each utility and =item |
446 | entries for each change | |
447 | Use L<XXX> with program names to get proper documentation linking. ] | |
2901561d | 448 | |
39c4a6cf | 449 | =head2 L<XXX> |
4594cf53 | 450 | |
13900f93 | 451 | =over 4 |
96dcbc37 DD |
452 | |
453 | =item * | |
454 | ||
39c4a6cf | 455 | XXX |
a1d26ccd | 456 | |
39c4a6cf | 457 | =back |
a1d26ccd | 458 | |
39c4a6cf | 459 | =head1 Configuration and Compilation |
7065301c | 460 | |
39c4a6cf PM |
461 | XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools |
462 | go here. Any other changes to the Perl build process should be listed here. | |
463 | However, any platform-specific changes should be listed in the | |
464 | L</Platform Support> section, instead. | |
58f25ac1 | 465 | |
39c4a6cf | 466 | [ List changes as a =item entry ]. |
13900f93 A |
467 | |
468 | =over 4 | |
58f25ac1 MH |
469 | |
470 | =item * | |
471 | ||
39c4a6cf | 472 | XXX |
a5873648 | 473 | |
39c4a6cf | 474 | =back |
a5873648 | 475 | |
39c4a6cf | 476 | =head1 Testing |
a5873648 | 477 | |
39c4a6cf PM |
478 | XXX Any significant changes to the testing of a freshly built perl should be |
479 | listed here. Changes which create B<new> files in F<t/> go here as do any | |
480 | large changes to the testing harness (e.g. when parallel testing was added). | |
481 | Changes to existing files in F<t/> aren't worth summarizing, although the bugs | |
482 | that they represent may be covered elsewhere. | |
a5873648 | 483 | |
39c4a6cf | 484 | [ List each test improvement as a =item entry ] |
a5873648 | 485 | |
39c4a6cf | 486 | =over 4 |
a5873648 PM |
487 | |
488 | =item * | |
489 | ||
39c4a6cf | 490 | XXX |
a5873648 | 491 | |
58f25ac1 MH |
492 | =back |
493 | ||
39c4a6cf | 494 | =head1 Platform Support |
b10906fb | 495 | |
39c4a6cf | 496 | XXX Any changes to platform support should be listed in the sections below. |
b10906fb | 497 | |
39c4a6cf PM |
498 | [ Within the sections, list each platform as a =item entry with specific |
499 | changes as paragraphs below it. ] | |
b10906fb | 500 | |
39c4a6cf | 501 | =head2 New Platforms |
b10906fb | 502 | |
39c4a6cf PM |
503 | XXX List any platforms that this version of perl compiles on, that previous |
504 | versions did not. These will either be enabled by new files in the F<hints/> | |
505 | directories, or new subdirectories and F<README> files at the top level of the | |
506 | source tree. | |
13900f93 | 507 | |
7065301c | 508 | =over 4 |
24a38d90 | 509 | |
39c4a6cf | 510 | =item XXX-some-platform |
24a38d90 | 511 | |
39c4a6cf | 512 | XXX |
bb076206 | 513 | |
7065301c RS |
514 | =back |
515 | ||
39c4a6cf | 516 | =head2 Discontinued Platforms |
097675bf | 517 | |
39c4a6cf | 518 | XXX List any platforms that this version of perl no longer compiles on. |
b3211734 | 519 | |
6e97d65d | 520 | =over 4 |
b3211734 | 521 | |
39c4a6cf | 522 | =item XXX-some-platform |
7065301c | 523 | |
39c4a6cf | 524 | XXX |
13900f93 | 525 | |
39c4a6cf | 526 | =back |
7d0ccdba | 527 | |
39c4a6cf | 528 | =head2 Platform-Specific Notes |
7d0ccdba | 529 | |
39c4a6cf PM |
530 | XXX List any changes for specific platforms. This could include configuration |
531 | and compilation changes or changes in portability/compatibility. However, | |
532 | changes within modules for platforms should generally be listed in the | |
533 | L</Modules and Pragmata> section. | |
6e97d65d | 534 | |
39c4a6cf | 535 | =over 4 |
6e97d65d | 536 | |
39c4a6cf | 537 | =item XXX-some-platform |
6e97d65d | 538 | |
39c4a6cf | 539 | XXX |
7d0ccdba | 540 | |
7065301c RS |
541 | =back |
542 | ||
543 | =head1 Internal Changes | |
544 | ||
39c4a6cf PM |
545 | XXX Changes which affect the interface available to C<XS> code go here. Other |
546 | significant internal changes for future core maintainers should be noted as | |
547 | well. | |
c9fcb674 | 548 | |
39c4a6cf | 549 | [ List each change as a =item entry ] |
a835cd47 | 550 | |
39c4a6cf | 551 | =over 4 |
c1284011 | 552 | |
6d67525d FC |
553 | =item * |
554 | ||
cd949807 FC |
555 | C<save_re_context> no longer does anything and has been moved to |
556 | F<mathoms.c>. | |
1c43698b | 557 | |
07600c14 FC |
558 | =item * |
559 | ||
560 | C<cv_name> is a new API function that can be passed a CV or GV. It returns | |
561 | an SV containing the name of the subroutine for use in diagnostics. | |
8f5ad91b SH |
562 | L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> |
563 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> | |
07600c14 FC |
564 | |
565 | =item * | |
566 | ||
567 | C<cv_set_call_checker_flags> is a new API function that works like | |
568 | C<cv_set_call_checker>, except that it allows the caller to specify whether | |
569 | the call checker requires a full GV for reporting the subroutine's name, or | |
570 | whether it could be passed a CV instead. Whatever value is passed will be | |
571 | acceptable to C<cv_name>. C<cv_set_call_checker> guarantees there will be | |
572 | a GV, but it may have to create one on the fly, which is inefficient. | |
8f5ad91b | 573 | L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> |
07600c14 FC |
574 | |
575 | =item * | |
576 | ||
577 | C<CvGV> (which is not part of the API) is now a more complex macro, which | |
578 | may call a function and reify a GV. For those cases where is has been used | |
579 | as a boolean, C<CvHASGV> has been added, which will return true for CVs | |
580 | that notionally have GVs, but without reifying the GV. C<CvGV> also | |
8f5ad91b SH |
581 | returns a GV now for lexical subs. |
582 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> | |
07600c14 | 583 | |
8435afd1 SH |
584 | =item * |
585 | ||
586 | Added L<perlapi/sync_locale>. | |
587 | Changing the program's locale should be avoided by XS code. Nevertheless, | |
588 | certain non-Perl libraries called from XS, such as C<Gtk> do so. When this | |
589 | happens, Perl needs to be told that the locale has changed. Use this function | |
590 | to do so, before returning to Perl. | |
591 | ||
6d9b7c7c | 592 | =back |
c1284011 | 593 | |
6d9b7c7c | 594 | =head1 Selected Bug Fixes |
375f5f06 | 595 | |
39c4a6cf PM |
596 | XXX Important bug fixes in the core language are summarized here. Bug fixes in |
597 | files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>. | |
598 | ||
599 | [ List each fix as a =item entry ] | |
600 | ||
0346c3a9 | 601 | =over 4 |
375f5f06 | 602 | |
2884baee MH |
603 | =item * |
604 | ||
39c4a6cf | 605 | XXX |
2884baee | 606 | |
0aa1826c FC |
607 | =item * |
608 | ||
6f1a844b FC |
609 | Constant dereferencing now works correctly for typeglob constants. |
610 | Previously the glob was stringified and its name looked up. Now the glob | |
8f5ad91b SH |
611 | itself is used. |
612 | L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> | |
6f1a844b | 613 | |
549ea8d4 FC |
614 | =item * |
615 | ||
616 | When parsing a funny character ($ @ % &) followed by braces, the parser no | |
617 | longer tries to guess whether it is a block or a hash constructor (causing | |
618 | a syntax error when it guesses the latter), since it can only be a block. | |
619 | ||
be0006e0 FC |
620 | =item * |
621 | ||
622 | C<undef $reference> now frees the referent immediately, instead of hanging | |
8f5ad91b SH |
623 | on to it until the next statement. |
624 | L<[perl #122556]|https://rt.perl.org/Ticket/Display.html?id=122556> | |
be0006e0 | 625 | |
1699f5c2 FC |
626 | =item * |
627 | ||
628 | Various cases where the name of a sub is used (autoload, overloading, error | |
629 | messages) used to crash for lexical subs, but have been fixed. | |
630 | ||
7e8b2071 FC |
631 | =item * |
632 | ||
633 | Bareword lookup now tries to avoid vivifying packages if it turns out the | |
634 | bareword is not going to be a subroutine name. | |
635 | ||
f9acf899 FC |
636 | =item * |
637 | ||
638 | Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer | |
639 | deletes any subroutine named C<__ANON__> in the current package. Not only | |
640 | was C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug | |
0d5b620e | 641 | goes back to perl 5.8.0. |
f9acf899 | 642 | |
fd26b6f0 FC |
643 | =item * |
644 | ||
645 | Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out | |
646 | constants of the same name declared by C<use constant>. This bug was | |
647 | introduced in perl 5.10.0. | |
648 | ||
499333dc KW |
649 | =item * |
650 | ||
651 | Under some conditions a warning raised in compilation of regular | |
652 | expression patterns could be displayed multiple times. This is now | |
653 | fixed. | |
654 | ||
8f0cd35a KW |
655 | =item * |
656 | ||
657 | C<qr/[\N{named sequence}]/> now works properly in many instances. Some | |
658 | names known to C<\N{...}> refer to a sequence of multiple characters, | |
659 | instead of the usual single character. Bracketed character classes | |
660 | generally only match single characters, but now special handling has | |
661 | been added so that they can match named sequences, but not if the class | |
662 | is inverted or the sequence is specified as the beginning or end of a | |
663 | range. In these cases, the only behavior change from before is a slight | |
664 | rewording of the fatal error message given when this class is part of a | |
665 | C<?[...])> construct. When the C<[...]> stands alone, the same | |
666 | non-fatal warning as before is raised, and only the first character in | |
667 | the sequence is used, again just as before. | |
668 | ||
aa292ef2 FC |
669 | =item * |
670 | ||
671 | Tainted constants evaluated at compile time no longer cause unrelated | |
8f5ad91b SH |
672 | statements to become tainted. |
673 | L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669> | |
aa292ef2 | 674 | |
739e9bee FC |
675 | =item * |
676 | ||
677 | C<open $$fh, ...>, which vivifies a handle with a name like "main::_GEN_0", | |
678 | was not giving the handle the right reference count, so a double free could | |
679 | happen. | |
680 | ||
b23b2fdb FC |
681 | =item * |
682 | ||
683 | When deciding that a bareword was a method name, the parser would get | |
684 | confused if an "our" sub with the same name existed, and look up the method | |
685 | in the package of the "our" sub, instead of the package of the invocant. | |
686 | ||
7d15b1a8 FC |
687 | =item * |
688 | ||
689 | The parser no longer gets confused by C<\U=> within a double-quoted string. | |
0d5b620e | 690 | It used to produce a syntax error, but now compiles it correctly. |
8f5ad91b | 691 | L<[perl #80368]|https://rt.perl.org/Ticket/Display.html?id=80368> |
7d15b1a8 | 692 | |
bbca64cf KW |
693 | =item * |
694 | ||
695 | It has always been the intention for the C<-B> and C<-T> file test | |
696 | operators to treat UTF-8 encoded files as text. | |
697 | (L<perlfunc|perlfunc/-X FILEHANDLE> has been updated to say this.) | |
698 | Previously, it was possible for some files to be considered UTF-8 that | |
699 | actually weren't valid UTF-8. This is now fixed. The operators now | |
700 | work on EBCDIC platforms as well. | |
701 | ||
0064f8cc KW |
702 | =item * |
703 | ||
704 | Under some conditions warning messages raised during regular expression | |
705 | pattern compilation were being output more than once. This has now been | |
706 | fixed. | |
707 | ||
6ff8f256 KW |
708 | =item * |
709 | ||
710 | A regression has been fixed that was introduced in v5.20.0 (fixed in | |
711 | v5.20.1 as well as here) in which a UTF-8 encoded regular expression | |
712 | pattern that contains a single ASCII lowercase letter does not match its | |
8f5ad91b SH |
713 | uppercase counterpart. |
714 | L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655> | |
6ff8f256 | 715 | |
80cc3290 FC |
716 | =item * |
717 | ||
718 | Constant folding could incorrectly suppress warnings if lexical warnings | |
719 | (C<use warnings> or C<no warnings>) were not in effect and C<$^W> were | |
720 | false at compile time and true at run time. | |
721 | ||
13dd5671 FC |
722 | =item * |
723 | ||
724 | Loading UTF8 tables during a regular expression match could cause assertion | |
725 | failures under debugging builds if the previous match used the very same | |
8f5ad91b SH |
726 | regular expression. |
727 | L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747> | |
13dd5671 | 728 | |
bdab7676 FC |
729 | =item * |
730 | ||
731 | Thread cloning used to work incorrectly for lexical subs, possibly causing | |
732 | crashes or double frees on exit. | |
733 | ||
3a085d00 FC |
734 | =item * |
735 | ||
736 | Since perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining | |
737 | an anonymous subroutine could corrupt things internally, resulting in | |
738 | L<Devel::Peek> crashing or L<B.pm|B> giving nonsensical data. This has | |
739 | been fixed. | |
740 | ||
caa66803 FC |
741 | =item * |
742 | ||
743 | C<(caller $n)[3]> now reports names of lexical subs, instead of treating | |
744 | them as "(unknown)". | |
745 | ||
91766151 FC |
746 | =item * |
747 | ||
748 | C<sort subname LIST> now supports lexical subs for the comparison routine. | |
749 | ||
dd593f1d FC |
750 | =item * |
751 | ||
752 | Aliasing (e.g., via C<*x = *y>) could confuse list assignments that mention | |
753 | the two names for the same variable on either side, causing wrong values to | |
4c9184fd SH |
754 | be assigned. |
755 | L<[perl #15667]|https://rt.perl.org/Ticket/Display.html?id=15667> | |
dd593f1d | 756 | |
fb3b7425 FC |
757 | =item * |
758 | ||
759 | Long here-doc terminators could cause a bad read on short lines of input. | |
760 | This has been fixed. It is doubtful that any crash could have occurred. | |
761 | This bug goes back to when here-docs were introduced in perl 3.000 | |
762 | twenty-five years ago. | |
763 | ||
b245455d SH |
764 | =item * |
765 | ||
766 | An optimization in C<split> to treat C<split/^/> like C<split/^/m> had the | |
767 | unfortunate side-effect of also treating C<split/\A/> like C<split/^/m>, which | |
768 | it should not. This has been fixed. (Note, however, that C<split/^x/> does | |
769 | not behave like C<split/^x/m>, which is also considered to be a bug and will be | |
770 | fixed in a future version.) | |
771 | L<[perl #122761]|https://rt.perl.org/Ticket/Display.html?id=122761> | |
772 | ||
39c4a6cf | 773 | =back |
b756670b | 774 | |
39c4a6cf | 775 | =head1 Known Problems |
b756670b | 776 | |
39c4a6cf PM |
777 | XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any |
778 | tests that had to be C<TODO>ed for the release would be noted here. Unfixed | |
779 | platform specific bugs also go here. | |
e917e94e | 780 | |
39c4a6cf PM |
781 | [ List each fix as a =item entry ] |
782 | ||
783 | =over 4 | |
e917e94e | 784 | |
26dd5fd6 PM |
785 | =item * |
786 | ||
39c4a6cf | 787 | XXX |
26dd5fd6 | 788 | |
13900f93 A |
789 | =back |
790 | ||
39c4a6cf | 791 | =head1 Errata From Previous Releases |
e831f11a | 792 | |
39c4a6cf PM |
793 | =over 4 |
794 | ||
795 | =item * | |
ff433f2d | 796 | |
39c4a6cf PM |
797 | XXX Add anything here that we forgot to add, or were mistaken about, in |
798 | the perldelta of a previous release. | |
ff433f2d | 799 | |
39c4a6cf PM |
800 | =back |
801 | ||
802 | =head1 Obituary | |
ff433f2d | 803 | |
39c4a6cf PM |
804 | XXX If any significant core contributor has died, we've added a short obituary |
805 | here. | |
ff433f2d | 806 | |
39c4a6cf | 807 | =head1 Acknowledgements |
ff433f2d | 808 | |
39c4a6cf | 809 | XXX Generate this with: |
e831f11a | 810 | |
39c4a6cf | 811 | perl Porting/acknowledgements.pl v5.21.3..HEAD |
f5b73711 | 812 | |
44691e6f AB |
813 | =head1 Reporting Bugs |
814 | ||
e08634c5 SH |
815 | If you find what you think is a bug, you might check the articles recently |
816 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
238894db | 817 | https://rt.perl.org/ . There may also be information at |
7ef8b31d | 818 | http://www.perl.org/ , the Perl Home Page. |
44691e6f | 819 | |
e08634c5 SH |
820 | If you believe you have an unreported bug, please run the L<perlbug> program |
821 | included with your release. Be sure to trim your bug down to a tiny but | |
822 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
823 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
44691e6f AB |
824 | |
825 | If the bug you are reporting has security implications, which make it | |
e08634c5 SH |
826 | inappropriate to send to a publicly archived mailing list, then please send it |
827 | to perl5-security-report@perl.org. This points to a closed subscription | |
828 | unarchived mailing list, which includes all the core committers, who will be | |
829 | able to help assess the impact of issues, figure out a resolution, and help | |
f9001595 | 830 | co-ordinate the release of patches to mitigate or fix the problem across all |
e08634c5 SH |
831 | platforms on which Perl is supported. Please only use this address for |
832 | security issues in the Perl core, not for modules independently distributed on | |
833 | CPAN. | |
44691e6f AB |
834 | |
835 | =head1 SEE ALSO | |
836 | ||
e08634c5 SH |
837 | The F<Changes> file for an explanation of how to view exhaustive details on |
838 | what changed. | |
44691e6f AB |
839 | |
840 | The F<INSTALL> file for how to build Perl. | |
841 | ||
842 | The F<README> file for general stuff. | |
843 | ||
844 | The F<Artistic> and F<Copying> files for copyright information. | |
845 | ||
846 | =cut |