5 perl5134delta - what is new for perl v5.13.4
9 This document describes differences between the 5.13.4 release and
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
16 =head1 Core Enhancements
18 =head2 C<srand()> now returns the seed
20 This allows programs that need to have repeatable results to not have to come
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
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
28 =head2 C<\N{I<name>}> and C<charnames> enhancements
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.
34 =head1 Incompatible Changes
36 =head2 Declare API incompatibility between blead releases
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.
46 Maintenance releases of stable perl versions will continue to make no
47 intentionally incompatible API changes.
49 =head2 Check API compatibility when loading XS modules
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.
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.
62 =head2 Binary Incompatible with all previous Perls
64 Some bit fields have been reordered; therefore, this release will not be binary
65 compatible with any previous Perl release.
67 =head2 Change in the parsing of certain prototypes
69 Functions declared with the following prototypes now behave correctly as unary
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:
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:
114 < > <= >= lt gt le ge
115 == != <=> eq ne cmp ~~
126 =head2 List assignment to C<$[>
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.
132 =head1 Performance Enhancements
138 Make string appending 100 times faster
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.
144 C<sv_grow>, which is what's being used to allocate more memory if necessary when
145 appending to a string, has now been taught how to round up the memory it
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.
151 For weak references, the common case of just a single weak reference per
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.
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.
162 =head1 Modules and Pragmata
164 =head2 New Modules and Pragmata
166 This release does not introduce any new modules or pragmata.
168 =head2 Updated Modules and Pragmata
172 =item C<Archive::Tar>
174 Upgraded from version 1.64 to 1.68.
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.
182 Upgraded from version 1.11 to 1.12.
186 Upgraded from version 1.16 to 1.18.
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)
195 This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules
196 overriding C<caller()> incorrectly.
198 =item C<Compress::Raw::Bzip2>
200 Upgraded from version 2.027 to 2.030.
202 =item C<Compress::Raw::Zlib>
204 Upgraded from version 2.027 to 2.030.
208 Upgraded from version 3.31 to 3.31_01.
210 Various issues in L<File::Spec::VMS> have been fixed.
212 =item C<I18N::Langinfo>
214 Upgraded from version 0.03 to 0.04.
216 C<langinfo()> now defaults to using C<$_> if there is no argument given, just
217 like the documentation always claimed it did.
219 =item C<IO::Compress>
221 Upgraded from version 2.027 to 2.030.
223 =item C<Module::CoreList>
225 Upgraded from version 2.36 to 2.37.
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.
232 =item C<Test::Harness>
234 Upgraded from version 3.21 to 3.22.
236 =item C<Test::Simple>
238 Upgraded from version 0.94 to 0.96.
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.
243 =item C<Unicode::Collate>
245 Upgraded from version 0.53 to 0.56.
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.
252 Upgraded from version 1.17 to 1.18.
256 =head2 Removed Modules and Pragmata
258 This release does not remove any modules or pragmata.
262 =head2 Changes to Existing Documentation
270 The following existing diagnostics are now documented:
276 L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c">
280 L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s">
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">
288 L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()">
292 L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)">
296 L<Invalid version format (%s)|perldiag/"Invalid version format (%s)">
300 L<Invalid version object|perldiag/"Invalid version object">
312 Documented a L<limitation|perlport/alarm> of L<alarm()|perlfunc/"alarm SECONDS">
323 Minor fix to a multiple scalar match example.
327 =head1 Configuration and Compilation
333 Compatibility with C<C++> compilers has been improved.
337 On compilers that support it, C<-Wwrite-strings> is now added to cflags by
348 F<t/op/print.t> has been added to test implicit printing of C<$_>.
352 F<t/io/errnosig.t> has been added to test for restoration of of C<$!> when
353 leaving signal handlers.
357 F<t/op/tie_fetch_count.t> has been added to see if C<FETCH> is only called once
362 F<lib/Tie/ExtraHash.t> has been added to make sure the, previously untested,
363 L<Tie::ExtraHash> keeps working.
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.
372 =head1 Platform Support
374 =head2 Platform-Specific Notes
384 Fixed a possible hang in F<t/op/readline.t>.
388 Fixed build process for SDK2003SP1 compilers.
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.
400 =head1 Internal Changes
404 =item Removed C<PERL_POLLUTE>
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:
410 perl Makefile.PL POLLUTE=1
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).
415 =item Added C<PERL_STATIC_INLINE>
417 The C<PERL_STATIC_INLINE> define has been added to provide the best-guess
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>.
421 C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports
426 =head1 Selected Bug Fixes
432 A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set
433 C<@DB::args> has been fixed.
437 Several memory leaks when loading XS modules were fixed.
441 A panic in the regular expression optimizer has been fixed (RT#75762).
445 Assignments to lvalue subroutines now honor copy-on-write behavior again, which
446 has been broken since version 5.10.0 (RT#75656).
450 Assignments to glob copies now behave just like assignments to regular globs
455 Within signal handlers, C<$!> is now implicitly localized.
459 L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied
464 L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">,
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.
472 Building with C<PERL_GLOBAL_STRUCT>, which has been broken accidentally in
473 5.13.3, now works again.
477 =head1 Known Problems
483 The changes in L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">
484 broke C<HTML::Parser> <= 3.66. A fixed C<HTML::Parser> is available as version
489 The changes in prototype handling break C<Switch>. A patch has been sent
490 upstream and will hopefully appear on CPAN soon.
494 =head1 Acknowledgements
496 Perl 5.13.4 represents approximately one month of development since Perl 5.13.3,
497 and contains 91,200 lines of changes across 436 files from 34 authors and
500 Thank you to the following for contributing to this release:
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
510 =head1 Reporting Bugs
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.
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.
522 If the bug you are reporting has security implications, which make it
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.
533 The F<Changes> file for an explanation of how to view exhaustive details
536 The F<INSTALL> file for how to build Perl.
538 The F<README> file for general stuff.
540 The F<Artistic> and F<Copying> files for copyright information.