Commit | Line | Data |
---|---|---|
e90f0e29 DG |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
5eefbcc7 | 5 | perl5134delta - what is new for perl v5.13.4 |
e90f0e29 DG |
6 | |
7 | =head1 DESCRIPTION | |
8 | ||
9 | This document describes differences between the 5.13.4 release and | |
10 | the 5.13.3 release. | |
11 | ||
12 | If you are upgrading from an earlier release such as 5.13.2, first read | |
13 | L<perl5133delta>, which describes differences between 5.13.2 and | |
14 | 5.13.3. | |
15 | ||
e90f0e29 DG |
16 | =head1 Core Enhancements |
17 | ||
83832992 KW |
18 | =head2 C<srand()> now returns the seed |
19 | ||
5bd0cfd2 | 20 | This allows programs that need to have repeatable results to not have to come |
83832992 KW |
21 | up with their own seed generating mechanism. Instead, they can use C<srand()> |
22 | and somehow stash the return for future use. Typical is a test program which | |
23 | has too many combinations to test comprehensively in the time available to it | |
a98d1b31 FR |
24 | each run. It can test a random subset each time, and should there be a failure, |
25 | log the seed used for that run so that it can later be used to reproduce the | |
26 | exact results. | |
27 | ||
28 | =head2 C<\N{I<name>}> and C<charnames> enhancements | |
29 | ||
30 | C<\N{}>, C<charnames::vianame>, C<charnames::viacode> now know about every | |
31 | character in Unicode. Previously, they didn't know about the Hangul syllables | |
32 | nor a number of CJK (Chinese/Japanese/Korean) characters. | |
83832992 | 33 | |
e90f0e29 DG |
34 | =head1 Incompatible Changes |
35 | ||
dbce4399 | 36 | =head2 Declare API incompatibility between blead releases |
e90f0e29 | 37 | |
dbce4399 FR |
38 | Only stable releases (5.10.x, 5.12.x, 5.14.x, ...) guarantee binary |
39 | compatibility with each other, while blead releases (5.13.x, 5.15.x, ...) often | |
40 | break this compatibility. However, prior to perl 5.13.4, all blead releases had | |
41 | the same C<PERL_API_REVISION>, C<PERL_API_VERSION>, and C<PERL_API_SUBVERSION>, | |
42 | effectively declaring them as binary compatible, which they weren't. From now | |
43 | on, blead releases will have a C<PERL_API_SUBVERSION> equal to their | |
44 | C<PERL_SUBVERSION>, explicitly marking them as incompatible with each other. | |
e90f0e29 | 45 | |
5bd0cfd2 | 46 | Maintenance releases of stable perl versions will continue to make no |
dbce4399 FR |
47 | intentionally incompatible API changes. |
48 | ||
49 | =head2 Check API compatibility when loading XS modules | |
50 | ||
51 | When perl's API changes in incompatible ways (which usually happens between | |
52 | every major release), XS modules compiled for previous versions of perl will not | |
53 | work anymore. They will need to be recompiled against the new perl. | |
54 | ||
55 | In order to ensure that modules are recompiled, and to prevent users from | |
56 | accidentally loading modules compiled for old perls into newer ones, the | |
57 | C<XS_APIVERSION_BOOTCHECK> macro has been added. That macro, which is called | |
58 | when loading every newly compiled extension, compares the API version of the | |
59 | running perl with the version a module has been compiled for and raises an | |
60 | exception if they don't match. | |
e90f0e29 | 61 | |
e795e964 KW |
62 | =head2 Binary Incompatible with all previous Perls |
63 | ||
5bd0cfd2 | 64 | Some bit fields have been reordered; therefore, this release will not be binary |
123a0cbb | 65 | compatible with any previous Perl release. |
e795e964 | 66 | |
61ea75ac FC |
67 | =head2 Change in the parsing of certain prototypes |
68 | ||
56e76579 FR |
69 | Functions declared with the following prototypes now behave correctly as unary |
70 | functions: | |
71 | ||
72 | =over 4 | |
73 | ||
74 | =item * | |
75 | ||
76 | C<*> | |
77 | ||
78 | =item * | |
79 | ||
80 | C<\sigil> | |
81 | ||
82 | =item * | |
83 | ||
84 | C<\[...]> | |
85 | ||
86 | =item * | |
87 | ||
88 | C<;$> | |
89 | ||
90 | =item * | |
91 | ||
92 | C<;*> | |
93 | ||
94 | =item * | |
95 | ||
96 | C<;\sigil> | |
97 | ||
98 | =item * | |
99 | ||
100 | C<;\[...]> | |
101 | ||
102 | =back | |
103 | ||
104 | Due to this bug fix, functions using the C<(*)>, C<(;$)> and C<(;*)> prototypes | |
105 | are parsed with higher precedence than before. So in the following example: | |
61ea75ac FC |
106 | |
107 | sub foo($); | |
108 | foo $a < $b; | |
109 | ||
110 | the second line is now parsed correctly as C<< foo($a) < $b >>, rather than | |
111 | C<< foo($a < $b) >>. This happens when one of these operators is used in | |
112 | an unparenthesised argument: | |
113 | ||
114 | < > <= >= lt gt le ge | |
115 | == != <=> eq ne cmp ~~ | |
116 | & | |
117 | | ^ | |
118 | && | |
119 | || // | |
120 | .. ... | |
121 | ?: | |
122 | = += -= *= etc. | |
123 | ||
e90f0e29 DG |
124 | =head1 Deprecations |
125 | ||
b631e5c2 FR |
126 | =head2 List assignment to C<$[> |
127 | ||
128 | After assignment to C<$[> has been deprecated and started to give warnings in | |
129 | perl version 5.12.0, this version of perl also starts to emit a warning when | |
130 | assigning to C<$[> in list context. This fixes an oversight in 5.12.0. | |
131 | ||
e90f0e29 DG |
132 | =head1 Performance Enhancements |
133 | ||
e90f0e29 DG |
134 | =over 4 |
135 | ||
136 | =item * | |
137 | ||
874cd4e1 FR |
138 | Make string appending 100 times faster |
139 | ||
140 | When doing a lot of string appending, perl could end up allocating a lot more | |
141 | memory than needed in a very inefficient way, if perl was configured to use the | |
142 | system's C<malloc> implementation instead of its own. | |
143 | ||
144 | C<sv_grow>, which is what's being used to allocate more memory if necessary when | |
5bd0cfd2 | 145 | appending to a string, has now been taught how to round up the memory it |
874cd4e1 FR |
146 | requests to a certain geometric progression, making it much faster on certain |
147 | platforms and configurations. On Win32, it's now about 100 times faster. | |
148 | ||
149 | =item * | |
150 | ||
8f7d8cf4 | 151 | For weak references, the common case of just a single weak reference per |
123a0cbb FR |
152 | referent has been optimised to reduce the storage required. In this case it |
153 | saves the equivalent of one small perl array per referent. | |
8f7d8cf4 FR |
154 | |
155 | =item * | |
156 | ||
874cd4e1 FR |
157 | C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body |
158 | they actually use, saving some space. | |
e90f0e29 DG |
159 | |
160 | =back | |
161 | ||
162 | =head1 Modules and Pragmata | |
163 | ||
e90f0e29 DG |
164 | =head2 New Modules and Pragmata |
165 | ||
123a0cbb | 166 | This release does not introduce any new modules or pragmata. |
e90f0e29 DG |
167 | |
168 | =head2 Updated Modules and Pragmata | |
169 | ||
170 | =over 4 | |
171 | ||
5aa76647 FR |
172 | =item C<Archive::Tar> |
173 | ||
47237f0a | 174 | Upgraded from version 1.64 to 1.68. |
5aa76647 FR |
175 | |
176 | Among other things, the new version adds a new option to C<ptar> to allow safe | |
177 | creation of tarballs without world-writable files on Windows, allowing those | |
178 | archives to be uploaded to CPAN. | |
179 | ||
a767f83c FR |
180 | =item C<B::Lint> |
181 | ||
182 | Upgraded from version 1.11 to 1.12. | |
183 | ||
09d86ea5 | 184 | =item C<Carp> |
e90f0e29 | 185 | |
09d86ea5 FR |
186 | Upgraded from version 1.16 to 1.18. |
187 | ||
123a0cbb FR |
188 | L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR"> overrides and |
189 | avoids using bogus C<@DB::args>. To provide backtraces, Carp relies on | |
190 | particular behaviour of the caller built-in. Carp now detects if other code has | |
191 | overridden this with an incomplete implementation, and modifies its backtrace | |
192 | accordingly. Previously incomplete overrides would cause incorrect values in | |
193 | backtraces (best case), or obscure fatal errors (worst case) | |
48792a70 FR |
194 | |
195 | This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules | |
196 | overriding C<caller()> incorrectly. | |
09d86ea5 | 197 | |
97613388 FR |
198 | =item C<Compress::Raw::Bzip2> |
199 | ||
200 | Upgraded from version 2.027 to 2.030. | |
201 | ||
202 | =item C<Compress::Raw::Zlib> | |
203 | ||
204 | Upgraded from version 2.027 to 2.030. | |
205 | ||
09d86ea5 FR |
206 | =item C<File::Spec> |
207 | ||
208 | Upgraded from version 3.31 to 3.31_01. | |
209 | ||
210 | Various issues in L<File::Spec::VMS> have been fixed. | |
e90f0e29 | 211 | |
123a0cbb | 212 | =item C<I18N::Langinfo> |
7d255e31 FR |
213 | |
214 | Upgraded from version 0.03 to 0.04. | |
215 | ||
216 | C<langinfo()> now defaults to using C<$_> if there is no argument given, just | |
217 | like the documentation always claimed it did. | |
218 | ||
97613388 FR |
219 | =item C<IO::Compress> |
220 | ||
221 | Upgraded from version 2.027 to 2.030. | |
222 | ||
7d255e31 FR |
223 | =item C<Module::CoreList> |
224 | ||
225 | Upgraded from version 2.36 to 2.37. | |
226 | ||
227 | Besides listing the updated core modules of this release, it also stops listing | |
228 | the C<Filespec> module. That module never existed in core. The scripts | |
229 | generating C<Module::CoreList> confused it with C<VMS::Filespec>, which actually | |
230 | is a core module, since the time of perl 5.8.7. | |
231 | ||
b631e5c2 FR |
232 | =item C<Test::Harness> |
233 | ||
234 | Upgraded from version 3.21 to 3.22. | |
235 | ||
874cd4e1 FR |
236 | =item C<Test::Simple> |
237 | ||
238 | Upgraded from version 0.94 to 0.96. | |
239 | ||
240 | Among many other things, subtests without a C<plan> or C<no_plan> now have an | |
241 | implicit C<done_testing()> added to them. | |
242 | ||
a98d1b31 FR |
243 | =item C<Unicode::Collate> |
244 | ||
245 | Upgraded from version 0.53 to 0.56. | |
246 | ||
247 | Among other things, it is now using UCA Revision 20 (based on Unicode 5.2.0) and | |
248 | supports a couple of new locales. | |
249 | ||
c0c2d88f FR |
250 | =item C<feature> |
251 | ||
252 | Upgraded from version 1.17 to 1.18. | |
253 | ||
e90f0e29 DG |
254 | =back |
255 | ||
256 | =head2 Removed Modules and Pragmata | |
257 | ||
123a0cbb | 258 | This release does not remove any modules or pragmata. |
e90f0e29 DG |
259 | |
260 | =head1 Documentation | |
261 | ||
e90f0e29 DG |
262 | =head2 Changes to Existing Documentation |
263 | ||
dbce4399 FR |
264 | =head3 L<perldiag> |
265 | ||
266 | =over 4 | |
267 | ||
268 | =item * | |
269 | ||
270 | The following existing diagnostics are now documented: | |
271 | ||
272 | =over 4 | |
273 | ||
274 | =item * | |
275 | ||
276 | L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c"> | |
277 | ||
278 | =item * | |
279 | ||
280 | L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s"> | |
281 | ||
282 | =item * | |
283 | ||
284 | L<Ambiguous use of %c{%s%s} resolved to %c%s%s|perldiag/"Ambiguous use of %c{%s%s} resolved to %c%s%s"> | |
285 | ||
286 | =item * | |
287 | ||
288 | L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()"> | |
289 | ||
874cd4e1 FR |
290 | =item * |
291 | ||
292 | L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)"> | |
293 | ||
294 | =item * | |
295 | ||
296 | L<Invalid version format (%s)|perldiag/"Invalid version format (%s)"> | |
297 | ||
298 | =item * | |
299 | ||
300 | L<Invalid version object|perldiag/"Invalid version object"> | |
301 | ||
dbce4399 FR |
302 | =back |
303 | ||
304 | =back | |
305 | ||
09d86ea5 | 306 | =head3 L<perlport> |
e90f0e29 DG |
307 | |
308 | =over 4 | |
309 | ||
310 | =item * | |
311 | ||
09d86ea5 FR |
312 | Documented a L<limitation|perlport/alarm> of L<alarm()|perlfunc/"alarm SECONDS"> |
313 | on Win32. | |
e90f0e29 DG |
314 | |
315 | =back | |
316 | ||
874cd4e1 FR |
317 | =head3 L<perlre> |
318 | ||
319 | =over 4 | |
320 | ||
321 | =item * | |
322 | ||
323 | Minor fix to a multiple scalar match example. | |
324 | ||
325 | =back | |
326 | ||
e90f0e29 DG |
327 | =head1 Configuration and Compilation |
328 | ||
e90f0e29 DG |
329 | =over 4 |
330 | ||
331 | =item * | |
332 | ||
874cd4e1 FR |
333 | Compatibility with C<C++> compilers has been improved. |
334 | ||
335 | =item * | |
336 | ||
337 | On compilers that support it, C<-Wwrite-strings> is now added to cflags by | |
338 | default. | |
e90f0e29 DG |
339 | |
340 | =back | |
341 | ||
342 | =head1 Testing | |
343 | ||
e90f0e29 DG |
344 | =over 4 |
345 | ||
346 | =item * | |
347 | ||
5aa76647 | 348 | F<t/op/print.t> has been added to test implicit printing of C<$_>. |
e90f0e29 | 349 | |
dbce4399 FR |
350 | =item * |
351 | ||
352 | F<t/io/errnosig.t> has been added to test for restoration of of C<$!> when | |
353 | leaving signal handlers. | |
354 | ||
a98d1b31 FR |
355 | =item * |
356 | ||
357 | F<t/op/tie_fetch_count.t> has been added to see if C<FETCH> is only called once | |
358 | on tied variables. | |
359 | ||
360 | =item * | |
361 | ||
362 | F<lib/Tie/ExtraHash.t> has been added to make sure the, previously untested, | |
363 | L<Tie::ExtraHash> keeps working. | |
364 | ||
ac9f49e6 FR |
365 | =item * |
366 | ||
367 | F<t/re/overload.t> has been added to test against string corruption in pattern | |
368 | matches on overloaded objects. This is a TODO test. | |
369 | ||
e90f0e29 DG |
370 | =back |
371 | ||
372 | =head1 Platform Support | |
373 | ||
e90f0e29 DG |
374 | =head2 Platform-Specific Notes |
375 | ||
e90f0e29 DG |
376 | =over 4 |
377 | ||
09d86ea5 | 378 | =item Win32 |
e90f0e29 | 379 | |
09d86ea5 FR |
380 | =over 4 |
381 | ||
382 | =item * | |
383 | ||
384 | Fixed a possible hang in F<t/op/readline.t>. | |
385 | ||
386 | =item * | |
387 | ||
123a0cbb | 388 | Fixed build process for SDK2003SP1 compilers. |
09d86ea5 | 389 | |
a98d1b31 FR |
390 | =item * |
391 | ||
392 | When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set | |
393 | in C<$Config{ccflags}>. This improves portability when compiling XS extensions | |
394 | using new compilers, but for a perl compiled with old 32-bit compilers. | |
395 | ||
09d86ea5 | 396 | =back |
e90f0e29 DG |
397 | |
398 | =back | |
399 | ||
400 | =head1 Internal Changes | |
401 | ||
e90f0e29 DG |
402 | =over 4 |
403 | ||
09d86ea5 | 404 | =item Removed C<PERL_POLLUTE> |
e90f0e29 | 405 | |
09d86ea5 FR |
406 | The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for backwards |
407 | compatibility has been removed. It's use was always discouraged, and MakeMaker | |
408 | contains a more specific escape hatch: | |
409 | ||
410 | perl Makefile.PL POLLUTE=1 | |
411 | ||
412 | This can be used for modules that have not been upgraded to 5.6 naming | |
413 | conventions (and really should be completely obsolete by now). | |
414 | ||
8f7d8cf4 FR |
415 | =item Added C<PERL_STATIC_INLINE> |
416 | ||
123a0cbb | 417 | The C<PERL_STATIC_INLINE> define has been added to provide the best-guess |
8f7d8cf4 FR |
418 | incantation to use for static inline functions, if the C compiler supports |
419 | C99-style static inline. If it doesn't, it'll give a plain C<static>. | |
420 | ||
421 | C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports | |
422 | inline functions. | |
423 | ||
e90f0e29 DG |
424 | =back |
425 | ||
426 | =head1 Selected Bug Fixes | |
427 | ||
e90f0e29 DG |
428 | =over 4 |
429 | ||
430 | =item * | |
431 | ||
48792a70 FR |
432 | A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set |
433 | C<@DB::args> has been fixed. | |
09d86ea5 FR |
434 | |
435 | =item * | |
436 | ||
437 | Several memory leaks when loading XS modules were fixed. | |
e90f0e29 | 438 | |
5aa76647 FR |
439 | =item * |
440 | ||
441 | A panic in the regular expression optimizer has been fixed (RT#75762). | |
442 | ||
443 | =item * | |
444 | ||
445 | Assignments to lvalue subroutines now honor copy-on-write behavior again, which | |
446 | has been broken since version 5.10.0 (RT#75656). | |
447 | ||
dbce4399 FR |
448 | =item * |
449 | ||
450 | Assignments to glob copies now behave just like assignments to regular globs | |
451 | (RT#1804). | |
452 | ||
453 | =item * | |
454 | ||
455 | Within signal handlers, C<$!> is now implicitly localized. | |
456 | ||
874cd4e1 FR |
457 | =item * |
458 | ||
459 | L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied | |
460 | arguments. | |
461 | ||
6f3f41ca FR |
462 | =item * |
463 | ||
643222e1 | 464 | L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">, |
6f3f41ca FR |
465 | L<pos()|perlfunc/"index STR,SUBSTR,POSITION">, L<keys()|perlfunc/"keys HASH">, |
466 | and L<vec()|perlfunc/"vec EXPR,OFFSET,BITS"> could, when used in combination | |
467 | with lvalues, result in leaking the scalar value they operate on, and cause its | |
468 | destruction to happen too late. This has now been fixed. | |
469 | ||
8f7d8cf4 FR |
470 | =item * |
471 | ||
472 | Building with C<PERL_GLOBAL_STRUCT>, which has been broken accidentally in | |
473 | 5.13.3, now works again. | |
474 | ||
e90f0e29 DG |
475 | =back |
476 | ||
477 | =head1 Known Problems | |
478 | ||
e90f0e29 DG |
479 | =over 4 |
480 | ||
481 | =item * | |
482 | ||
643222e1 | 483 | The changes in L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT"> |
e5e6576a FR |
484 | broke C<HTML::Parser> <= 3.66. A fixed C<HTML::Parser> is available as version |
485 | 3.67 on CPAN. | |
e90f0e29 | 486 | |
63cf2492 FR |
487 | =item * |
488 | ||
489 | The changes in prototype handling break C<Switch>. A patch has been sent | |
490 | upstream and will hopefully appear on CPAN soon. | |
491 | ||
e90f0e29 DG |
492 | =back |
493 | ||
123a0cbb | 494 | =head1 Acknowledgements |
e90f0e29 | 495 | |
123a0cbb | 496 | Perl 5.13.4 represents approximately one month of development since Perl 5.13.3, |
cf00cff5 | 497 | and contains 91,200 lines of changes across 436 files from 34 authors and |
123a0cbb | 498 | committers. |
e90f0e29 | 499 | |
123a0cbb | 500 | Thank you to the following for contributing to this release: |
e90f0e29 | 501 | |
cf00cff5 FR |
502 | Abigail, Andy Armstrong, Andy Dougherty, Chas. Owens, Chip Salzenberg, Chris |
503 | 'BinGOs' Williams, Craig A. Berry, David Cantrell, David Golden, David Mitchell, | |
504 | Eric Brine, Father Chrysostomos, Florian Ragwitz, George Greer, Gerard Goossen, | |
505 | H.Merijn Brand, James Mastros, Jan Dubois, Jerry D. Hedden, Joshua ben Jore, | |
506 | Karl Williamson, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯, Leon Brocard, Lubomir Rintel, Nicholas | |
507 | Clark, Paul Marquess, Rafael Garcia-Suarez, Reini Urban, Robin Barker, Slaven | |
508 | Rezic, Steve Peters, Tony Cook, Wolfram Humann, Zefram | |
e90f0e29 DG |
509 | |
510 | =head1 Reporting Bugs | |
511 | ||
123a0cbb FR |
512 | If you find what you think is a bug, you might check the articles recently |
513 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
514 | http://rt.perl.org/perlbug/ . There may also be information at | |
515 | http://www.perl.org/ , the Perl Home Page. | |
e90f0e29 | 516 | |
123a0cbb FR |
517 | If you believe you have an unreported bug, please run the B<perlbug> program |
518 | included with your release. Be sure to trim your bug down to a tiny but | |
519 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
520 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
e90f0e29 DG |
521 | |
522 | If the bug you are reporting has security implications, which make it | |
123a0cbb FR |
523 | inappropriate to send to a publicly archived mailing list, then please send it |
524 | to perl5-security-report@perl.org. This points to a closed subscription | |
525 | unarchived mailing list, which includes all the core committers, who be able to | |
526 | help assess the impact of issues, figure out a resolution, and help co-ordinate | |
527 | the release of patches to mitigate or fix the problem across all platforms on | |
528 | which Perl is supported. Please only use this address for security issues in the | |
529 | Perl core, not for modules independently distributed on CPAN. | |
e90f0e29 DG |
530 | |
531 | =head1 SEE ALSO | |
532 | ||
533 | The F<Changes> file for an explanation of how to view exhaustive details | |
534 | on what changed. | |
535 | ||
536 | The F<INSTALL> file for how to build Perl. | |
537 | ||
538 | The F<README> file for general stuff. | |
539 | ||
540 | The F<Artistic> and F<Copying> files for copyright information. | |
541 | ||
542 | =cut |