Commit | Line | Data |
7120b314 |
1 | =head1 NAME |
2 | |
5a00ee6a |
3 | perl5110delta - what is new for perl v5.11.0 |
7120b314 |
4 | |
5 | =head1 DESCRIPTION |
6 | |
5a00ee6a |
7 | This document describes differences between the 5.10.0 release and |
8 | the 5.11.0 development release. |
7120b314 |
9 | |
10 | =head1 Incompatible Changes |
11 | |
ad1d1c50 |
12 | =head2 In @INC, move ARCHLIB and PRIVLIB after the current version's site_perl and vendor_perl. |
13 | |
14 | |
8b8da387 |
15 | =head2 Switch statement changes |
16 | |
17 | The handling of complex expressions by the C<given>/C<when> switch |
a98ccf1e |
18 | statement has been enhanced. These enhancements are also available in |
19 | 5.10.1 and subsequent 5.10 releases. There are two new cases where C<when> now |
412304fb |
20 | interprets its argument as a boolean, instead of an expression to be used |
8b8da387 |
21 | in a smart match: |
22 | |
23 | =over 4 |
24 | |
8b8da387 |
25 | =item flip-flop operators |
26 | |
98814a2b |
27 | The C<..> and C<...> flip-flop operators are now evaluated in boolean |
28 | context, following their usual semantics; see L<perlop/"Range Operators">. |
29 | |
30 | Note that, as in perl 5.10.0, C<when (1..10)> will not work to test |
31 | whether a given value is an integer between 1 and 10; you should use |
32 | C<when ([1..10])> instead (note the array reference). |
33 | |
34 | However, contrary to 5.10.0, evaluating the flip-flop operators in boolean |
35 | context ensures it can now be useful in a C<when()>, notably for |
36 | implementing bistable conditions, like in: |
37 | |
5a00ee6a |
38 | when (/^=begin/ .. /^=end/) { |
39 | # do something |
40 | } |
8b8da387 |
41 | |
42 | =item defined-or operator |
43 | |
44 | A compound expression involving the defined-or operator, as in |
45 | C<when (expr1 // expr2)>, will be treated as boolean if the first |
46 | expression is boolean. (This just extends the existing rule that applies |
47 | to the regular or operator, as in C<when (expr1 || expr2)>.) |
48 | |
49 | =back |
50 | |
98814a2b |
51 | The next section details more changes brought to the semantics to |
8b8da387 |
52 | the smart match operator, that naturally also modify the behaviour |
53 | of the switch statements where smart matching is implicitly used. |
a98ccf1e |
54 | These changers were also made for the 5.10.1 release, and will remain in |
55 | subsequent 5.10 releases. |
8b8da387 |
56 | |
57 | =head2 Smart match changes |
58 | |
59 | =head3 Changes to type-based dispatch |
60 | |
61 | The smart match operator C<~~> is no longer commutative. The behaviour of |
62 | a smart match now depends primarily on the type of its right hand |
5a00ee6a |
63 | argument. Moreover, its semantics have been adjusted for greater |
ee18cc6c |
64 | consistency or usefulness in several cases. While the general backwards |
65 | compatibility is maintained, several changes must be noted: |
8b8da387 |
66 | |
67 | =over 4 |
68 | |
69 | =item * |
70 | |
71 | Code references with an empty prototype are no longer treated specially. |
72 | They are passed an argument like the other code references (even if they |
73 | choose to ignore it). |
74 | |
75 | =item * |
76 | |
77 | C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine |
9091a618 |
78 | returns a true value for each key of the hash (or element of the |
8b8da387 |
79 | array), instead of passing the whole hash or array as a reference to |
80 | the subroutine. |
81 | |
82 | =item * |
83 | |
ee18cc6c |
84 | Due to the commutativity breakage, code references are no longer |
85 | treated specially when appearing on the left of the C<~~> operator, |
86 | but like any vulgar scalar. |
87 | |
88 | =item * |
89 | |
8b8da387 |
90 | C<undef ~~ %hash> is always false (since C<undef> can't be a key in a |
91 | hash). No implicit conversion to C<""> is done (as was the case in perl |
92 | 5.10.0). |
93 | |
94 | =item * |
95 | |
96 | C<$scalar ~~ @array> now always distributes the smart match across the |
97 | elements of the array. It's true if one element in @array verifies |
98 | C<$scalar ~~ $element>. This is a generalization of the old behaviour |
99 | that tested whether the array contained the scalar. |
100 | |
101 | =back |
102 | |
103 | The full dispatch table for the smart match operator is given in |
104 | L<perlsyn/"Smart matching in detail">. |
105 | |
106 | =head3 Smart match and overloading |
107 | |
108 | According to the rule of dispatch based on the rightmost argument type, |
109 | when an object overloading C<~~> appears on the right side of the |
110 | operator, the overload routine will always be called (with a 3rd argument |
111 | set to a true value, see L<overload>.) However, when the object will |
112 | appear on the left, the overload routine will be called only when the |
9091a618 |
113 | rightmost argument is a simple scalar. This way distributivity of smart match |
8b8da387 |
114 | across arrays is not broken, as well as the other behaviours with complex |
115 | types (coderefs, hashes, regexes). Thus, writers of overloading routines |
ee18cc6c |
116 | for smart match mostly need to worry only with comparing against a scalar, |
117 | and possibly with stringification overloading; the other common cases |
118 | will be automatically handled consistently. |
8b8da387 |
119 | |
120 | C<~~> will now refuse to work on objects that do not overload it (in order |
665f5e98 |
121 | to avoid relying on the object's underlying structure). (However, if the |
122 | object overloads the stringification or the numification operators, and |
123 | if overload fallback is active, it will be used instead, as usual.) |
8b8da387 |
124 | |
f71d6157 |
125 | =head2 Labels can't be keywords |
126 | |
127 | Labels used as targets for the C<goto>, C<last>, C<next> or C<redo> |
128 | statements cannot be keywords anymore. This restriction will prevent |
129 | potential confusion between the C<goto LABEL> and C<goto EXPR> syntaxes: |
130 | for example, a statement like C<goto print> would jump to a label whose |
131 | name would be the return value of print(), (usually 1), instead of a |
132 | label named C<print>. Moreover, the other control flow statements |
133 | would just ignore any keyword passed to them as a label name. Since |
134 | such labels cannot be defined anymore, this kind of error will be |
135 | avoided. |
136 | |
5a00ee6a |
137 | =head2 Other incompatible changes |
138 | |
139 | =over 4 |
140 | |
141 | =item * |
142 | |
143 | The semantics of C<use feature :5.10*> have changed slightly. |
144 | See L<"Modules and Pragmata"> for more information. |
145 | |
146 | =item * |
147 | |
148 | It is now a run-time error to use the smart match operator C<~~> |
149 | with an object that has no overload defined for it. (This way |
150 | C<~~> will not break encapsulation by matching against the |
151 | object's internal representation as a reference.) |
152 | |
153 | =item * |
154 | |
155 | The version control system used for the development of the perl |
156 | interpreter has been switched from Perforce to git. This is mainly an |
157 | internal issue that only affects people actively working on the perl core; |
158 | but it may have minor external visibility, for example in some of details |
159 | of the output of C<perl -V>. See L<perlrepository> for more information. |
160 | |
161 | =item * |
162 | |
163 | The internal structure of the C<ext/> directory in the perl source has |
164 | been reorganised. In general, a module C<Foo::Bar> whose source was |
165 | stored under F<ext/Foo/Bar/> is now located under F<ext/Foo-Bar/>. Also, |
166 | some modules have been moved from F<lib/> to F<ext/>. This is purely a |
167 | source tarball change, and should make no difference to the compilation or |
168 | installation of perl, unless you have a very customised build process that |
169 | explicitly relies on this structure, or which hard-codes the C<nonxs_ext> |
170 | F<Configure> parameter. Specifically, this change does not by default |
171 | alter the location of any files in the final installation. |
172 | |
173 | =item * |
174 | |
175 | As part of the C<Test::Harness> 2.x to 3.x upgrade, the experimental |
176 | C<Test::Harness::Straps> module has been removed. |
177 | See L</"Updated Modules"> for more details. |
178 | |
179 | =item * |
180 | |
181 | As part of the C<ExtUtils::MakeMaker> upgrade, the |
182 | C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish> modules |
183 | have been removed from this distribution. |
184 | |
185 | =item * |
186 | |
187 | C<Module::CoreList> no longer contains the C<%:patchlevel> hash. |
188 | |
189 | =item * |
190 | |
191 | This one is actually a change introduced in 5.10.0, but it was missed |
192 | from that release's perldelta, so it is mentioned here instead. |
193 | |
194 | A bugfix related to the handling of the C</m> modifier and C<qr> resulted |
195 | in a change of behaviour between 5.8.x and 5.10.0: |
196 | |
197 | # matches in 5.8.x, doesn't match in 5.10.0 |
198 | $re = qr/^bar/; "foo\nbar" =~ /$re/m; |
199 | |
ad1d1c50 |
200 | =item * |
201 | |
202 | C<length undef> now returns undef. |
203 | |
5a00ee6a |
204 | =back |
205 | |
7120b314 |
206 | =head1 Core Enhancements |
207 | |
5a00ee6a |
208 | =head2 Unicode Character Database 5.1.0 |
209 | |
3141b5e1 |
210 | The copy of the Unicode Character Database included in Perl 5.11.0 has |
5a00ee6a |
211 | been updated to 5.1.0 from 5.0.0. See |
212 | L<http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes> for the |
213 | notable changes. |
214 | |
215 | =head2 A proper interface for pluggable Method Resolution Orders |
216 | |
3141b5e1 |
217 | As of Perl 5.11.0 there is a new interface for plugging and using method |
5a00ee6a |
218 | resolution orders other than the default (linear depth first search). |
219 | The C3 method resolution order added in 5.10.0 has been re-implemented as |
220 | a plugin, without changing its Perl-space interface. See L<perlmroapi> for |
221 | more information. |
222 | |
ef55af2a |
223 | =head2 The C<overloading> pragma |
1839a850 |
224 | |
225 | This pragma allows you to lexically disable or enable overloading |
226 | for some or all operations. (Yuval Kogman) |
227 | |
71e9c532 |
228 | =head2 C<\N> regex escape |
229 | |
230 | A new regex escape has been added, C<\N>. It will match any character that |
231 | is not a newline, independently from the presence or absence of the single |
232 | line match modifier C</s>. (If C<\N> is followed by an opening brace and |
233 | by a letter, perl will still assume that a Unicode character name is |
234 | coming, so compatibility is preserved.) (Rafael Garcia-Suarez) |
235 | |
4b3db487 |
236 | =head2 Implicit strictures |
237 | |
238 | Using the C<use VERSION> syntax with a version number greater or equal |
239 | to 5.11.0 will also lexically enable strictures just like C<use strict> |
240 | would do (in addition to enabling features.) So, the following: |
241 | |
242 | use 5.11.0; |
243 | |
244 | will now imply: |
245 | |
246 | use strict; |
247 | use feature ':5.11'; |
248 | |
5ee651a9 |
249 | =head2 Parallel tests |
250 | |
251 | The core distribution can now run its regression tests in parallel on |
252 | Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS> in |
253 | your environment to the number of tests to run in parallel, and run |
254 | C<make test_harness>. On a Bourne-like shell, this can be done as |
255 | |
256 | TEST_JOBS=3 make test_harness # Run 3 tests in parallel |
257 | |
258 | An environment variable is used, rather than parallel make itself, because |
259 | L<TAP::Harness> needs to be able to schedule individual non-conflicting test |
260 | scripts itself, and there is no standard interface to C<make> utilities to |
261 | interact with their job schedulers. |
262 | |
5a00ee6a |
263 | Note that currently some test scripts may fail when run in parallel (most |
264 | notably C<ext/IO/t/io_dir.t>). If necessary run just the failing scripts |
265 | again sequentially and see if the failures go away. |
266 | |
044c880b |
267 | =head2 The C<...> operator |
268 | |
269 | A new operator, C<...>, nicknamed the Yada Yada operator, has been added. |
270 | It is intended to mark placeholder code, that is not yet implemented. |
271 | See L<perlop/"Yada Yada Operator">. (chromatic) |
272 | |
5a00ee6a |
273 | =head2 DTrace support |
274 | |
275 | Some support for DTrace has been added. See "DTrace support" in F<INSTALL>. |
276 | |
277 | =head2 Support for C<configure_requires> in CPAN module metadata |
278 | |
279 | Both C<CPAN> and C<CPANPLUS> now support the C<configure_requires> keyword |
280 | in the C<META.yml> metadata file included in most recent CPAN distributions. |
281 | This allows distribution authors to specify configuration prerequisites that |
282 | must be installed before running F<Makefile.PL> or F<Build.PL>. |
283 | |
284 | See the documentation for C<ExtUtils::MakeMaker> or C<Module::Build> for more |
285 | on how to specify C<configure_requires> when creating a distribution for CPAN. |
286 | |
ad1d1c50 |
287 | =head2 The C<each> function can now operate on arrays |
288 | |
289 | =head2 Perl's core time-related functions are now Y2038 compliand |
290 | |
291 | =head2 The variable C<$,> may now be tied |
292 | |
293 | =head2 // now behaves like || in when clauses |
294 | |
295 | =head2 You can now set C<-W> from the C<PERL5OPT> environment varialbe |
296 | |
297 | |
298 | |
7120b314 |
299 | =head1 Modules and Pragmata |
300 | |
5a00ee6a |
301 | =head2 New Modules and Pragmata |
302 | |
303 | =over 4 |
304 | |
305 | =item C<autodie> |
306 | |
307 | This is a new lexically-scoped alternative for the C<Fatal> module. |
308 | The bundled version is 2.06_01. Note that in this release, using a string |
309 | eval when C<autodie> is in effect can cause the autodie behaviour to leak |
310 | into the surrounding scope. See L<autodie/"BUGS"> for more details. |
311 | |
312 | =item C<Compress::Raw::Bzip2> |
313 | |
314 | This has been added to the core (version 2.020). |
315 | |
316 | =item C<parent> |
317 | |
318 | This pragma establishes an ISA relationship with base classes at compile |
319 | time. It provides the key feature of C<base> without the feature creep. |
320 | |
321 | =item C<Parse::CPAN::Meta> |
322 | |
323 | This has been added to the core (version 1.39). |
324 | |
325 | =back |
326 | |
1839a850 |
327 | =head2 Pragmata Changes |
328 | |
329 | =over 4 |
330 | |
331 | =item C<overloading> |
332 | |
333 | See L</"The C<overloading> pragma"> above. |
334 | |
5a00ee6a |
335 | =item C<attributes> |
336 | |
337 | Upgraded from version 0.08 to 0.09. |
338 | |
339 | =item C<attrs> |
340 | |
42f099ed |
341 | The C<attrs> pragma has been removed. It had been marked as deprecated since |
342 | 5.6.0. |
5a00ee6a |
343 | |
344 | =item C<base> |
345 | |
346 | Upgraded from version 2.13 to 2.14. See L<parent> for a replacement. |
347 | |
348 | =item C<bigint> |
349 | |
350 | Upgraded from version 0.22 to 0.23. |
351 | |
352 | =item C<bignum> |
353 | |
354 | Upgraded from version 0.22 to 0.23. |
355 | |
356 | =item C<bigrat> |
357 | |
358 | Upgraded from version 0.22 to 0.23. |
359 | |
360 | =item C<charnames> |
361 | |
362 | Upgraded from version 1.06 to 1.07. |
363 | |
364 | The Unicode F<NameAliases.txt> database file has been added. This has the |
365 | effect of adding some extra C<\N> character names that formerly wouldn't |
366 | have been recognised; for example, C<"\N{LATIN CAPITAL LETTER GHA}">. |
367 | |
368 | =item C<constant> |
369 | |
370 | Upgraded from version 1.13 to 1.17. |
371 | |
372 | =item C<feature> |
373 | |
374 | The meaning of the C<:5.10> and C<:5.10.X> feature bundles has |
375 | changed slightly. The last component, if any (i.e. C<X>) is simply ignored. |
376 | This is predicated on the assumption that new features will not, in |
377 | general, be added to maintenance releases. So C<:5.10> and C<:5.10.X> |
378 | have identical effect. This is a change to the behaviour documented for |
379 | 5.10.0. |
380 | |
381 | =item C<fields> |
382 | |
383 | Upgraded from version 2.13 to 2.14 (this was just a version bump; there |
384 | were no functional changes). |
385 | |
386 | =item C<lib> |
387 | |
388 | Upgraded from version 0.5565 to 0.62. |
389 | |
390 | =item C<open> |
391 | |
392 | Upgraded from version 1.06 to 1.07. |
393 | |
394 | =item C<overload> |
395 | |
396 | Upgraded from version 1.06 to 1.07. |
397 | |
398 | =item C<overloading> |
399 | |
400 | See L</"The C<overloading> pragma"> above. |
401 | |
402 | =item C<version> |
403 | |
404 | Upgraded from version 0.74 to 0.77. |
405 | |
1839a850 |
406 | =back |
407 | |
5a00ee6a |
408 | =head2 Updated Modules |
02569b83 |
409 | |
410 | =over 4 |
411 | |
5a00ee6a |
412 | =item C<Archive::Extract> |
413 | |
414 | Upgraded from version 0.24 to 0.34. |
415 | |
416 | =item C<Archive::Tar> |
417 | |
418 | Upgraded from version 1.38 to 1.52. |
419 | |
420 | =item C<Attribute::Handlers> |
421 | |
422 | Upgraded from version 0.79 to 0.85. |
423 | |
424 | =item C<AutoLoader> |
425 | |
426 | Upgraded from version 5.63 to 5.68. |
427 | |
428 | =item C<AutoSplit> |
429 | |
430 | Upgraded from version 1.05 to 1.06. |
431 | |
432 | =item C<B> |
433 | |
434 | Upgraded from version 1.17 to 1.22. |
435 | |
436 | =item C<B::Debug> |
437 | |
438 | Upgraded from version 1.05 to 1.11. |
439 | |
440 | =item C<B::Deparse> |
441 | |
442 | Upgraded from version 0.83 to 0.89. |
443 | |
444 | =item C<B::Lint> |
445 | |
446 | Upgraded from version 1.09 to 1.11. |
447 | |
448 | =item C<B::Xref> |
449 | |
450 | Upgraded from version 1.01 to 1.02. |
451 | |
452 | =item C<Benchmark> |
453 | |
454 | Upgraded from version 1.10 to 1.11. |
455 | |
456 | =item C<Carp> |
457 | |
458 | Upgraded from version 1.08 to 1.11. |
459 | |
02569b83 |
460 | L<Carp> now includes all the necessary code to function. Previously, it |
461 | used to be a lightweight placeholder that loaded the actual code from |
462 | C<Carp::Heavy> on demand. C<Carp::Heavy> is now a simple, empty module |
463 | kept for backwards compatibility for programs that used to pre-load it. |
464 | |
02569b83 |
465 | |
5a00ee6a |
466 | =item C<CGI> |
7120b314 |
467 | |
5a00ee6a |
468 | Upgraded from version 3.29 to 3.43. |
469 | (also includes the "default_value for popup_menu()" fix from 3.45). |
7120b314 |
470 | |
5a00ee6a |
471 | =item C<Compress::Zlib> |
7120b314 |
472 | |
5a00ee6a |
473 | Upgraded from version 2.008 to 2.020. |
7120b314 |
474 | |
5a00ee6a |
475 | =item C<CPAN> |
7120b314 |
476 | |
5a00ee6a |
477 | Upgraded from version 1.9205 to 1.9402. C<CPAN::FTP> has a local fix to |
478 | stop it being too verbose on download failure. |
54ad55c5 |
479 | |
5a00ee6a |
480 | =item C<CPANPLUS> |
54ad55c5 |
481 | |
5a00ee6a |
482 | Upgraded from version 0.84 to 0.88. |
54ad55c5 |
483 | |
5a00ee6a |
484 | =item C<CPANPLUS::Dist::Build> |
e2c0f81f |
485 | |
5a00ee6a |
486 | Upgraded from version 0.06_02 to 0.36. |
e2c0f81f |
487 | |
5a00ee6a |
488 | =item C<Cwd> |
fc46f0f6 |
489 | |
5a00ee6a |
490 | Upgraded from version 3.25_01 to 3.30. |
fc46f0f6 |
491 | |
5a00ee6a |
492 | =item C<Data::Dumper> |
54ad55c5 |
493 | |
5a00ee6a |
494 | Upgraded from version 2.121_14 to 2.124. |
7120b314 |
495 | |
5a00ee6a |
496 | =item C<DB> |
7120b314 |
497 | |
5a00ee6a |
498 | Upgraded from version 1.01 to 1.02. |
499 | |
500 | =item C<DB_File> |
501 | |
502 | Upgraded from version 1.816_1 to 1.820. |
503 | |
504 | =item C<Devel::PPPort> |
505 | |
506 | Upgraded from version 3.13 to 3.19. |
507 | |
508 | =item C<Digest::MD5> |
509 | |
510 | Upgraded from version 2.36_01 to 2.39. |
511 | |
512 | =item C<Digest::SHA> |
513 | |
514 | Upgraded from version 5.45 to 5.47. |
515 | |
516 | =item C<DirHandle> |
517 | |
518 | Upgraded from version 1.01 to 1.03. |
519 | |
520 | =item C<Dumpvalue> |
521 | |
522 | Upgraded from version 1.12 to 1.13. |
523 | |
524 | =item C<DynaLoader> |
525 | |
526 | Upgraded from version 1.08 to 1.10. |
527 | |
528 | =item C<Encode> |
529 | |
530 | Upgraded from version 2.23 to 2.35. |
531 | |
532 | =item C<Errno> |
533 | |
534 | Upgraded from version 1.10 to 1.11. |
535 | |
536 | =item C<Exporter> |
537 | |
538 | Upgraded from version 5.62 to 5.63. |
539 | |
540 | =item C<ExtUtils::CBuilder> |
541 | |
542 | Upgraded from version 0.21 to 0.2602. |
543 | |
544 | =item C<ExtUtils::Command> |
545 | |
546 | Upgraded from version 1.13 to 1.16. |
547 | |
548 | =item C<ExtUtils::Constant> |
549 | |
550 | Upgraded from 0.20 to 0.22. (Note that neither of these versions are |
551 | available on CPAN.) |
552 | |
553 | =item C<ExtUtils::Embed> |
554 | |
555 | Upgraded from version 1.27 to 1.28. |
556 | |
557 | =item C<ExtUtils::Install> |
558 | |
559 | Upgraded from version 1.44 to 1.54. |
560 | |
561 | =item C<ExtUtils::MakeMaker> |
562 | |
563 | Upgraded from version 6.42 to 6.55_02. |
564 | |
565 | Note that C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish> |
566 | have been removed from this distribution. |
567 | |
568 | =item C<ExtUtils::Manifest> |
569 | |
570 | Upgraded from version 1.51_01 to 1.56. |
571 | |
572 | =item C<ExtUtils::ParseXS> |
573 | |
574 | Upgraded from version 2.18_02 to 2.2002. |
575 | |
576 | =item C<Fatal> |
577 | |
578 | Upgraded from version 1.05 to 2.06_01. See also the new pragma C<autodie>. |
579 | |
580 | =item C<File::Basename> |
581 | |
582 | Upgraded from version 2.76 to 2.77. |
583 | |
584 | =item C<File::Compare> |
585 | |
586 | Upgraded from version 1.1005 to 1.1006. |
587 | |
588 | =item C<File::Copy> |
589 | |
590 | Upgraded from version 2.11 to 2.14. |
591 | |
ad1d1c50 |
592 | File::Copy now always return 0 (not "") on failure. |
593 | |
5a00ee6a |
594 | =item C<File::Fetch> |
595 | |
596 | Upgraded from version 0.14 to 0.20. |
597 | |
598 | =item C<File::Find> |
599 | |
600 | Upgraded from version 1.12 to 1.14. |
601 | |
602 | =item C<File::Path> |
603 | |
604 | Upgraded from version 2.04 to 2.07_03. |
605 | |
606 | =item C<File::Spec> |
607 | |
608 | Upgraded from version 3.2501 to 3.30. |
609 | |
610 | =item C<File::stat> |
611 | |
612 | Upgraded from version 1.00 to 1.01. |
613 | |
ad1d1c50 |
614 | Added -X overloading, -M, -C and -A. |
615 | |
5a00ee6a |
616 | =item C<File::Temp> |
617 | |
618 | Upgraded from version 0.18 to 0.22. |
619 | |
620 | =item C<FileCache> |
621 | |
622 | Upgraded from version 1.07 to 1.08. |
623 | |
624 | =item C<FileHandle> |
625 | |
626 | Upgraded from version 2.01 to 2.02. |
627 | |
628 | =item C<Filter::Simple> |
629 | |
630 | Upgraded from version 0.82 to 0.84. |
631 | |
632 | =item C<Filter::Util::Call> |
633 | |
634 | Upgraded from version 1.07 to 1.08. |
635 | |
636 | =item C<FindBin> |
637 | |
638 | Upgraded from version 1.49 to 1.50. |
639 | |
640 | =item C<GDBM_File> |
641 | |
642 | Upgraded from version 1.08 to 1.09. |
643 | |
644 | =item C<Getopt::Long> |
645 | |
646 | Upgraded from version 2.37 to 2.38. |
647 | |
648 | =item C<Hash::Util::FieldHash> |
649 | |
650 | Upgraded from version 1.03 to 1.04. This fixes a memory leak. |
651 | |
652 | =item C<I18N::Collate> |
653 | |
654 | Upgraded from version 1.00 to 1.01. |
655 | |
656 | =item C<IO> |
657 | |
658 | Upgraded from version 1.23_01 to 1.25. |
659 | |
660 | This makes non-blocking mode work on Windows in C<IO::Socket::INET> |
661 | [CPAN #43573]. |
662 | |
663 | =item C<IO::Compress::*> |
664 | |
665 | Upgraded from version 2.008 to 2.020. |
666 | |
667 | =item C<IO::Dir> |
668 | |
669 | Upgraded from version 1.06 to 1.07. |
670 | |
671 | =item C<IO::Handle> |
672 | |
673 | Upgraded from version 1.27 to 1.28. |
674 | |
675 | =item C<IO::Socket> |
676 | |
677 | Upgraded from version 1.30_01 to 1.31. |
678 | |
679 | =item C<IO::Zlib> |
680 | |
681 | Upgraded from version 1.07 to 1.09. |
682 | |
683 | =item C<IPC::Cmd> |
684 | |
685 | Upgraded from version 0.40_1 to 0.46. |
686 | |
687 | =item C<IPC::Open3> |
688 | |
689 | Upgraded from version 1.02 to 1.04. |
690 | |
691 | =item C<IPC::SysV> |
692 | |
693 | Upgraded from version 1.05 to 2.01. |
694 | |
695 | =item C<lib> |
696 | |
697 | Upgraded from version 0.5565 to 0.62. |
698 | |
699 | =item C<List::Util> |
700 | |
701 | Upgraded from version 1.19 to 1.21. |
702 | |
703 | =item C<Locale::MakeText> |
704 | |
705 | Upgraded from version 1.12 to 1.13. |
706 | |
707 | =item C<Log::Message> |
708 | |
709 | Upgraded from version 0.01 to 0.02. |
710 | |
711 | =item C<Math::BigFloat> |
712 | |
713 | Upgraded from version 1.59 to 1.60. |
714 | |
715 | =item C<Math::BigInt> |
716 | |
717 | Upgraded from version 1.88 to 1.89. |
718 | |
719 | =item C<Math::BigInt::FastCalc> |
720 | |
721 | Upgraded from version 0.16 to 0.19. |
722 | |
723 | =item C<Math::BigRat> |
724 | |
725 | Upgraded from version 0.21 to 0.22. |
726 | |
727 | =item C<Math::Complex> |
728 | |
729 | Upgraded from version 1.37 to 1.56. |
730 | |
731 | =item C<Math::Trig> |
732 | |
733 | Upgraded from version 1.04 to 1.20. |
734 | |
735 | =item C<Memoize> |
736 | |
737 | Upgraded from version 1.01_02 to 1.01_03 (just a minor documentation |
738 | change). |
739 | |
740 | =item C<Module::Build> |
741 | |
742 | Upgraded from version 0.2808_01 to 0.34_02. |
743 | |
744 | =item C<Module::CoreList> |
745 | |
746 | Upgraded from version 2.13 to 2.18. This release no longer contains the |
747 | C<%Module::CoreList::patchlevel> hash. |
748 | |
749 | =item C<Module::Load> |
750 | |
751 | Upgraded from version 0.12 to 0.16. |
752 | |
753 | =item C<Module::Load::Conditional> |
754 | |
755 | Upgraded from version 0.22 to 0.30. |
756 | |
757 | =item C<Module::Loaded> |
758 | |
759 | Upgraded from version 0.01 to 0.02. |
760 | |
761 | =item C<Module::Pluggable> |
762 | |
763 | Upgraded from version 3.6 to 3.9. |
764 | |
765 | =item C<NDBM_File> |
766 | |
767 | Upgraded from version 1.07 to 1.08. |
768 | |
769 | =item C<Net::Ping> |
770 | |
771 | Upgraded from version 2.33 to 2.36. |
772 | |
773 | =item C<NEXT> |
774 | |
775 | Upgraded from version 0.60_01 to 0.64. |
776 | |
777 | =item C<Object::Accessor> |
778 | |
779 | Upgraded from version 0.32 to 0.34. |
780 | |
781 | =item C<OS2::REXX> |
782 | |
783 | Upgraded from version 1.03 to 1.04. |
784 | |
785 | =item C<Package::Constants> |
786 | |
787 | Upgraded from version 0.01 to 0.02. |
788 | |
789 | =item C<PerlIO> |
790 | |
791 | Upgraded from version 1.04 to 1.06. |
792 | |
793 | =item C<PerlIO::via> |
794 | |
795 | Upgraded from version 0.04 to 0.07. |
796 | |
797 | =item C<Pod::Man> |
798 | |
799 | Upgraded from version 2.16 to 2.22. |
800 | |
801 | =item C<Pod::Parser> |
802 | |
803 | Upgraded from version 1.35 to 1.37. |
804 | |
ad1d1c50 |
805 | =item Pod::Perldoc |
806 | |
807 | Upgrade from version 3.14_02 to 3.15. |
808 | |
5a00ee6a |
809 | =item C<Pod::Simple> |
810 | |
811 | Upgraded from version 3.05 to 3.07. |
812 | |
813 | =item C<Pod::Text> |
814 | |
815 | Upgraded from version 3.08 to 3.13. |
816 | |
817 | =item C<POSIX> |
818 | |
819 | Upgraded from version 1.13 to 1.17. |
820 | |
821 | =item C<Safe> |
822 | |
823 | Upgraded from 2.12 to 2.18. |
824 | |
825 | =item C<Scalar::Util> |
826 | |
827 | Upgraded from version 1.19 to 1.21. |
828 | |
829 | =item C<SelectSaver> |
830 | |
831 | Upgraded from 1.01 to 1.02. |
832 | |
833 | =item C<SelfLoader> |
834 | |
835 | Upgraded from 1.11 to 1.17. |
836 | |
837 | =item C<Socket> |
838 | |
839 | Upgraded from 1.80 to 1.82. |
840 | |
841 | =item C<Storable> |
842 | |
843 | Upgraded from 2.18 to 2.20. |
844 | |
845 | =item C<Switch> |
846 | |
847 | Upgraded from version 2.13 to 2.14. Please see L</Deprecations>. |
848 | |
849 | =item C<Symbol> |
850 | |
851 | Upgraded from version 1.06 to 1.07. |
852 | |
853 | =item C<Sys::Syslog> |
854 | |
855 | Upgraded from version 0.22 to 0.27. |
856 | |
857 | =item C<Term::ANSIColor> |
858 | |
ad1d1c50 |
859 | Upgraded from version 1.12 to 2.01. |
5a00ee6a |
860 | |
861 | =item C<Term::ReadLine> |
862 | |
863 | Upgraded from version 1.03 to 1.04. |
864 | |
865 | =item C<Term::UI> |
866 | |
867 | Upgraded from version 0.18 to 0.20. |
868 | |
869 | =item C<Test::Harness> |
870 | |
871 | Upgraded from version 2.64 to 3.17. |
872 | |
873 | Note that one side-effect of the 2.x to 3.x upgrade is that the |
874 | experimental C<Test::Harness::Straps> module (and its supporting |
875 | C<Assert>, C<Iterator>, C<Point> and C<Results> modules) have been |
876 | removed. If you still need this, then they are available in the |
877 | (unmaintained) C<Test-Harness-Straps> distribution on CPAN. |
878 | |
879 | =item C<Test::Simple> |
880 | |
881 | Upgraded from version 0.72 to 0.92. |
882 | |
883 | =item C<Text::ParseWords> |
884 | |
885 | Upgraded from version 3.26 to 3.27. |
886 | |
887 | =item C<Text::Tabs> |
888 | |
889 | Upgraded from version 2007.1117 to 2009.0305. |
890 | |
891 | =item C<Text::Wrap> |
892 | |
893 | Upgraded from version 2006.1117 to 2009.0305. |
894 | |
895 | =item C<Thread::Queue> |
896 | |
897 | Upgraded from version 2.00 to 2.11. |
898 | |
899 | =item C<Thread::Semaphore> |
900 | |
901 | Upgraded from version 2.01 to 2.09. |
902 | |
903 | =item C<threads> |
904 | |
ad1d1c50 |
905 | Upgraded from version 1.67 to 1.73. |
5a00ee6a |
906 | |
907 | =item C<threads::shared> |
908 | |
909 | Upgraded from version 1.14 to 1.29. |
910 | |
911 | =item C<Tie::RefHash> |
912 | |
913 | Upgraded from version 1.37 to 1.38. |
914 | |
915 | =item C<Tie::StdHandle> |
916 | |
917 | This has documentation changes, and has been assigned a version for the |
918 | first time: version 4.2. |
919 | |
920 | =item C<Time::HiRes> |
921 | |
922 | Upgraded from version 1.9711 to 1.9719. |
923 | |
924 | =item C<Time::Local> |
925 | |
926 | Upgraded from version 1.18 to 1.1901. |
927 | |
928 | =item C<Time::Piece> |
929 | |
930 | Upgraded from version 1.12 to 1.15. |
931 | |
932 | =item C<Unicode::Normalize> |
933 | |
934 | Upgraded from version 1.02 to 1.03. |
935 | |
936 | =item C<Unicode::UCD> |
937 | |
938 | Upgraded from version 0.25 to 0.27. |
939 | |
940 | C<charinfo()> now works on Unified CJK code points added to later versions |
941 | of Unicode. |
942 | |
943 | C<casefold()> has new fields returned to provide both a simpler interface |
944 | and previously missing information. The old fields are retained for |
945 | backwards compatibility. Information about Turkic-specific code points is |
946 | now returned. |
947 | |
948 | The documentation has been corrected and expanded. |
949 | |
950 | =item C<UNIVERSAL> |
951 | |
952 | Upgraded from version 1.04 to 1.05. |
953 | |
ad1d1c50 |
954 | UNIVERSAL->import() is now deprecated. |
955 | |
956 | |
5a00ee6a |
957 | =item C<Win32> |
958 | |
959 | Upgraded from version 0.34 to 0.39. |
960 | |
961 | =item C<Win32API::File> |
962 | |
963 | Upgraded from version 0.1001_01 to 0.1101. |
964 | |
965 | =item C<XSLoader> |
966 | |
967 | Upgraded from version 0.08 to 0.10. |
968 | |
969 | =back |
970 | |
971 | =head1 Utility Changes |
972 | |
973 | =over 4 |
974 | |
975 | =item F<h2ph> |
976 | |
977 | Now looks in C<include-fixed> too, which is a recent addition to gcc's |
978 | search path. |
979 | |
980 | =item F<h2xs> |
981 | |
982 | No longer incorrectly treats enum values like macros (Daniel Burr). |
983 | |
984 | Now handles C++ style constants (C<//>) properly in enums. (A patch from |
985 | Rainer Weikusat was used; Daniel Burr also proposed a similar fix). |
986 | |
987 | =item F<perl5db.pl> |
988 | |
989 | C<LVALUE> subroutines now work under the debugger. |
990 | |
991 | The debugger now correctly handles proxy constant subroutines, and |
992 | subroutine stubs. |
993 | |
ad1d1c50 |
994 | |
995 | =item F<perlbug> |
996 | |
997 | Perlbug now uses %Module::CoreList::bug_tracker to print out upstream bug tracker URLs. |
998 | |
999 | Where the user names a module that their bug report is about, and we know the |
1000 | URL for its upstream bug tracker, provide a message to the user explaining |
1001 | that the core copies the CPAN version directly, and provide the URL for |
1002 | reporting the bug directly to upstream. |
1003 | |
5a00ee6a |
1004 | =item F<perlthanks> |
1005 | |
3141b5e1 |
1006 | Perl 5.11.0 added a new utility F<perlthanks>, which is a variant of |
5a00ee6a |
1007 | F<perlbug>, but for sending non-bug-reports to the authors and maintainers |
1008 | of Perl. Getting nothing but bug reports can become a bit demoralising: |
1009 | we'll see if this changes things. |
1010 | |
1011 | =back |
1012 | |
1013 | =head1 New Documentation |
1014 | |
1015 | =over 4 |
1016 | |
1017 | =item L<perlhaiku> |
1018 | |
1019 | This contains instructions on how to build perl for the Haiku platform. |
1020 | |
1021 | =item L<perlmroapi> |
1022 | |
1023 | This describes the new interface for pluggable Method Resolution Orders. |
1024 | |
1025 | =item L<perlperf> |
1026 | |
1027 | This document, by Richard Foley, provides an introduction to the use of |
1028 | performance and optimization techniques which can be used with particular |
1029 | reference to perl programs. |
1030 | |
1031 | =item L<perlrepository> |
1032 | |
1033 | This describes how to access the perl source using the I<git> version |
1034 | control system. |
1035 | |
1036 | =item L<perlthanks> |
1037 | |
1038 | This describes the new F<perlthanks> utility. |
1039 | |
1040 | =back |
1041 | |
1042 | =head1 Changes to Existing Documentation |
1043 | |
1044 | The various large C<Changes*> files (which listed every change made to perl |
1045 | over the last 18 years) have been removed, and replaced by a small file, |
1046 | also called C<Changes>, which just explains how that same information may |
1047 | be extracted from the git version control system. |
1048 | |
1049 | The file F<Porting/patching.pod> has been deleted, as it mainly described |
1050 | interacting with the old Perforce-based repository, which is now obsolete. |
1051 | Information still relevant has been moved to L<perlrepository>. |
1052 | |
1053 | L<perlapi>, L<perlintern>, L<perlmodlib> and L<perltoc> are now all |
1054 | generated at build time, rather than being shipped as part of the release. |
1055 | |
ad1d1c50 |
1056 | =head2 Documented -X overloading. |
1057 | |
1058 | =head2 Documented that when() treats specially most of the filetest operators |
1059 | |
1060 | =head2 Documented that DESTROY is subject to AUTOLOAD, and the related optimisations. |
1061 | |
1062 | =head2 Documented when as a syntax modifier |
1063 | |
1064 | =head2 Eliminated "Old Perl threads tutorial", which describes 5005 threads. |
1065 | |
1066 | pod/perlthrtut.pod is the same material reworked for ithreads. |
1067 | |
1068 | =head2 Removed a link to the attrs pragma, which has now been removed. |
1069 | |
1070 | =head2 update PERL_MEM_LOG in perlhack.pod |
1071 | |
1072 | =head2 Correct previous documentation: v-strings are not deprecated |
1073 | |
1074 | With version objects, we need them to use MODULE VERSION syntax. This |
1075 | patch removes the deprecation note. |
1076 | |
1077 | |
5a00ee6a |
1078 | =head1 Performance Enhancements |
1079 | |
1080 | =over 4 |
1081 | |
1082 | =item * |
1083 | |
1084 | A new internal cache means that C<isa()> will often be faster. |
1085 | |
1086 | =item * |
1087 | |
6f54462f |
1088 | The implementation of C<C3> Method Resolution Order has been optimised - |
1089 | linearisation for classes with single inheritance is 40% faster. Performance |
1090 | for multiple inheritance is unchanged. |
1091 | |
1092 | =item * |
1093 | |
5a00ee6a |
1094 | Under C<use locale>, the locale-relevant information is now cached on |
1095 | read-only values, such as the list returned by C<keys %hash>. This makes |
1096 | operations such as C<sort keys %hash> in the scope of C<use locale> much |
1097 | faster. |
1098 | |
1099 | =item * |
1100 | |
1101 | Empty C<DESTROY> methods are no longer called. |
1102 | |
ad1d1c50 |
1103 | =item * |
1104 | |
1105 | Faster sv_utf8_upgrade() |
1106 | |
1107 | =item * |
1108 | |
1109 | Speed up keys() on empty hash |
1110 | |
5a00ee6a |
1111 | =back |
1112 | |
1113 | =head1 Installation and Configuration Improvements |
1114 | |
1115 | =head2 F<ext/> reorganisation |
1116 | |
1117 | The layout of directories in F<ext> has been revised. Specifically, all |
1118 | extensions are now flat, and at the top level, with C</> in pathnames |
1119 | replaced by C<->, so that F<ext/Data/Dumper/> is now F<ext/Data-Dumper/>, |
1120 | etc. The names of the extensions as specified to F<Configure>, and as |
1121 | reported by C<%Config::Config> under the keys C<dynamic_ext>, |
1122 | C<known_extensions>, C<nonxs_ext> and C<static_ext> have not changed, and |
1123 | still use C</>. Hence this change will not have any affect once perl is |
1124 | installed. However, C<Attribute::Handlers>, C<Safe> and C<mro> have now |
1125 | become extensions in their own right, so if you run F<Configure> with |
1126 | options to specify an exact list of extensions to build, you will need to |
1127 | change it to account for this. |
1128 | |
3141b5e1 |
1129 | For 5.11.1, it is planned that many dual-life modules will have been moved |
5a00ee6a |
1130 | from F<lib> to F<ext>; again this will have no effect on an installed |
1131 | perl, but will matter if you invoke F<Configure> with a pre-canned list of |
1132 | extensions to build. |
1133 | |
1134 | =head2 Configuration improvements |
1135 | |
1136 | If C<vendorlib> and C<vendorarch> are the same, then they are only added to |
1137 | C<@INC> once. |
1138 | |
1139 | C<$Config{usedevel}> and the C-level C<PERL_USE_DEVEL> are now defined if |
1140 | perl is built with C<-Dusedevel>. |
1141 | |
1142 | F<Configure> will enable use of C<-fstack-protector>, to provide protection |
1143 | against stack-smashing attacks, if the compiler supports it. |
1144 | |
1145 | F<Configure> will now determine the correct prototypes for re-entrant |
1146 | functions, and for C<gconvert>, if you are using a C++ compiler rather |
1147 | than a C compiler. |
1148 | |
1149 | On Unix, if you build from a tree containing a git repository, the |
1150 | configuration process will note the commit hash you have checked out, for |
1151 | display in the output of C<perl -v> and C<perl -V>. Unpushed local commits |
1152 | are automatically added to the list of local patches displayed by |
1153 | C<perl -V>. |
1154 | |
1155 | =head2 Compilation improvements |
1156 | |
1157 | As part of the flattening of F<ext>, all extensions on all platforms are |
1158 | built by F<make_ext.pl>. This replaces the Unix-specific |
1159 | F<ext/util/make_ext>, VMS-specific F<make_ext.com> and Win32-specific |
1160 | F<win32/buildext.pl>. |
1161 | |
1162 | =head2 Platform Specific Changes |
1163 | |
1164 | =over 4 |
1165 | |
1166 | =item AIX |
1167 | |
1168 | Removed F<libbsd> for AIX 5L and 6.1. Only flock() was used from F<libbsd>. |
1169 | |
1170 | Removed F<libgdbm> for AIX 5L and 6.1. The F<libgdbm> is delivered as an |
1171 | optional package with the AIX Toolbox. Unfortunately the 64 bit version |
1172 | is broken. |
1173 | |
1174 | Hints changes mean that AIX 4.2 should work again. |
1175 | |
1176 | =item Cygwin |
1177 | |
1178 | On Cygwin we now strip the last number from the DLL. This has been the |
1179 | behaviour in the cygwin.com build for years. The hints files have been |
1180 | updated. |
1181 | |
1182 | =item FreeBSD |
1183 | |
1184 | The hints files now identify the correct threading libraries on FreeBSD 7 |
1185 | and later. |
1186 | |
1187 | =item Irix |
1188 | |
1189 | We now work around a bizarre preprocessor bug in the Irix 6.5 compiler: |
1190 | C<cc -E -> unfortunately goes into K&R mode, but C<cc -E file.c> doesn't. |
1191 | |
1192 | =item Haiku |
1193 | |
1194 | Patches from the Haiku maintainers have been merged in. Perl should now |
1195 | build on Haiku. |
1196 | |
1197 | =item MirOS BSD |
1198 | |
1199 | Perl should now build on MirOS BSD. |
1200 | |
1201 | =item NetBSD |
1202 | |
1203 | Hints now supports versions 5.*. |
1204 | |
1205 | =item Stratus VOS |
1206 | |
1207 | Various changes from Stratus have been merged in. |
1208 | |
1209 | =item Symbian |
1210 | |
1211 | There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK. |
1212 | |
1213 | =item Win32 |
1214 | |
1215 | Improved message window handling means that C<alarm> and C<kill> messages |
1216 | will no longer be dropped under race conditions. |
1217 | |
1218 | =item VMS |
1219 | |
1220 | Reads from the in-memory temporary files of C<PerlIO::scalar> used to fail |
1221 | if C<$/> was set to a numeric reference (to indicate record-style reads). |
1222 | This is now fixed. |
1223 | |
1224 | VMS now supports C<getgrgid>. |
1225 | |
1226 | Many improvements and cleanups have been made to the VMS file name handling |
1227 | and conversion code. |
1228 | |
1229 | Enabling the C<PERL_VMS_POSIX_EXIT> logical name now encodes a POSIX exit |
1230 | status in a VMS condition value for better interaction with GNV's bash |
1231 | shell and other utilities that depend on POSIX exit values. See |
1232 | L<perlvms/"$?"> for details. |
1233 | |
ad1d1c50 |
1234 | File::Copy now detects Unix compatibility mode on VMS. |
1235 | |
5a00ee6a |
1236 | =back |
1237 | |
1238 | =head1 Selected Bug Fixes |
1239 | |
1240 | =over 4 |
1241 | |
1242 | =item |
1243 | |
1244 | =item C<-I> on shebang line now adds directories in front of @INC. |
1245 | as documented, and as does C<-I> when specified on the command-line. |
1246 | (Renée Bäcker) |
1247 | |
1248 | =item |
1249 | |
1250 | * C<kill> is now fatal when called on non-numeric process identifiers. |
1251 | Previously, an 'undef' process identifier would be interpreted as a request to |
1252 | kill process "0", which would terminate the current process group on POSIX |
1253 | systems. Since process identifiers are always integers, killing a non-numeric |
1254 | process is now fatal. |
1255 | |
1256 | =item * |
1257 | |
1258 | 5.10.0 inadvertently disabled an optimisation, which caused a measurable |
1259 | performance drop in list assignment, such as is often used to assign |
1260 | function parameters from C<@_>. The optimisation has been re-instated, and |
1261 | the performance regression fixed. |
1262 | |
1263 | =item * |
1264 | |
1265 | Fixed memory leak on C<while (1) { map 1, 1 }> [RT #53038]. |
1266 | |
1267 | =item * |
1268 | |
1269 | Some potential coredumps in PerlIO fixed [RT #57322,54828]. |
1270 | |
1271 | =item * |
1272 | |
1273 | The debugger now works with lvalue subroutines. |
1274 | |
1275 | =item * |
1276 | |
1277 | The debugger's C<m> command was broken on modules that defined constants |
1278 | [RT #61222]. |
1279 | |
1280 | =item * |
1281 | |
1282 | C<crypt()> and string complement could return tainted values for untainted |
1283 | arguments [RT #59998]. |
1284 | |
1285 | =item * |
1286 | |
1287 | The C<-i.suffix> command-line switch now recreates the file using |
1288 | restricted permissions, before changing its mode to match the original |
1289 | file. This eliminates a potential race condition [RT #60904]. |
1290 | |
1291 | =item * |
1292 | |
1293 | On some UNIX systems, the value in C<$?> would not have the top bit set |
1294 | (C<$? & 128>) even if the child core dumped. |
1295 | |
1296 | =item * |
1297 | |
1298 | Under some circumstances, $^R could incorrectly become undefined |
1299 | [RT #57042]. |
1300 | |
1301 | =item * |
1302 | |
1303 | (XS) In various hash functions, passing a pre-computed hash to when the |
1304 | key is UTF-8 might result in an incorrect lookup. |
1305 | |
1306 | =item * |
1307 | |
1308 | (XS) Including F<XSUB.h> before F<perl.h> gave a compile-time error |
1309 | [RT #57176]. |
1310 | |
1311 | =item * |
1312 | |
1313 | C<< $object->isa('Foo') >> would report false if the package C<Foo> didn't |
1314 | exist, even if the object's C<@ISA> contained C<Foo>. |
1315 | |
1316 | =item * |
1317 | |
1318 | Various bugs in the new-to 5.10.0 mro code, triggered by manipulating |
1319 | C<@ISA>, have been found and fixed. |
1320 | |
1321 | =item * |
1322 | |
1323 | Bitwise operations on references could crash the interpreter, e.g. |
1324 | C<$x=\$y; $x |= "foo"> [RT #54956]. |
1325 | |
1326 | =item * |
1327 | |
1328 | Patterns including alternation might be sensitive to the internal UTF-8 |
1329 | representation, e.g. |
1330 | |
1331 | my $byte = chr(192); |
1332 | my $utf8 = chr(192); utf8::upgrade($utf8); |
1333 | $utf8 =~ /$byte|X}/i; # failed in 5.10.0 |
1334 | |
1335 | =item * |
1336 | |
1337 | Within UTF8-encoded Perl source files (i.e. where C<use utf8> is in |
1338 | effect), double-quoted literal strings could be corrupted where a C<\xNN>, |
1339 | C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value |
1340 | greater than 255 [RT #59908]. |
1341 | |
1342 | =item * |
1343 | |
1344 | C<B::Deparse> failed to correctly deparse various constructs: |
1345 | C<readpipe STRING> [RT #62428], C<CORE::require(STRING)> [RT #62488], |
1346 | C<sub foo(_)> [RT #62484]. |
1347 | |
1348 | =item * |
1349 | |
1350 | Using C<setpgrp()> with no arguments could corrupt the perl stack. |
1351 | |
1352 | =item * |
1353 | |
1354 | The block form of C<eval> is now specifically trappable by C<Safe> and |
1355 | C<ops>. Previously it was erroneously treated like string C<eval>. |
1356 | |
1357 | =item * |
1358 | |
1359 | In 5.10.0, the two characters C<[~> were sometimes parsed as the smart |
1360 | match operator (C<~~>) [RT #63854]. |
1361 | |
1362 | =item * |
1363 | |
1364 | In 5.10.0, the C<*> quantifier in patterns was sometimes treated as |
1365 | C<{0,32767}> [RT #60034, #60464]. For example, this match would fail: |
1366 | |
1367 | ("ab" x 32768) =~ /^(ab)*$/ |
1368 | |
1369 | =item * |
1370 | |
1371 | C<shmget> was limited to a 32 bit segment size on a 64 bit OS [RT #63924]. |
1372 | |
1373 | =item * |
1374 | |
1375 | Using C<next> or C<last> to exit a C<given> block no longer produces a |
1376 | spurious warning like the following: |
1377 | |
1378 | Exiting given via last at foo.pl line 123 |
1379 | |
1380 | =item * |
1381 | |
1382 | On Windows, C<'.\foo'> and C<'..\foo'> were treated differently than |
1383 | C<'./foo'> and C<'../foo'> by C<do> and C<require> [RT #63492]. |
1384 | |
1385 | =item * |
1386 | |
1387 | Assigning a format to a glob could corrupt the format; e.g.: |
1388 | |
1389 | *bar=*foo{FORMAT}; # foo format now bad |
1390 | |
1391 | =item * |
1392 | |
1393 | Attempting to coerce a typeglob to a string or number could cause an |
1394 | assertion failure. The correct error message is now generated, |
1395 | C<Can't coerce GLOB to I<$type>>. |
1396 | |
1397 | =item * |
1398 | |
1399 | Under C<use filetest 'access'>, C<-x> was using the wrong access mode. This |
1400 | has been fixed [RT #49003]. |
1401 | |
1402 | =item * |
1403 | |
1404 | C<length> on a tied scalar that returned a Unicode value would not be |
1405 | correct the first time. This has been fixed. |
1406 | |
1407 | =item * |
1408 | |
1409 | Using an array C<tie> inside in array C<tie> could SEGV. This has been |
1410 | fixed. [RT #51636] |
1411 | |
1412 | =item * |
1413 | |
1414 | A race condition inside C<PerlIOStdio_close()> has been identified and |
1415 | fixed. This used to cause various threading issues, including SEGVs. |
1416 | |
1417 | =item * |
1418 | |
1419 | In C<unpack>, the use of C<()> groups in scalar context was internally |
1420 | placing a list on the interpreter's stack, which manifested in various |
1421 | ways, including SEGVs. This is now fixed [RT #50256]. |
1422 | |
1423 | =item * |
1424 | |
1425 | Magic was called twice in C<substr>, C<\&$x>, C<tie $x, $m> and C<chop>. |
1426 | These have all been fixed. |
1427 | |
1428 | =item * |
1429 | |
1430 | A 5.10.0 optimisation to clear the temporary stack within the implicit |
1431 | loop of C<s///ge> has been reverted, as it turned out to be the cause of |
1432 | obscure bugs in seemingly unrelated parts of the interpreter [commit |
1433 | ef0d4e17921ee3de]. |
1434 | |
1435 | =item * |
1436 | |
1437 | The line numbers for warnings inside C<elsif> are now correct. |
1438 | |
1439 | =item * |
1440 | |
1441 | The C<..> operator now works correctly with ranges whose ends are at or |
1442 | close to the values of the smallest and largest integers. |
1443 | |
1444 | =item * |
1445 | |
1446 | C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms. |
1447 | This has been fixed [RT #54828]. |
1448 | |
1449 | =item * |
1450 | |
1451 | An off-by-one error meant that C<index $str, ...> was effectively being |
1452 | executed as C<index "$str\0", ...>. This has been fixed [RT #53746]. |
1453 | |
1454 | =item * |
1455 | |
1456 | Various leaks associated with named captures in regexes have been fixed |
1457 | [RT #57024]. |
1458 | |
1459 | =item * |
1460 | |
1461 | A weak reference to a hash would leak. This was affecting C<DBI> |
1462 | [RT #56908]. |
1463 | |
1464 | =item * |
1465 | |
1466 | Using (?|) in a regex could cause a segfault [RT #59734]. |
1467 | |
1468 | =item * |
1469 | |
1470 | Use of a UTF-8 C<tr//> within a closure could cause a segfault [RT #61520]. |
1471 | |
1472 | =item * |
1473 | |
1474 | Calling C<sv_chop()> or otherwise upgrading an SV could result in an |
1475 | unaligned 64-bit access on the SPARC architecture [RT #60574]. |
1476 | |
1477 | =item * |
1478 | |
1479 | In the 5.10.0 release, C<inc_version_list> would incorrectly list |
1480 | C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order |
1481 | [RT #67628]. |
1482 | |
1483 | =item * |
1484 | |
1485 | In 5.10.0, C<pack "a*", $tainted_value> returned a non-tainted value |
1486 | [RT #52552]. |
1487 | |
1488 | =item * |
1489 | |
1490 | In 5.10.0, C<printf> and C<sprintf> could produce the fatal error |
1491 | C<panic: utf8_mg_pos_cache_update> when printing UTF-8 strings |
1492 | [RT #62666]. |
1493 | |
1494 | =item * |
1495 | |
1496 | In the 5.10.0 release, a dynamically created C<AUTOLOAD> method might be |
1497 | missed (method cache issue) [RT #60220,60232]. |
1498 | |
1499 | =item * |
1500 | |
1501 | In the 5.10.0 release, a combination of C<use feature> and C<//ee> could |
1502 | cause a memory leak [RT #63110]. |
1503 | |
1504 | =item * |
1505 | |
1506 | C<-C> on the shebang (C<#!>) line is once more permitted if it is also |
1507 | specified on the command line. C<-C> on the shebang line used to be a |
1508 | silent no-op I<if> it was not also on the command line, so perl 5.10.0 |
1509 | disallowed it, which broke some scripts. Now perl checks whether it is |
1510 | also on the command line and only dies if it is not [RT #67880]. |
1511 | |
1512 | =item * |
1513 | |
1514 | In 5.10.0, certain types of re-entrant regular expression could crash, |
1515 | or cause the following assertion failure [RT #60508]: |
1516 | |
1517 | Assertion rx->sublen >= (s - rx->subbeg) + i failed |
1518 | |
5a00ee6a |
1519 | =back |
1520 | |
1521 | =head1 New or Changed Diagnostics |
1522 | |
1523 | =over 4 |
1524 | |
1525 | =item C<panic: sv_chop %s> |
1526 | |
1527 | This new fatal error occurs when the C routine C<Perl_sv_chop()> was |
1528 | passed a position that is not within the scalar's string buffer. This |
1529 | could be caused by buggy XS code, and at this point recovery is not |
1530 | possible. |
1531 | |
1532 | =item C<Can't locate package %s for the parents of %s> |
1533 | |
1534 | This warning has been removed. In general, it only got produced in |
1535 | conjunction with other warnings, and removing it allowed an ISA lookup |
1536 | optimisation to be added. |
1537 | |
1538 | =item C<v-string in use/require is non-portable> |
1539 | |
1540 | This warning has been removed. |
1541 | |
1542 | =item C<Deep recursion on subroutine "%s"> |
1543 | |
1544 | It is now possible to change the depth threshold for this warning from the |
1545 | default of 100, by recompiling the F<perl> binary, setting the C |
1546 | pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value. |
1547 | |
1548 | =back |
1549 | |
1550 | =head1 Changed Internals |
1551 | |
1552 | =over 4 |
1553 | |
1554 | =item * |
1555 | |
1556 | The J.R.R. Tolkien quotes at the head of C source file have been checked and |
1557 | proper citations added, thanks to a patch from Tom Christiansen. |
1558 | |
1559 | =item * |
1560 | |
1561 | C<vcroak()> now accepts a null first argument. In addition, a full audit |
1562 | was made of the "not NULL" compiler annotations, and those for several |
1563 | other internal functions were corrected. |
1564 | |
1565 | =item * |
1566 | |
1567 | New macros C<dSAVEDERRNO>, C<dSAVE_ERRNO>, C<SAVE_ERRNO>, C<RESTORE_ERRNO> |
1568 | have been added to formalise the temporary saving of the C<errno> |
1569 | variable. |
1570 | |
1571 | =item * |
1572 | |
1573 | The function C<Perl_sv_insert_flags> has been added to augment |
1574 | C<Perl_sv_insert>. |
1575 | |
1576 | =item * |
1577 | |
1578 | The function C<Perl_newSV_type(type)> has been added, equivalent to |
1579 | C<Perl_newSV()> followed by C<Perl_sv_upgrade(type)>. |
1580 | |
1581 | =item * |
1582 | |
1583 | The function C<Perl_newSVpvn_flags()> has been added, equivalent to |
1584 | C<Perl_newSVpvn()> and then performing the action relevant to the flag. |
1585 | |
1586 | Two flag bits are currently supported. |
1587 | |
1588 | =over 4 |
1589 | |
1590 | =item C<SVf_UTF8> |
1591 | |
1592 | This will call C<SvUTF8_on()> for you. (Note that this does not convert an |
1593 | sequence of ISO 8859-1 characters to UTF-8). A wrapper, C<newSVpvn_utf8()> |
1594 | is available for this. |
1595 | |
1596 | =item C<SVs_TEMP> |
1597 | |
1598 | Call C<sv_2mortal()> on the new SV. |
1599 | |
1600 | =back |
1601 | |
1602 | There is also a wrapper that takes constant strings, C<newSVpvs_flags()>. |
1603 | |
1604 | =item * |
1605 | |
1606 | The function C<Perl_croak_xs_usage> has been added as a wrapper to |
1607 | C<Perl_croak>. |
1608 | |
1609 | =item * |
1610 | |
1611 | The functions C<PerlIO_find_layer> and C<PerlIO_list_alloc> are now |
1612 | exported. |
1613 | |
1614 | =item * |
1615 | |
1616 | C<PL_na> has been exterminated from the core code, replaced by local STRLEN |
1617 | temporaries, or C<*_nolen()> calls. Either approach is faster than C<PL_na>, |
1618 | which is a pointer deference into the interpreter structure under ithreads, |
1619 | and a global variable otherwise. |
1620 | |
1621 | =item * |
1622 | |
1623 | C<Perl_mg_free()> used to leave freed memory accessible via SvMAGIC() on |
1624 | the scalar. It now updates the linked list to remove each piece of magic |
1625 | as it is freed. |
1626 | |
1627 | =item * |
1628 | |
1629 | Under ithreads, the regex in C<PL_reg_curpm> is now reference counted. This |
1630 | eliminates a lot of hackish workarounds to cope with it not being reference |
1631 | counted. |
1632 | |
1633 | =item * |
1634 | |
1635 | C<Perl_mg_magical()> would sometimes incorrectly turn on C<SvRMAGICAL()>. |
1636 | This has been fixed. |
1637 | |
1638 | =item * |
1639 | |
1640 | The I<public> IV and NV flags are now not set if the string value has |
1641 | trailing "garbage". This behaviour is consistent with not setting the |
1642 | public IV or NV flags if the value is out of range for the type. |
1643 | |
1644 | =item * |
1645 | |
1646 | SV allocation tracing has been added to the diagnostics enabled by C<-Dm>. |
1647 | The tracing can alternatively output via the C<PERL_MEM_LOG> mechanism, if |
1648 | that was enabled when the F<perl> binary was compiled. |
1649 | |
1650 | =item * |
1651 | |
1652 | Uses of C<Nullav>, C<Nullcv>, C<Nullhv>, C<Nullop>, C<Nullsv> etc have been |
1653 | replaced by C<NULL> in the core code, and non-dual-life modules, as C<NULL> |
1654 | is clearer to those unfamiliar with the core code. |
1655 | |
1656 | =item * |
1657 | |
1658 | A macro C<MUTABLE_PTR(p)> has been added, which on (non-pedantic) gcc will |
1659 | not cast away C<const>, returning a C<void *>. Macros C<MUTABLE_SV(av)>, |
1660 | C<MUTABLE_SV(cv)> etc build on this, casting to C<AV *> etc without |
1661 | casting away C<const>. This allows proper compile-time auditing of |
1662 | C<const> correctness in the core, and helped picked up some errors (now |
1663 | fixed). |
1664 | |
1665 | =item * |
1666 | |
1667 | Macros C<mPUSHs()> and C<mXPUSHs()> have been added, for pushing SVs on the |
1668 | stack and mortalizing them. |
1669 | |
1670 | =item * |
1671 | |
1672 | Use of the private structure C<mro_meta> has changed slightly. Nothing |
1673 | outside the core should be accessing this directly anyway. |
1674 | |
1675 | =item * |
1676 | |
1677 | A new tool, C<Porting/expand-macro.pl> has been added, that allows you |
1678 | to view how a C preprocessor macro would be expanded when compiled. |
1679 | This is handy when trying to decode the macro hell that is the perl |
1680 | guts. |
1681 | |
1682 | =back |
1683 | |
1684 | =head1 New Tests |
1685 | |
1686 | Many modules updated from CPAN incorporate new tests. |
1687 | |
1688 | Several tests that have the potential to hang forever if they fail now |
1689 | incorporate a "watchdog" functionality that will kill them after a timeout, |
1690 | which helps ensure that C<make test> and C<make test_harness> run to |
1691 | completion automatically. (Jerry Hedden). |
1692 | |
1693 | Some core-specific tests have been added: |
1694 | |
1695 | =over 4 |
1696 | |
1697 | =item t/comp/retainedlines.t |
1698 | |
1699 | Check that the debugger can retain source lines from C<eval>. |
1700 | |
1701 | =item t/io/perlio_fail.t |
1702 | |
1703 | Check that bad layers fail. |
1704 | |
1705 | =item t/io/perlio_leaks.t |
1706 | |
1707 | Check that PerlIO layers are not leaking. |
1708 | |
1709 | =item t/io/perlio_open.t |
1710 | |
1711 | Check that certain special forms of open work. |
1712 | |
1713 | =item t/io/perlio.t |
1714 | |
1715 | General PerlIO tests. |
1716 | |
1717 | =item t/io/pvbm.t |
1718 | |
1719 | Check that there is no unexpected interaction between the internal types |
1720 | C<PVBM> and C<PVGV>. |
1721 | |
1722 | =item t/mro/package_aliases.t |
1723 | |
1724 | Check that mro works properly in the presence of aliased packages. |
1725 | |
1726 | =item t/op/dbm.t |
1727 | |
1728 | Tests for C<dbmopen> and C<dbmclose>. |
1729 | |
1730 | =item t/op/index_thr.t |
1731 | |
1732 | Tests for the interaction of C<index> and threads. |
1733 | |
1734 | =item t/op/pat_thr.t |
1735 | |
1736 | Tests for the interaction of esoteric patterns and threads. |
1737 | |
1738 | =item t/op/qr_gc.t |
1739 | |
1740 | Test that C<qr> doesn't leak. |
1741 | |
1742 | =item t/op/reg_email_thr.t |
1743 | |
1744 | Tests for the interaction of regex recursion and threads. |
1745 | |
1746 | =item t/op/regexp_qr_embed_thr.t |
1747 | |
1748 | Tests for the interaction of patterns with embedded C<qr//> and threads. |
1749 | |
1750 | =item t/op/regexp_unicode_prop.t |
1751 | |
1752 | Tests for Unicode properties in regular expressions. |
1753 | |
1754 | =item t/op/regexp_unicode_prop_thr.t |
1755 | |
1756 | Tests for the interaction of Unicode properties and threads. |
1757 | |
1758 | =item t/op/reg_nc_tie.t |
1759 | |
1760 | Test the tied methods of C<Tie::Hash::NamedCapture>. |
1761 | |
1762 | =item t/op/reg_posixcc.t |
1763 | |
1764 | Check that POSIX character classes behave consistently. |
1765 | |
1766 | =item t/op/re.t |
1767 | |
1768 | Check that exportable C<re> functions in F<universal.c> work. |
1769 | |
1770 | =item t/op/setpgrpstack.t |
1771 | |
1772 | Check that C<setpgrp> works. |
1773 | |
1774 | =item t/op/substr_thr.t |
1775 | |
1776 | Tests for the interaction of C<substr> and threads. |
1777 | |
1778 | =item t/op/upgrade.t |
1779 | |
1780 | Check that upgrading and assigning scalars works. |
1781 | |
1782 | =item t/uni/lex_utf8.t |
1783 | |
1784 | Check that Unicode in the lexer works. |
1785 | |
1786 | =item t/uni/tie.t |
1787 | |
1788 | Check that Unicode and C<tie> work. |
1789 | |
1790 | =back |
1791 | |
1792 | =head1 Known Problems |
1793 | |
1794 | This is a list of some significant unfixed bugs, which are regressions |
1795 | from either 5.10.0 or 5.8.x. |
1796 | |
1797 | =over 4 |
1798 | |
1799 | =item * |
1800 | |
1801 | C<List::Util::first> misbehaves in the presence of a lexical C<$_> |
1802 | (typically introduced by C<my $_> or implicitly by C<given>). The variable |
1803 | which gets set for each iteration is the package variable C<$_>, not the |
1804 | lexical C<$_> [RT #67694]. |
1805 | |
1806 | A similar issue may occur in other modules that provide functions which |
1807 | take a block as their first argument, like |
1808 | |
1809 | foo { ... $_ ...} list |
1810 | |
1811 | =item * |
1812 | |
1813 | The C<charnames> pragma may generate a run-time error when a regex is |
1814 | interpolated [RT #56444]: |
1815 | |
1816 | use charnames ':full'; |
1817 | my $r1 = qr/\N{THAI CHARACTER SARA I}/; |
1818 | "foo" =~ $r1; # okay |
1819 | "foo" =~ /$r1+/; # runtime error |
1820 | |
1821 | A workaround is to generate the character outside of the regex: |
1822 | |
1823 | my $a = "\N{THAI CHARACTER SARA I}"; |
1824 | my $r1 = qr/$a/; |
1825 | |
1826 | =item * |
1827 | |
1828 | Some regexes may run much more slowly when run in a child thread compared |
1829 | with the thread the pattern was compiled into [RT #55600]. |
1830 | |
1831 | |
1832 | =back |
1833 | |
1834 | =head1 Deprecations |
1835 | |
1836 | The following items are now deprecated. |
1837 | |
1838 | =over 4 |
1839 | |
1840 | =item * |
1841 | |
1842 | C<Switch> is buggy and should be avoided. From perl 5.11.0 onwards, it is |
1843 | intended that any use of the core version of this module will emit a |
1844 | warning, and that the module will eventually be removed from the core |
1845 | (probably in perl 5.14.0). See L<perlsyn/"Switch statements"> for its |
1846 | replacement. |
1847 | |
1848 | =item * |
1849 | |
ad1d1c50 |
1850 | C<suidperl> has been removed. It used to provide a mechanism to |
5a00ee6a |
1851 | emulate setuid permission bits on systems that don't support it properly. |
1852 | |
ad1d1c50 |
1853 | =item * |
1854 | |
1855 | Deprecate assignment to $[ |
1856 | |
1857 | =item * |
1858 | |
1859 | Remove attrs, which has been deprecated since 1999/10/02. |
1860 | |
1861 | =item * |
1862 | |
1863 | Deprecate use of the attribute :locked on subroutines. |
1864 | |
1865 | =item * |
1866 | |
1867 | Deprecate using "locked" with the attributes pragma. |
1868 | |
1869 | =item * |
1870 | |
1871 | Deprecate using "unique" with the attributes pragma. |
1872 | |
1873 | =item * |
1874 | |
1875 | warn if ++ or -- are unable to change the value because it's beyond the limit of representation |
1876 | |
1877 | This uses a new warnings category: "imprecision". |
1878 | |
1879 | |
1880 | =item * |
1881 | |
1882 | Make lc/uc/lcfirst/ucfirst warn when passed undef. |
1883 | |
1884 | =item * |
1885 | |
1886 | Show constant in "Useless use of a constant in void context" |
1887 | |
1888 | =item * |
1889 | |
1890 | Make the new warning report undef constants as undef |
1891 | |
1892 | =item * |
1893 | |
1894 | Add a new warning, "Prototype after '%s'" |
1895 | |
1896 | =item * |
1897 | |
1898 | Tweak the "Illegal character in prototype" warning so it's more precise when reporting illegal characters after _ |
1899 | |
1900 | =item * |
1901 | |
1902 | Unintented interpolation of $\ in regex |
1903 | |
1904 | =item * |
1905 | |
1906 | Make overflow warnings in gmtime/localtime only occur when warnings are on |
1907 | |
1908 | =item * |
1909 | |
1910 | Improve mro merging error messages. |
1911 | |
1912 | They are now very similar to those produced by Algorithm::C3. |
1913 | |
1914 | =item * |
1915 | |
1916 | Amelioration of the error message "Unrecognized character %s in column %d" |
1917 | |
1918 | Changes the error message to "Unrecognized character %s; marked by <-- |
1919 | HERE after %s<-- HERE near column %d". This should make it a little |
1920 | simpler to spot and correct the suspicious character. |
1921 | |
1922 | =item * |
1923 | |
1924 | Explicitely point to $. when it causes an uninitialized warning for ranges in scalar context |
1925 | |
5a00ee6a |
1926 | =back |
1927 | |
1928 | =head1 Acknowledgements |
1929 | |
1930 | Some of the work in this release was funded by a TPF grant. |
1931 | |
1932 | Nicholas Clark officially retired from maintenance pumpking duty at the |
1933 | end of 2008; however in reality he has put much effort in since then to |
1934 | help get 5.10.1 into a fit state to be released, including writing a |
1935 | considerable chunk of this perldelta. |
1936 | |
1937 | Steffen Mueller and David Golden in particular helped getting CPAN modules |
1938 | polished and synchronised with their in-core equivalents. |
1939 | |
1940 | Craig Berry was tireless in getting maint to run under VMS, no matter how |
1941 | many times we broke it for him. |
1942 | |
1943 | The other core committers contributed most of the changes, and applied most |
1944 | of the patches sent in by the hundreds of contributors listed in F<AUTHORS>. |
7120b314 |
1945 | |
ad1d1c50 |
1946 | Much of the work of categorizing changes in this perldelta file was contributed |
1947 | by the following porters using changelogger.bestpractical.com: |
1948 | |
1949 | Nicholas Clark, leon, shawn, alexm, rjbs, rafl, Pedro Melo, brunorc, |
1950 | anonymous, ☄, Tom Hukins, anonymous, Jesse, dagolden, Moritz Onken, |
1951 | Mark Fowler, chorny, anonymous, tmtm |
1952 | |
1953 | |
5a00ee6a |
1954 | Finally, thanks to Larry Wall, without whom none of this would be |
1955 | necessary. |
7120b314 |
1956 | |
1957 | =head1 Reporting Bugs |
1958 | |
1959 | If you find what you think is a bug, you might check the articles |
1960 | recently posted to the comp.lang.perl.misc newsgroup and the perl |
5a00ee6a |
1961 | bug database at http://rt.perl.org/perlbug/ . There may also be |
7120b314 |
1962 | information at http://www.perl.org/ , the Perl Home Page. |
1963 | |
1964 | If you believe you have an unreported bug, please run the B<perlbug> |
1965 | program included with your release. Be sure to trim your bug down |
1966 | to a tiny but sufficient test case. Your bug report, along with the |
1967 | output of C<perl -V>, will be sent off to perlbug@perl.org to be |
1968 | analysed by the Perl porting team. |
1969 | |
49f8307e |
1970 | If the bug you are reporting has security implications, which make it |
1971 | inappropriate to send to a publicly archived mailing list, then please send |
1972 | it to perl5-security-report@perl.org. This points to a closed subscription |
1973 | unarchived mailing list, which includes all the core committers, who be able |
1974 | to help assess the impact of issues, figure out a resolution, and help |
1975 | co-ordinate the release of patches to mitigate or fix the problem across all |
5a00ee6a |
1976 | platforms on which Perl is supported. Please only use this address for |
1977 | security issues in the Perl core, not for modules independently |
1978 | distributed on CPAN. |
49f8307e |
1979 | |
7120b314 |
1980 | =head1 SEE ALSO |
1981 | |
5a00ee6a |
1982 | The F<Changes> file for an explanation of how to view exhaustive details |
1983 | on what changed. |
7120b314 |
1984 | |
1985 | The F<INSTALL> file for how to build Perl. |
1986 | |
1987 | The F<README> file for general stuff. |
1988 | |
1989 | The F<Artistic> and F<Copying> files for copyright information. |
1990 | |
1991 | =cut |
ad1d1c50 |
1992 | |
1993 | |
1994 | =head1 TODO |
1995 | |
1996 | The following changes are a filtered list of changes which weren't backported |
1997 | to 5.10.1. They were run through changelogger.bestpractical.com and triaged |
1998 | by a set of Perl 5 Porters. Changes to blead after 5945e41e have not yet |
1999 | been triaged or integrated. |
2000 | |
2001 | The following changes need to be |
2002 | |
2003 | 1) deleted if they don't merit inclusion |
2004 | |
2005 | OR |
2006 | |
2007 | 2) lightly copyedited and integrated into the perldelta above. Unfortunately, many of our |
2008 | commit messages are somewhat terse and require a bit more help to turn into something readable |
2009 | |
2010 | |
2011 | |
2012 | |
2013 | =head1 API |
2014 | |
2015 | =head2 Move the reg_stringify logic to Perl_sv_2pv_flags |
2016 | |
2017 | =head2 mg_copy ought to take an I32 |
2018 | |
2019 | =head2 Perl_store_cop_label() isn't meant to be part of the public API. |
2020 | |
2021 | =head2 Perl_gv_fetchmethod{,_autoload,_flags} are actually never* called with a non-NULL stash. |
2022 | So change the parameter to NN. |
2023 | |
2024 | |
2025 | =head2 Promote Perl_setdefout() to the public API. |
2026 | |
2027 | =head2 Add get_cvs() as a shortcut for STR_WITH_LEN() and Perl_get_cvn_flags() |
2028 | |
2029 | =head2 In Perl_newCONSTSUB(), sv should not be NULL. |
2030 | |
2031 | =head2 GvUNIQUE* have been defined as 0 since 2005/06/30 - high time to remove them. |
2032 | |
2033 | =head2 invert and rename PERL_MEM_LOG_STDERR to PERL_MEM_LOG_NOIMPL |
2034 | |
2035 | Most users who want PERL_MEM_LOG want the default implementation, |
2036 | give it to them. Users providing their own implementation can |
2037 | obtain current behavior by adding -DPERL_MEM_LOG_NOIMPL. |
2038 | Frankly, the average user probably wants _ENV by default too. |
2039 | |
2040 | =head2 simplify PERL_MEM_LOG |
2041 | |
2042 | This combines multiple environment variable reads into 1, |
2043 | where it looks for values like "2mst" |
2044 | -2 leading digits are atoi()d to get FD |
2045 | -m memory logging please |
2046 | -s sv logging also |
2047 | -t timestamp those please. |
2048 | |
2049 | Combining these reduces overhead such that it seemed |
2050 | worthwhile to drop all the ifdefs. TBD whether this works |
2051 | in the environment that drove the original tradeoffs. |
2052 | |
2053 | If it isnt enough, Id be tempted by a global static ptr, |
2054 | and on 1st use, is read, seen 0, a lock is taken, and getenvar |
2055 | run to populate it, unlocked, proceed. This would remove |
2056 | iterative overheads. |
2057 | |
2058 | =head2 Add a parameter "destructing" to Gv_AMupdate() |
2059 | |
2060 | This boolean parameter indicates if the function has been called |
2061 | to update the overload magic table while looking up the DESTROY |
2062 | method. In this case, it's probably best to avoid croaking if |
2063 | those tables could not be updated (for example due to a method |
2064 | that could not be loaded.) |
2065 | |
2066 | =head2 Modify the return value of Gv_AMupdate to indicate a compilation error |
2067 | |
2068 | This way we'll restore most of the performance on object desctruction |
2069 | lost by the previous commit |
2070 | |
2071 | |
2072 | =head2 local $SIG{FOO} = sub {...}; sets signal handler to SIG_DFL |
2073 | |
2074 | Re: [perl #60360] [PATCH] UPDATED: local $SIG{FOO} = sub {...}; sets signal handler to SIG_DFL |
2075 | Message-ID: <20081112234504.GI2062@tytlal.topaz.cx> |
2076 | |
2077 | Updated patch to retain source compatibility. |
2078 | |
2079 | Plus using the correct PERL_ARGS_ASSERT_SAVE_HELEM_FLAGS |
2080 | macro and running make regen. |
2081 | |
2082 | =head2 Respecting inc_version_list while processing PERL_VENDORLIB_STEM |
2083 | |
2084 | Respecting inc_version_list while processing PERL_VENDORLIB_STEM |
2085 | From: "Mandalemula, Rajesh" <Rajesh.Mandalemula@deshaw.com> |
2086 | |
2087 | =head2 Change PL_debug behaviour |
2088 | |
2089 | |
2090 | String eval lines are now saved whenever |
2091 | a subroutine is defined, even if the eval'd string has subsequent |
2092 | syntax errors. This allows the debugger to single step into these |
2093 | subroutines. |
2094 | |
2095 | |
2096 | =head2 Tied filehandles now have an additional method EOF which provides the EOF type |
2097 | |
2098 | =head2 Perl is now smarter about adding a -I dir to the beginning or end of @INC |
2099 | |
2100 | =head2 On scope end, delete localized array elements that should not exist anymore, so that the array recovers its previous length. Honour EXISTS and DELETE for tied arrays. |
2101 | |
2102 | =head2 When a glob is deleted, mark its sub as ANON. |
2103 | |
2104 | =head2 Require a space or a newline after a "#line XXX" directive |
2105 | |
2106 | =head2 Forbid using "foreach" as an attribute |
2107 | |
2108 | (like all other control flow statements) |
2109 | |
2110 | |
2111 | =head2 Unregister signal handlers before destroying my_perl |
2112 | |
2113 | If the signal handler runs after perl_destruct() has been called, it |
2114 | will get an invalid (or NULL) my_perl when it asks for the |
2115 | thread-specific interpreter struct. This patch resets the signal |
2116 | handler for any signal previously handled by PL_csighandlerp to SIG_DFL |
2117 | before calling perl_destruct(). |
2118 | |
2119 | =head2 Perl_magic_clearsig() needs to remove magic, else delete $SIG{INT} returns undef |
2120 | |
2121 | Perl_magic_clearsig() needs to remove magic, else delete $SIG{INT} returns undef |
2122 | instead of the now-removed INT handler. |
2123 | |
2124 | =head2 [perl #66452] TMPDIR not honored when opening an anonymous temporary file |
2125 | |
2126 | [perl #66452] TMPDIR not honored when opening an anonymous temporary file |
2127 | |
2128 | =head2 The attached patch to perlio.c fixes the problem of errno getting set. |
2129 | |
2130 | While I am firmly in the school of "do not look at $! except immediately |
2131 | after a failure", I also agree that spuriously setting it is messy. But |
2132 | there is just no way of knowing where your errno might have been. |
2133 | |
2134 | The problem was that PerlIO_fast_gets() (and other nearby similar |
2135 | capability-checking PerlIO routines) set the errno (and it was being |
2136 | called a lot, from sv_gets()). I think setting the errno here was |
2137 | a mistake: checking for "can has FOO" should not set external state, |
2138 | such as the errno. The patch removes that errno trashing from all those |
2139 | routines. |
2140 | |
2141 | =head2 Trim all trailing / from "." in @INC when filling %INC |
2142 | |
2143 | This fixes bug #66942 : as a / was left in the directory name, |
2144 | $INC{"Foo.pm"} for a file loaded from the current directory |
2145 | was given the incorrect value "/Foo.pm". |
2146 | |
2147 | =head2 Don't enqueue pending signals during global destruction |
2148 | |
2149 | Global destruction is not signal-safe. PL_psig_pend may already |
2150 | be gone when the signal handler is called (with destruct_level > 0). |
2151 | NULL it before freeing it to prevent a race condition. |
2152 | |
2153 | =head2 Eliminate struct regexp_allocated and xpvio_allocated. |
2154 | |
2155 | Calculate memory allocation using regexp and XPVIO, and the offset of the first |
2156 | real structure member. This avoids tripping over alignment differences between |
2157 | X* and x*_allocated, because x*_allocated doesn't have a double in it. |
2158 | |
2159 | |
2160 | =head1 internals |
2161 | |
2162 | =head2 [perl #47047] Use of inherited AUTOLOAD for non-method is deprecated |
2163 | |
2164 | =head2 Remove the definitions of Null(), Nullch, Nullfp, Nullsv and PL_na when code is within the perl source tree |
2165 | |
2166 | =head2 Replace our assert-which-can-be-caught-by-eval with the real deal from the standard C library. |
2167 | |
2168 | =head2 Tweak Perl_sv_upgrade() so that references can upgrade to SVt_PV |
2169 | |
2170 | =head2 Eliminate prelen from struct regexp. |
2171 | |
2172 | =head2 Change Perl_av_iter_p() to return IV* rather than I32* (which means |
2173 | |
2174 | =head2 Reorder the external regexp flags to get RXf_PMf_STD_PMMOD into the |
2175 | |
2176 | lowest 4 bits (which saves a shift), and the "flags indicating special |
2177 | patterns" into contiguous bits. This makes everything a little tidier, |
2178 | and saves 88 bytes (woohoo!) of object file with -Os on x86 FreeBSD. |
2179 | |
2180 | |
2181 | =head2 Re-implement the SvOOK() hack to store the offset as a BER encoded number in the part of the PVX that is being released. |
2182 | (It will always |
2183 | fit, as chopping off 1 byte gives just enough space for recording a |
2184 | delta of up to 127). This allows SvOOK() to co-exist with SvIOK_on(), |
2185 | which means all the calls to SvOOK_off() [with the possibility of a |
2186 | call to sv_backoff()] in SvIOK_on() can be removed. This ought to make |
2187 | a lot of straight line code a little bit simpler. |
2188 | OOK()d scalars can now be SVt_PV, as the IVX isn't needed. |
2189 | |
2190 | =head2 Abolish wraplen from struct regexp. We're already storing it in SvCUR. |
2191 | |
2192 | =head2 Make Perl_pregcomp() use SvUTF8() of the pattern, rather than the flag bit in pmflags, to decide whether the pattern is UTF-8. |
2193 | |
2194 | =head2 Abolish RXf_UTF8. Store the UTF-8-ness of the pattern with SvUTF8(). |
2195 | |
2196 | =head2 In struct regexp move the member paren_names to the IV union. |
2197 | |
2198 | =head2 Make REGEXP a type distinct from SV. (Much like AV, CV, GV, HV). |
2199 | |
2200 | =head2 Allow sv_setsv_flags() to copy SVt_REGEXP much like it copies SVt_FORMAT - the just string buffer. |
2201 | |
2202 | |
2203 | =head2 Correct a long-standing ithreads reference counting anonamly |
2204 | |
2205 | The reference count only needs "doubling" when the scalar is pushed onto |
2206 | PL_regex_padav for the second time. |
2207 | |
2208 | |
2209 | =head2 In PL_regexp_padav, store regexps via real references, rather than hiding them within IVs. |
2210 | |
2211 | We can do this now that they are real SV pointers. |
2212 | |
2213 | =head2 With regexps stored as real RVs, we can eliminate SvREPADTMP(). |
2214 | |
2215 | =head2 REGEXPs are now stored directly in PL_regex_padav, rather than indirectly via RVs. |
2216 | |
2217 | =head2 Remove code that protected pp_qr against REGEXPs going away during global destruction whilst they were stored via true references in PL_regex_padav. |
2218 | |
2219 | =head2 Remove PM_GETRE_SAFE and PM_SETRE_SAFE as nothing uses them. |
2220 | |
2221 | =head2 Note the U8 sized space created by removing -P, and check that it is now an illegal command line flag. |
2222 | |
2223 | =head2 Pack the recycled pad offsets into an SV at PL_regex_pad[0]. |
2224 | |
2225 | =head2 Re-order so that the !SvOK() case is last (which should be rare) |
2226 | |
2227 | =head2 Extend PUSHFORMAT() to take a second parameter to set retop, to save NULLing it and then reassigning. |
2228 | |
2229 | =head2 Split struct block_sub into struct block_sub and struct block_format. |
2230 | |
2231 | Split struct block_sub into struct block_sub and struct block_format. |
2232 | (CXt_SUB and CXt_FORMAT were using some comon members, but some members |
2233 | were only for one or the other.) |
2234 | |
2235 | =head2 Change the wantarray result from caller from IV to bool for the SCALAR/ARRAY case. |
2236 | |
2237 | This doesn't contradict the documentation, as there isn't any. Oops. |
2238 | |
2239 | |
2240 | =head2 Give G_VOID, G_SCALAR and G_ARRAY the same numeric values as OPf_WANT_VOID, OPf_WANT_SCALAR and OPf_WANT_LIST. |
2241 | |
2242 | |
2243 | =head2 Squeeze the context type down to 4 bits, and move the private flags to fit within the next 4 bits. |
2244 | |
2245 | |
2246 | =head2 In struct block change blku_type from U8 to U16, and the "spare" U8 to U16, with the lockstep changes in struct subst. |
2247 | Eliminate lval from |
2248 | struct block_sub, and instead store it in the U16 in struct block. |
2249 | |
2250 | |
2251 | =head2 In struct block_eval, eliminate old_in_eval and old_op_type by storing the data in blk_u16. |
2252 | |
2253 | |
2254 | =head2 The layout for struct block_loop under ithreads can be simplified. |
2255 | |
2256 | Instead of wedging the pad offset into a void* iterdata, and always |
2257 | storing PL_comppad even when it isn't used, instead do this: |
2258 | |
2259 | PAD *oldcomppad; /* Also used for the GV, if targoffset is 0 */ |
2260 | /* This is also accesible via cx->blk_loop.my_op->op_targ */ |
2261 | PADOFFSET targoffset; |
2262 | |
2263 | and store the GV pointer in oldcompad. Pointers to pointers seems |
2264 | cleaner. This also allows us to eliminate the flag bit CXp_PADVAR. |
2265 | |
2266 | |
2267 | =head2 In XS_PerlIO_get_layers() take advantage of the implementation of |
2268 | |
2269 | In XS_PerlIO_get_layers() take advantage of the implementation of |
2270 | PerlIO_get_layers(), by co-opting the new SVs it creates, rather than |
2271 | copying them. |
2272 | |
2273 | |
2274 | =head2 Micro-optimise the order of the context types. [Because I can :-)] |
2275 | |
2276 | =head2 [patch] optimize OP_IS_(FILETEST|SOCKET) macros |
2277 | |
2278 | =head2 Eliminate ck_lengthconst. |
2279 | |
2280 | =head2 Chainsaw DEBUG_S out, as suggested by Vincent Pit. |
2281 | |
2282 | =head2 Unsupported private API functions are now declared "static" to prevent leakage to the public API |
2283 | |
2284 | =head2 Perl_cv_ckproto() is not part of the public API, and not used anywhere. It has been removed |
2285 | |
2286 | =head2 Remove all the 5005threads specific mutex macros, which are now vestigial. |
2287 | |
2288 | =head2 Do not honor TMPDIR for anonymous temporary files when tainting |
2289 | |
2290 | Use a default of /tmp on Unixes when TMPDIR is unset or empty, or |
2291 | when creation of a temporary file in it fails |
2292 | |
2293 | =head2 Add a pluggable hook in op_free() |
2294 | |
2295 | |