Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
90bf1576 | 3 | =for comment |
cadced9f | 4 | This has been completed up to 9f71cfe6ef2, except for: |
d25a863e | 5 | 8629c11317 smueller Escape double-quotes in generated #line directives |
4e6e9b23 FC |
6 | 8dc67a69b shlomif perl -d: display lines inside subroutines. |
7 | 3dfd1b5cd2 leont Export PerlIOBase_open | |
90bf1576 | 8 | |
44691e6f AB |
9 | =head1 NAME |
10 | ||
52deee2e DR |
11 | [ this is a template for a new perldelta file. Any text flagged as |
12 | XXX needs to be processed before release. ] | |
062678b2 | 13 | |
52deee2e | 14 | perldelta - what is new for perl v5.15.7 |
ad32999b | 15 | |
52deee2e | 16 | =head1 DESCRIPTION |
ad32999b | 17 | |
52deee2e DR |
18 | This document describes differences between the 5.15.6 release and |
19 | the 5.15.7 release. | |
ad32999b | 20 | |
52deee2e DR |
21 | If you are upgrading from an earlier release such as 5.15.5, first read |
22 | L<perl5156delta>, which describes differences between 5.15.5 and | |
23 | 5.15.6. | |
a3f52e2e | 24 | |
52deee2e | 25 | =head1 Notice |
61f966e7 | 26 | |
52deee2e | 27 | XXX Any important notices here |
61f966e7 | 28 | |
52deee2e | 29 | =head1 Core Enhancements |
d1fb015b | 30 | |
52deee2e DR |
31 | XXX New core language features go here. Summarise user-visible core language |
32 | enhancements. Particularly prominent performance optimisations could go | |
33 | here, but most should go in the L</Performance Enhancements> section. | |
7e7629fa | 34 | |
52deee2e | 35 | [ List each enhancement as a =head2 entry ] |
7e7629fa | 36 | |
fbb93542 KW |
37 | =head2 C<use charnames> no longer needed for C<\N{I<name>}> |
38 | ||
39 | The C<charnames> module is now automatically loaded when needed as if | |
40 | the C<:full> and C<:short> options had been specified. See | |
41 | L<charnames>. | |
42 | ||
8c85651d KW |
43 | =head2 Improved performance for Unicode properties in regular expressions |
44 | ||
45 | Matching a code point against a Unicode property is now done via a | |
46 | binary search instead of linear. This means for example that the worst | |
47 | case for a 1000 item property is 10 probes instead of 1000. This | |
48 | inefficiency has been compensated for in the past by permanently storing | |
49 | in a hash the results of a given probe plus the results for the adjacent | |
50 | 64 code points, under the theory that near-by code points are likely to | |
51 | be searched for. A separate hash was used for each mention of a Unicode | |
52 | property in each regular expression. Thus, C<qr/\p{foo}abc\p{foo}/> | |
53 | would generate two hashes. Any probes in one instance would be unknown | |
54 | to the other, and the hashes could expand separately to be quite large | |
55 | if the regular expression were used on many different widely-separated | |
56 | code points. This can lead to running out of memory in extreme cases. | |
57 | Now, however, there is just one hash shared by all instances of a given | |
58 | property. This means that if C<\p{foo}> is matched against "A" in one | |
59 | regular expression in a thread, the result will be known immediately to | |
60 | all regular expressions, and the relentless march of using up memory is | |
61 | slowed considerably. | |
62 | ||
e3c71926 | 63 | =head1 Security |
6d110ad0 | 64 | |
52deee2e DR |
65 | XXX Any security-related notices go here. In particular, any security |
66 | vulnerabilities closed should be noted here rather than in the | |
67 | L</Selected Bug Fixes> section. | |
7f28d7ed | 68 | |
52deee2e | 69 | [ List each security issue as a =head2 entry ] |
7f28d7ed | 70 | |
52deee2e | 71 | =head1 Incompatible Changes |
7f28d7ed | 72 | |
52deee2e | 73 | XXX For a release on a stable branch, this section aspires to be: |
7f28d7ed | 74 | |
52deee2e DR |
75 | There are no changes intentionally incompatible with 5.XXX.XXX |
76 | If any exist, they are bugs, and we request that you submit a | |
77 | report. See L</Reporting Bugs> below. | |
7f28d7ed | 78 | |
52deee2e | 79 | [ List each incompatible change as a =head2 entry ] |
7f28d7ed | 80 | |
52deee2e | 81 | =head1 Deprecations |
7f28d7ed | 82 | |
52deee2e DR |
83 | XXX Any deprecated features, syntax, modules etc. should be listed here. |
84 | In particular, deprecated modules should be listed here even if they are | |
85 | listed as an updated module in the L</Modules and Pragmata> section. | |
66008486 | 86 | |
52deee2e | 87 | [ List each deprecation as a =head2 entry ] |
66008486 | 88 | |
ef337e16 CBW |
89 | =head2 Deprecated Modules |
90 | ||
91 | =over | |
92 | ||
93 | =item L<Version::Requirements> | |
94 | ||
95 | Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements, | |
96 | which is a drop-in replacement. It will be deleted from perl.git blead | |
97 | in v5.17.0. | |
98 | ||
99 | =back | |
100 | ||
52deee2e | 101 | =head1 Performance Enhancements |
66008486 | 102 | |
52deee2e DR |
103 | XXX Changes which enhance performance without changing behaviour go here. There |
104 | may well be none in a stable release. | |
66008486 | 105 | |
52deee2e | 106 | [ List each enhancement as a =item entry ] |
66008486 | 107 | |
52deee2e | 108 | =over 4 |
66008486 FC |
109 | |
110 | =item * | |
111 | ||
39de7394 FC |
112 | Version declarations with the C<use> keyword (e.g., C<use 5.012>) are now |
113 | faster, as they enable features without loading F<feature.pm>. | |
66008486 | 114 | |
cadced9f FC |
115 | =item * |
116 | ||
117 | C<local $_> is faster now, as it no longer iterates through magic that it | |
118 | is not going to copy anyway. | |
119 | ||
66008486 FC |
120 | =back |
121 | ||
52deee2e | 122 | =head1 Modules and Pragmata |
84b2a83e | 123 | |
52deee2e DR |
124 | XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> |
125 | go here. If Module::CoreList is updated, generate an initial draft of the | |
126 | following sections using F<Porting/corelist-perldelta.pl>, which prints stub | |
127 | entries to STDOUT. Results can be pasted in place of the '=head2' entries | |
128 | below. A paragraph summary for important changes should then be added by hand. | |
129 | In an ideal world, dual-life modules would have a F<Changes> file that could be | |
130 | cribbed. | |
541cb22c | 131 | |
52deee2e | 132 | [ Within each section, list entries as a =item entry ] |
541cb22c | 133 | |
52deee2e | 134 | =head2 New Modules and Pragmata |
6d110ad0 | 135 | |
e3c71926 | 136 | =over 4 |
6d110ad0 FC |
137 | |
138 | =item * | |
139 | ||
52deee2e | 140 | XXX |
7e7629fa | 141 | |
e3c71926 | 142 | =back |
6d110ad0 | 143 | |
e3c71926 | 144 | =head2 Updated Modules and Pragmata |
6d110ad0 | 145 | |
e3c71926 | 146 | =over 4 |
6d110ad0 FC |
147 | |
148 | =item * | |
149 | ||
6f103008 FC |
150 | L<B::Deparse> has been upgraded from version 1.10 to version 1.11. |
151 | ||
6ee63c28 | 152 | It now deparses C<open('random string')> correctly. It used to omit the |
6f103008 FC |
153 | quotation marks, which did not work if the string were not a valid |
154 | identifier [perl #91416]. | |
155 | ||
6ee63c28 FC |
156 | A similar bug also affected hash and array elements such as |
157 | C<< 'random string'->[0] >>, which would deparse as C<$random string[0]>. | |
158 | This has been fixed. | |
159 | ||
cb1728ed FC |
160 | Those same syntaxes used to drop the package name from variables beginning |
161 | with a punctuation mark, as in C<< "foo::]"->{$key} >>. This, too, has | |
162 | been fixed. | |
163 | ||
36a6a135 FC |
164 | B::Deparse no longer hangs when deparsing a program with stash |
165 | circularities, such as C<BEGIN { *Acme::Acme:: = *Acme:: }> [perl #91384]. | |
166 | ||
167 | C</$s[1]/> used to be deparsed as C<$s[1]> if @s were a lexical variable | |
2e120742 FC |
168 | [perl #81424]. Similarly, C</$#s/> would be deparsed as C<$#s> for both |
169 | lexical and package variables. These has been fixed. | |
36a6a135 FC |
170 | |
171 | The C</applaud> regular expression flags are no longer omitted. | |
172 | ||
e3ed6ae8 FC |
173 | Feature hints are now deparsed with C<use feature> rather than C<%^H> |
174 | assignments. | |
175 | ||
025130bf FC |
176 | A regression in 1.10 that caused C<ambient_pragmas> to disabled strict mode |
177 | in obscure cases has been fixed. | |
178 | ||
c7235129 FC |
179 | Strict mode is now fully deparsed, including subs and vars [perl #24027]. |
180 | ||
a7106152 FC |
181 | The global variables C<$(>, C<$|> and C<$)> are now deparsed with braces |
182 | (i.e., C<${(}>) in regular expressions [perl #86060]. | |
183 | ||
6f103008 FC |
184 | =item * |
185 | ||
7f92e913 CBW |
186 | L<CGI> has been upgraded from version 3.58 to version 3.59. |
187 | ||
188 | We no longer read from STDIN when the Content-Length is not set, preventing | |
189 | requests with no Content-Length from freezing in some cases. This is consistent | |
190 | with the CGI RFC 3875, and is also consistent with CGI::Simple. However, the old | |
191 | behavior may have been expected by some command-line uses of CGI.pm. | |
192 | ||
193 | =item * | |
194 | ||
2b283575 CBW |
195 | L<CPAN::Meta> has been upgraded from version 2.112621 to version 2.113640. |
196 | ||
197 | Version::Requirements has now been merged as CPAN::Meta::Requirements. | |
198 | ||
199 | =item * | |
200 | ||
ce6b844f | 201 | L<CPANPLUS> has been upgraded from version 0.9113 to version 0.9116. |
7f41f337 | 202 | |
88c5c971 CBW |
203 | =item * |
204 | ||
8f12b018 FC |
205 | L<Data::Dumper> has been upgraded from version 2.135_01 to version |
206 | 2.135_03. | |
207 | ||
208 | It can now dump vstrings [perl #101162]. | |
209 | ||
26afcec5 FC |
210 | The nameless typeglob (C<*{""}>) is now dumped properly. |
211 | ||
8f12b018 FC |
212 | =item * |
213 | ||
d7fbd56d FC |
214 | L<diagnostics> has been upgraded from version 1.26 to version 1.27. |
215 | ||
216 | See the entry for splain in the L</Utility Changes> section, for the | |
217 | changes. The diagnostics module and the splain utility are actually one | |
218 | and the same. | |
219 | ||
220 | =item * | |
221 | ||
711a3903 FC |
222 | L<ExtUtils::Packlist> has been upgraded from version 1.45 to version 1.46. |
223 | ||
224 | It no longer produces "used once" warnings when the C<read> and C<write> | |
225 | methods are called while the main program is still compiling (e.g., from | |
226 | within a BEGIN block) [perl #107410] [rt.cpan.org #50315]. | |
227 | ||
228 | =item * | |
229 | ||
4e6ab4ad CBW |
230 | L<Module::Pluggable> has been upgraded from version 3.9 to version 4.0. |
231 | ||
232 | =item * | |
233 | ||
9d055b1a CBW |
234 | L<perlfaq> has been upgraded from version 5.0150036 to version 5.0150037. |
235 | ||
236 | =item * | |
237 | ||
cadced9f FC |
238 | L<PerlIO::scalar> has been upgraded from version 0.12 to version 0.13. |
239 | ||
240 | (This is the module that implements C<< open $fh, '>', \$scalar >>.) | |
241 | ||
242 | It no longer assumes during C<seek> that $scalar is a string internally. | |
243 | If it didn't crash, it was close to doing so [perl #92706]. | |
244 | ||
245 | Printing to an in-memory handle now works if the $scalar holds a reference, | |
246 | stringifying the reference before modifying it. References used to be | |
247 | treated as empty strings. | |
248 | ||
249 | Printing to an in-memory handle no longer crashes if the $scalar happens to | |
250 | hold a number internally, but no string buffer. | |
251 | ||
252 | =item * | |
253 | ||
60ffae32 | 254 | L<POSIX> has been upgraded from version 1.27 to version 1.29. |
4e6e9b23 FC |
255 | |
256 | C<sigsuspend> and C<pause> now run signals handle before returning, as the | |
257 | whole point of these two functions is to wait until a signal has | |
258 | arrived, and then return I<after> it has been triggered. Delayed, or | |
259 | "safe", signals were preventing that from happening, possibly resulting in | |
260 | race conditions [perl #107216]. | |
60ffae32 CBW |
261 | C<POSIX::sleep> is now a direct call into the underlying OS C<sleep> |
262 | function, instead of being a Perl wrapper on C<CORE::sleep>. C<POSIX::dup2> | |
263 | now returns the correct value on Win32 (I<i.e.> the file descriptor). | |
264 | C<POSIX::SigSet> C<sigsuspend> and C<sigpending> and C<POSIX::pause> now | |
265 | dispatch safe signals immediately before returning to their caller. | |
4e6e9b23 FC |
266 | |
267 | =item * | |
268 | ||
1887da8c RS |
269 | L<Pod::Perldoc> has been upgraded from version 3.15_01 to version 3.15_15. |
270 | ||
271 | =item * | |
272 | ||
88c5c971 CBW |
273 | L<Term::UI> has been upgraded from version 0.26 to version 0.30. |
274 | ||
c0504019 TR |
275 | =item * |
276 | ||
277 | L<Tie::File> has been upgraded from version 0.96 to version 0.98. | |
278 | ||
937a45d0 KW |
279 | =item * |
280 | ||
281 | L<Unicode::UCD> has been upgraded from version 0.37 to version 0.38. | |
282 | This changes the output of C<prop_invmap()> for the Name_Alias property | |
283 | to reflect the changes that are planned for Unicode 6.1, so that there | |
284 | won't be a format change when upgrading to 6.1. Briefly, a second | |
285 | component of each alias is added that gives the type of alias it is. | |
286 | Examples are at L<Unicode::UCD/prop_invmap()>. | |
287 | ||
ef337e16 CBW |
288 | =item * |
289 | ||
290 | L<Version::Requirements> has been upgraded from version 0.101020 to version 0.101021. | |
291 | ||
292 | Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements, | |
293 | which is a drop-in replacement. | |
294 | ||
7f28d7ed | 295 | =back |
679b54e7 | 296 | |
52deee2e | 297 | =head2 Removed Modules and Pragmata |
08ad9465 | 298 | |
52deee2e | 299 | =over 4 |
dc7edc5c | 300 | |
7788a270 CBW |
301 | =item * |
302 | ||
52deee2e | 303 | XXX |
be9a5e16 | 304 | |
52deee2e | 305 | =back |
3c7c5233 | 306 | |
52deee2e | 307 | =head1 Documentation |
3c7c5233 | 308 | |
52deee2e DR |
309 | XXX Changes to files in F<pod/> go here. Consider grouping entries by |
310 | file and be sure to link to the appropriate page, e.g. L<perlfunc>. | |
b42ff875 | 311 | |
52deee2e | 312 | =head2 New Documentation |
b42ff875 | 313 | |
52deee2e | 314 | XXX Changes which create B<new> files in F<pod/> go here. |
a71d67b1 | 315 | |
52deee2e | 316 | =head3 L<XXX> |
a71d67b1 | 317 | |
52deee2e | 318 | XXX Description of the purpose of the new file here |
a71d67b1 | 319 | |
52deee2e | 320 | =head2 Changes to Existing Documentation |
a71d67b1 | 321 | |
52deee2e DR |
322 | XXX Changes which significantly change existing files in F<pod/> go here. |
323 | However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics> | |
324 | section. | |
7e7629fa | 325 | |
cadced9f FC |
326 | =head3 L<perlfunc> |
327 | ||
328 | =over 4 | |
329 | ||
330 | =item * | |
331 | ||
332 | C<dbmopen> treats a 0 mode as a special case, that prevents a nonexistent | |
333 | file from being created. This has been the case since Perl 5.000, but was | |
334 | never documented anywhere. Now the perlfunc entry mentions it | |
335 | [perl #90064]. | |
336 | ||
337 | =item * | |
338 | ||
339 | The entry for C<split> has been rewritten. It is now far clearer than | |
340 | before. | |
341 | ||
342 | =back | |
343 | ||
344 | =head3 L<perlop> and L<perlsyn> | |
7e7629fa | 345 | |
52deee2e | 346 | =over 4 |
7e7629fa FC |
347 | |
348 | =item * | |
349 | ||
cadced9f FC |
350 | Documentation of the smartmatch operator has been reworked and moved from |
351 | perlsyn to perlop where it belongs. | |
352 | ||
353 | =item * | |
354 | ||
355 | Documentation of the ellipsis statement (C<...>) has been reworked and | |
356 | moved from perlop to perlsyn. | |
c2654555 | 357 | |
52deee2e | 358 | =back |
85ca3be7 | 359 | |
52deee2e | 360 | =head1 Diagnostics |
85ca3be7 | 361 | |
52deee2e DR |
362 | The following additions or changes have been made to diagnostic output, |
363 | including warnings and fatal error messages. For the complete list of | |
364 | diagnostic messages, see L<perldiag>. | |
7788a270 | 365 | |
52deee2e DR |
366 | XXX New or changed warnings emitted by the core's C<C> code go here. Also |
367 | include any changes in L<perldiag> that reconcile it to the C<C> code. | |
7788a270 | 368 | |
52deee2e DR |
369 | [ Within each section, list entries as a =item entry that links to perldiag, |
370 | e.g. | |
65ae8d99 | 371 | |
52deee2e | 372 | =item * |
a3e88ad7 | 373 | |
52deee2e DR |
374 | L<Invalid version object|perldiag/"Invalid version object"> |
375 | ] | |
a3e88ad7 | 376 | |
52deee2e | 377 | =head2 New Diagnostics |
a3e88ad7 | 378 | |
711a3903 FC |
379 | =over 4 |
380 | ||
381 | =item * | |
382 | ||
383 | L<Useless use of \E|perldiag/"Useless use of \E"> | |
384 | ||
385 | C<\E> does nothing unless preceded by C<\Q>, C<\L> or C<\U>. | |
386 | ||
387 | =back | |
6138a722 | 388 | |
52deee2e | 389 | =head3 New Errors |
6138a722 | 390 | |
0aaeb177 | 391 | =over 4 |
be539103 | 392 | |
a47fb3fe CBW |
393 | =item * |
394 | ||
4888c563 FC |
395 | L<Cannot set tied @DB::args|perldiag/"Cannot set tied @DB::args"> |
396 | ||
397 | This error occurs when C<caller> tries to set C<@DB::args> but finds it | |
398 | tied. Before this error was added, it used to crash instead. | |
a3f52e2e | 399 | |
52272450 FC |
400 | =item * |
401 | ||
402 | L<Cannot tie unreifiable array|perldiag/"Cannot tie unreifiable array"> | |
403 | ||
404 | This error is part of a safety check that the C<tie> operator does before | |
405 | tying a special array like C<@_>. You should never see this message. | |
406 | ||
0aaeb177 | 407 | =back |
a3f52e2e | 408 | |
52deee2e | 409 | =head3 New Warnings |
a47fb3fe | 410 | |
0aaeb177 | 411 | =over 4 |
7ef25837 | 412 | |
6d110ad0 FC |
413 | =item * |
414 | ||
52deee2e | 415 | XXX L<message|perldiag/"message"> |
6d110ad0 FC |
416 | |
417 | =back | |
418 | ||
0aaeb177 SH |
419 | =head2 Changes to Existing Diagnostics |
420 | ||
52deee2e | 421 | XXX Changes (i.e. rewording) of diagnostic messages go here |
61f966e7 | 422 | |
52deee2e | 423 | =over 4 |
66008486 | 424 | |
5dd80d85 FC |
425 | =item * |
426 | ||
52deee2e | 427 | XXX Describe change here |
5dd80d85 | 428 | |
3432e5a1 | 429 | =back |
b420b12a | 430 | |
cadced9f FC |
431 | =head2 Removals |
432 | ||
433 | =over 4 | |
434 | ||
435 | =item * | |
436 | ||
437 | "sort is now a reserved word" | |
438 | ||
439 | This error used to occur when C<sort> was called without arguments, followed by C<;> or C<)>. (E.g., C<sort;> would die, but C<{sort}> was | |
440 | OK.) This error message was added in Perl 3 to catch code like | |
441 | C<close(sort)> which would no longer work. More than two decades later, | |
442 | this message is no longer appropriate. Now C<sort> without arguments is | |
443 | always allowed, and returns an empty list, as it did in those cases where | |
444 | it was already allowed [perl #90030]. | |
445 | ||
446 | =back | |
447 | ||
0aaeb177 | 448 | =head1 Utility Changes |
9cfd094e | 449 | |
52deee2e DR |
450 | XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go |
451 | here. Most of these are built within the directories F<utils> and F<x2p>. | |
d6cf2367 | 452 | |
52deee2e DR |
453 | [ List utility changes as a =head3 entry for each utility and =item |
454 | entries for each change | |
455 | Use L<XXX> with program names to get proper documentation linking. ] | |
b53e16ae | 456 | |
d7fbd56d | 457 | =head3 L<splain> |
0aaeb177 | 458 | |
e3c71926 | 459 | =over 4 |
b53e16ae FC |
460 | |
461 | =item * | |
462 | ||
d7fbd56d FC |
463 | splain no longer emits backtraces with the first line number repeated. |
464 | This: | |
465 | ||
466 | Uncaught exception from user code: | |
467 | Cannot fwiddle the fwuddle at -e line 1. | |
468 | at -e line 1 | |
469 | main::baz() called at -e line 1 | |
470 | main::bar() called at -e line 1 | |
471 | main::foo() called at -e line 1 | |
472 | ||
473 | has become this: | |
474 | ||
475 | Uncaught exception from user code: | |
476 | Cannot fwiddle the fwuddle at -e line 1. | |
477 | main::baz() called at -e line 1 | |
478 | main::bar() called at -e line 1 | |
479 | main::foo() called at -e line 1 | |
ba91b4f3 | 480 | |
b18aa002 FC |
481 | =item * |
482 | ||
483 | Some error message consist of multiple lines that are listed as separate | |
484 | entries in L<perldiag>. splain has been taught to find the separate | |
485 | entries in these cases, instead of simply failing to find the message. | |
486 | ||
52deee2e | 487 | =back |
ba91b4f3 | 488 | |
52deee2e | 489 | =head1 Configuration and Compilation |
f4912a50 | 490 | |
52deee2e DR |
491 | XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools |
492 | go here. Any other changes to the Perl build process should be listed here. | |
493 | However, any platform-specific changes should be listed in the | |
494 | L</Platform Support> section, instead. | |
a3f52e2e | 495 | |
52deee2e | 496 | [ List changes as a =item entry ]. |
a3f52e2e | 497 | |
0aaeb177 | 498 | =over 4 |
a3f52e2e FC |
499 | |
500 | =item * | |
501 | ||
3e975088 NC |
502 | The Pod files for the perl FAQ, L<perlxs>, L<perlxstut> and L<perldoc> |
503 | are once again correctly installed in the same directory as the other core | |
504 | Pods. | |
505 | ||
506 | =for 5.16.0 This isn't a regression from 5.14.x, so don't mention this. | |
a3f52e2e | 507 | |
0aaeb177 | 508 | =back |
a3f52e2e | 509 | |
52deee2e | 510 | =head1 Testing |
a3f52e2e | 511 | |
52deee2e DR |
512 | XXX Any significant changes to the testing of a freshly built perl should be |
513 | listed here. Changes which create B<new> files in F<t/> go here as do any | |
514 | large changes to the testing harness (e.g. when parallel testing was added). | |
515 | Changes to existing files in F<t/> aren't worth summarising, although the bugs | |
516 | that they represent may be covered elsewhere. | |
ad32999b | 517 | |
52deee2e | 518 | [ List each test improvement as a =item entry ] |
f4912a50 | 519 | |
0aaeb177 | 520 | =over 4 |
ad32999b | 521 | |
f4912a50 | 522 | =item * |
ad32999b | 523 | |
48eabb99 NC |
524 | F<t/porting/utils.t> now tests that various utility scripts compile cleanly. |
525 | During development, this avoids the embarrassment of inadvertently pushing a | |
526 | commit which breaks code which isn't otherwise tested by the regression test | |
527 | suite. For example, F<installperl> and F<installman>, needed by | |
528 | C<make install>, are tested here. | |
c15f899f | 529 | |
7f28d7ed | 530 | =back |
ad32999b | 531 | |
52deee2e | 532 | =head1 Platform Support |
d1fb015b | 533 | |
52deee2e | 534 | XXX Any changes to platform support should be listed in the sections below. |
d1fb015b | 535 | |
52deee2e DR |
536 | [ Within the sections, list each platform as a =item entry with specific |
537 | changes as paragraphs below it. ] | |
d1fb015b | 538 | |
52deee2e | 539 | =head2 New Platforms |
66008486 | 540 | |
52deee2e DR |
541 | XXX List any platforms that this version of perl compiles on, that previous |
542 | versions did not. These will either be enabled by new files in the F<hints/> | |
543 | directories, or new subdirectories and F<README> files at the top level of the | |
544 | source tree. | |
66008486 | 545 | |
52deee2e | 546 | =over 4 |
7e7629fa | 547 | |
52deee2e | 548 | =item XXX-some-platform |
7e7629fa | 549 | |
52deee2e | 550 | XXX |
73512201 | 551 | |
52deee2e | 552 | =back |
73512201 | 553 | |
52deee2e | 554 | =head2 Discontinued Platforms |
a1f0e6ed | 555 | |
52deee2e | 556 | XXX List any platforms that this version of perl no longer compiles on. |
a1f0e6ed | 557 | |
52deee2e | 558 | =over 4 |
a1f0e6ed | 559 | |
52deee2e | 560 | =item XXX-some-platform |
a1f0e6ed | 561 | |
52deee2e | 562 | XXX |
ad790500 | 563 | |
52deee2e | 564 | =back |
ad790500 | 565 | |
52deee2e | 566 | =head2 Platform-Specific Notes |
6d91e957 | 567 | |
52deee2e DR |
568 | XXX List any changes for specific platforms. This could include configuration |
569 | and compilation changes or changes in portability/compatibility. However, | |
570 | changes within modules for platforms should generally be listed in the | |
571 | L</Modules and Pragmata> section. | |
6d91e957 | 572 | |
52deee2e | 573 | =over 4 |
d6b99bf4 | 574 | |
52deee2e | 575 | =item XXX-some-platform |
d6b99bf4 | 576 | |
52deee2e | 577 | XXX |
d6b99bf4 | 578 | |
52deee2e | 579 | =back |
d6b99bf4 | 580 | |
52deee2e | 581 | =head1 Internal Changes |
d6b99bf4 | 582 | |
52deee2e DR |
583 | XXX Changes which affect the interface available to C<XS> code go here. |
584 | Other significant internal changes for future core maintainers should | |
585 | be noted as well. | |
d6b99bf4 | 586 | |
52deee2e | 587 | [ List each change as a =item entry ] |
8aade7da | 588 | |
52deee2e | 589 | =over 4 |
8aade7da | 590 | |
c7b728ca SF |
591 | =item * |
592 | ||
39de7394 FC |
593 | There are now feature bundle hints in C<PL_hints> (C<$^H>) that version |
594 | declarations use, to avoid having to load F<feature.pm>. One setting of | |
595 | the hint bits indicates a "custom" feature bundle, which means that the | |
596 | entries in C<%^H> still apply. F<feature.pm> uses that. | |
597 | ||
598 | The C<HINT_FEATURE_MASK> macro is defined in F<perl.h> along with other | |
599 | hints. Other macros for setting and testing features and bundles are in | |
600 | the new F<feature.h>. C<FEATURE_IS_ENABLED> (which has moved to | |
601 | F<feature.h>) is no longer used throughout the codebase, but more specific | |
602 | macros, e.g., C<FEATURE_SAY_IS_ENABLED>, that are defined in F<feature.h>. | |
603 | ||
604 | =item * | |
605 | ||
606 | F<lib/feature.pm> is now a generated file, created by the new | |
607 | F<regen/feature.pl> script, which also generates F<feature.h>. | |
5dd80d85 | 608 | |
52272450 FC |
609 | =item * |
610 | ||
611 | Tied arrays are now always C<AvREAL>. If C<@_> or C<DB::args> is tied, it | |
612 | is reified first, to make sure this is always the case. | |
613 | ||
52deee2e | 614 | =back |
5dd80d85 | 615 | |
52deee2e | 616 | =head1 Selected Bug Fixes |
c7b728ca | 617 | |
52deee2e DR |
618 | XXX Important bug fixes in the core language are summarised here. |
619 | Bug fixes in files in F<ext/> and F<lib/> are best summarised in | |
620 | L</Modules and Pragmata>. | |
c7b728ca | 621 | |
52deee2e | 622 | [ List each fix as a =item entry ] |
c7b728ca | 623 | |
52deee2e | 624 | =over 4 |
84b2a83e | 625 | |
5343a617 | 626 | =item * "b . COND" in the debugger has been fixed |
84b2a83e | 627 | |
5343a617 SF |
628 | Breaking on the current line with C<b . COND> was broken by previous work and |
629 | has now been fixed. | |
84b2a83e | 630 | |
07f0992c FC |
631 | =item * Tying C<%^H> |
632 | ||
90bf1576 FC |
633 | Tying C<%^H> no longer causes perl to crash or ignore |
634 | the contents of C<%^H> when entering a compilation | |
07f0992c FC |
635 | scope [perl #106282]. |
636 | ||
36a6a135 FC |
637 | =item * C<~> on vstrings |
638 | ||
639 | The bitwise complement operator (and possibly other operators, too) when | |
640 | passed a vstring would leave vstring magic attached to the return value, | |
641 | even though the string had changed. This meant that | |
642 | C<< version->new(~v1.2.3) >> would create a version looking like "v1.2.3" | |
643 | even though the string passed to C<< version->new >> was actually | |
644 | "\376\375\374". This also caused L<B::Deparse> to deparse C<~v1.2.3> | |
645 | incorrectly, without the C<~> [perl #29070]. | |
646 | ||
647 | =item * Vstrings blowing away magic | |
648 | ||
649 | Assigning a vstring to a magic (e.g., tied, C<$!>) variable and then | |
650 | assigning something else used to blow away all the magic. This meant that | |
651 | tied variables would come undone, C<$!> would stop getting updated on | |
652 | failed system calls, C<$|> would stop setting autoflush, and other | |
653 | mischief would take place. This has been fixed. | |
654 | ||
a32fcfdc FC |
655 | =item * C<newHVhv> and tied hashes |
656 | ||
657 | The C<newHVhv> XS function now works on tied hashes, instead of crashing or | |
658 | returning an empty hash. | |
659 | ||
063b2a72 FC |
660 | =item * Hashes will null elements |
661 | ||
662 | It is possible from XS code to create hashes with elements that have no | |
663 | values. Perl itself sometimes creates such hashes, but they are rarely | |
664 | visible to Perl code. The hash element and slice operators used to crash | |
665 | when handling these in lvalue context. These have been fixed. They now | |
666 | produce a "Modification of non-creatable hash value attempted" error | |
667 | message. | |
668 | ||
8c7dd470 FC |
669 | =item * No warning for C<open(foo::bar)> |
670 | ||
671 | When one writes C<open foo || die>, which used to work in Perl 4, a | |
672 | "Precedence problem" warning is produced. This warning used erroneously to | |
673 | apply to fully-qualified bareword handle names as well. This has been | |
674 | corrected. | |
675 | ||
f7606f70 FC |
676 | =item * C<select> and package aliasing |
677 | ||
678 | After package aliasing (C<*foo:: = *bar::>), C<select> with 0 or 1 argument | |
679 | would sometimes return a name that could not be used to refer to the | |
680 | filehandle, or sometimes it would return C<undef> even when a filehandle | |
681 | was selected. Now it returns a typeglob reference in such cases. | |
682 | ||
c0a5c448 FC |
683 | =item * C<PerlIO::get_layers> and tied variables |
684 | ||
685 | C<PerlIO::get_layers> no longer ignores FETCH on tied variables as it used | |
12d5b6c4 FC |
686 | to most of the time [perl #97956]. |
687 | ||
688 | =item * C<PerlIO::get_layers> and numbers | |
689 | ||
690 | C<PerlIO::get_layers> no longer ignores some arguments that it thinks are | |
691 | numeric, while treating others as filehandle names. It is now consistent | |
692 | for flat scalars (i.e., not references). | |
c0a5c448 | 693 | |
3ba4cf6c FC |
694 | =item * Lvalue subs and strict mode |
695 | ||
696 | Lvalue sub calls that are not determined to be such at compile time | |
697 | (C<&$name> or &{"name"}) are no longer exempt from strict refs if they | |
698 | occur in the last statement of an lvalue subroutine [perl #102486]. | |
699 | ||
700 | =item * Non-lvalue sub calls in potentially lvalue context | |
701 | ||
702 | Sub calls whose subs are not visible at compile time, if | |
703 | they occurred in the last statement of an lvalue subroutine, | |
704 | would reject non-lvalue subroutines and die with "Can't modify non-lvalue | |
705 | subroutine call" [perl #102486]. | |
706 | ||
707 | Non-lvalue sub calls whose subs I<are> visible at compile time exhibited | |
708 | the opposite bug. If the call occurred in the last statement of an lvalue | |
709 | subroutine, there would be no error when the lvalue sub was called in | |
710 | lvalue context. Perl would blindly assign to the temporary value returned | |
711 | by the non-lvalue subroutine. | |
712 | ||
713 | =item * AUTOLOADing lvalue subs | |
714 | ||
715 | C<AUTOLOAD> routines used to take precedence over the actual sub being | |
716 | called (i.e., when autoloading wasn't needed), for sub calls in lvalue or | |
717 | potential lvalue context, if the subroutine was not visible at compile | |
718 | time. | |
719 | ||
4888c563 FC |
720 | =item * C<caller> and tied C<@DB::args> |
721 | ||
722 | C<caller> sets C<@DB::args> to the subroutine arguments when called from | |
723 | the DB package. It used to crash when doing so if C<@DB::args> happened to | |
724 | be tied. Now it croaks instead. | |
725 | ||
52272450 FC |
726 | =item * Tying C<@_> |
727 | ||
728 | Under debugging builds, this code: | |
729 | ||
730 | sub TIEARRAY{bless[]} | |
731 | sub { | |
732 | tie @_, ""; | |
733 | \@_; | |
734 | }->(1); | |
735 | ||
736 | use to produce an "av_reify called on tied array" warning. It doesn't any | |
737 | more. | |
738 | ||
ad266194 FC |
739 | =item * Unrecognised switches on C<#!> line |
740 | ||
741 | If a switch, such as B<-x>, that cannot occur on the C<#!> line is used | |
742 | there, perl dies with "Can’t emulate...". | |
743 | ||
744 | It used to produce the same message for switches that perl did not | |
745 | recognise at all, whether on the command line or the C<#!> line. | |
746 | ||
747 | Now it produces the "Unrecognized switch" error message [perl #104288]. | |
748 | ||
17b27d32 FC |
749 | =item * C<system> and SIGCHLD |
750 | ||
751 | C<system> now temporarily blocks the SIGCHLD signal handler, to prevent the | |
752 | signal handler from stealing the exit status [perl #105700]. | |
753 | ||
b0e9fc93 FC |
754 | =item * Deleting methods via C<delete> |
755 | ||
756 | Deletion of methods via C<delete $Class::{method}> syntax used to update | |
757 | method caches if called in void context, but not scalar or list context. | |
758 | Now it always updates those caches. | |
759 | ||
d563d34b FC |
760 | =item * Hash element deletion and destructors |
761 | ||
762 | When hash elements are deleted in void context, the internal hash entry is | |
763 | now freed before the value is freed, to prevent destructors call by that | |
764 | latter freeing from seeing the hash in an inconsistent state. It was | |
765 | possible to cause double-frees if the destructor freed the hash itself | |
766 | [perl #100340]. | |
767 | ||
6e555b9a FC |
768 | =item * C<(s)printf>'s %n formatting code |
769 | ||
770 | The %n formatting code, which causes the number of characters to be | |
771 | assigned to the next argument to C<printf> or C<sprintf> now actually | |
772 | assigns the number of characters, instead of the number of bytes. | |
773 | ||
774 | It also works now with special lvalue functions like C<substr> and with | |
775 | nonexistent hash and array elements [perl #103492]. | |
776 | ||
ac8fb82c FC |
777 | =item * Typeglobs and threads |
778 | ||
779 | Typeglobs returned from threads are no longer cloned if the parent thread | |
780 | already has a glob with the same name. This means that returned | |
781 | subroutines will now assign to the right package variables [perl #107366]. | |
782 | ||
711a3903 FC |
783 | =item * C<local $_> |
784 | ||
785 | In Perl 5.14, C<local $_> was changed to create a new variable not tied to | |
786 | anything, even if $_ was tied before that. But, due to an oversight, it | |
787 | would still call FETCH once on a tied $_ before replacing it with the new | |
788 | variable. This has been fixed [perl #105912]. | |
789 | ||
cadced9f FC |
790 | =item * Returning tied variables |
791 | ||
792 | When returning a value from a non-lvalue subroutine, Perl copies the value. | |
793 | Sometimes it cheats for the sake of speed, and does not copy the value if | |
794 | it makes no observable difference. This optimisation was erroneously | |
795 | allowing the copy to be skipped on tied variables, causing a difference in | |
796 | behaviour depending on the tied variable's reference count. This has been | |
797 | fixed [perl #95548]. | |
798 | ||
799 | =item * C<{@a = sort}> no longer crashes | |
800 | ||
801 | This particular piece of code (C<sort> with no arguments assigned to an | |
802 | array, inside a block with no C<;>) started crashing in an earlier 5.15.x | |
803 | release. It has been fixed. | |
804 | ||
805 | =item * C<utf8::decode> and read-only scalars | |
806 | ||
807 | C<utf8::decode> now refuses to modify read-only scalars [perl #91850]. | |
808 | ||
809 | =item * C<dbmopen> with undefined mode | |
810 | ||
811 | C<dbmopen> now only warns once, rather than three times, if the mode | |
812 | argument is C<undef> [perl #90064]. | |
813 | ||
814 | =item * Freeing an aggregate during list assignment | |
815 | ||
816 | If list assignment to a hash or array triggered destructors that freed the | |
817 | hash or array itself, a crash would ensue. This is no longer the case | |
818 | [perl #107440]. | |
819 | ||
52deee2e | 820 | =back |
84b2a83e | 821 | |
52deee2e | 822 | =head1 Known Problems |
84b2a83e | 823 | |
52deee2e DR |
824 | XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any |
825 | tests that had to be C<TODO>ed for the release would be noted here, unless | |
826 | they were specific to a particular platform (see below). | |
84b2a83e | 827 | |
52deee2e DR |
828 | This is a list of some significant unfixed bugs, which are regressions |
829 | from either 5.XXX.XXX or 5.XXX.XXX. | |
84b2a83e | 830 | |
52deee2e | 831 | [ List each fix as a =item entry ] |
84b2a83e | 832 | |
52deee2e | 833 | =over 4 |
b53e16ae | 834 | |
7c864bb3 VP |
835 | =item * |
836 | ||
52deee2e | 837 | XXX |
7c864bb3 | 838 | |
63ac71b9 | 839 | =back |
bbc28bfc | 840 | |
52deee2e | 841 | =head1 Obituary |
8fe05716 | 842 | |
52deee2e DR |
843 | XXX If any significant core contributor has died, we've added a short obituary |
844 | here. | |
8fe05716 | 845 | |
52deee2e | 846 | =head1 Acknowledgements |
8fe05716 | 847 | |
52deee2e | 848 | XXX Generate this with: |
8fe05716 | 849 | |
52deee2e | 850 | perl Porting/acknowledgements.pl v5.15.6..HEAD |
29cf780c | 851 | |
44691e6f AB |
852 | =head1 Reporting Bugs |
853 | ||
854 | If you find what you think is a bug, you might check the articles | |
52deee2e DR |
855 | recently posted to the comp.lang.perl.misc newsgroup and the perl |
856 | bug database at http://rt.perl.org/perlbug/ . There may also be | |
44691e6f AB |
857 | information at http://www.perl.org/ , the Perl Home Page. |
858 | ||
859 | If you believe you have an unreported bug, please run the L<perlbug> | |
52deee2e DR |
860 | program included with your release. Be sure to trim your bug down |
861 | to a tiny but sufficient test case. Your bug report, along with the | |
862 | output of C<perl -V>, will be sent off to perlbug@perl.org to be | |
863 | analysed by the Perl porting team. | |
44691e6f AB |
864 | |
865 | If the bug you are reporting has security implications, which make it | |
52deee2e DR |
866 | inappropriate to send to a publicly archived mailing list, then please send |
867 | it to perl5-security-report@perl.org. This points to a closed subscription | |
868 | unarchived mailing list, which includes | |
869 | all the core committers, who will be able | |
870 | to help assess the impact of issues, figure out a resolution, and help | |
871 | co-ordinate the release of patches to mitigate or fix the problem across all | |
872 | platforms on which Perl is supported. Please only use this address for | |
873 | security issues in the Perl core, not for modules independently | |
874 | distributed on CPAN. | |
44691e6f AB |
875 | |
876 | =head1 SEE ALSO | |
877 | ||
52deee2e DR |
878 | The F<Changes> file for an explanation of how to view exhaustive details |
879 | on what changed. | |
44691e6f AB |
880 | |
881 | The F<INSTALL> file for how to build Perl. | |
882 | ||
883 | The F<README> file for general stuff. | |
884 | ||
885 | The F<Artistic> and F<Copying> files for copyright information. | |
886 | ||
887 | =cut |