5 perldelta - 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 which 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 Creating unary functions with prototypes
30 Calls to functions created with the following prototypes are now correctly parsed
32 Functions declared with the following prototypes now behave correctly as unary functions:
66 =head2 C<\N{I<name>}> and C<charnames> enhancements
68 C<\N{}>, C<charnames::vianame>, C<charnames::viacode> now know about every
69 character in Unicode. Previously, they didn't know about the Hangul syllables
70 nor a number of CJK (Chinese/Japanese/Korean) characters.
72 =head1 Incompatible Changes
74 =head2 Declare API incompatibility between blead releases
76 Only stable releases (5.10.x, 5.12.x, 5.14.x, ...) guarantee binary
77 compatibility with each other, while blead releases (5.13.x, 5.15.x, ...) often
78 break this compatibility. However, prior to perl 5.13.4, all blead releases had
79 the same C<PERL_API_REVISION>, C<PERL_API_VERSION>, and C<PERL_API_SUBVERSION>,
80 effectively declaring them as binary compatible, which they weren't. From now
81 on, blead releases will have a C<PERL_API_SUBVERSION> equal to their
82 C<PERL_SUBVERSION>, explicitly marking them as incompatible with each other.
84 Maintainance releases of stable perl versions will continue to make no
85 intentionally incompatible API changes.
87 =head2 Check API compatibility when loading XS modules
89 When perl's API changes in incompatible ways (which usually happens between
90 every major release), XS modules compiled for previous versions of perl will not
91 work anymore. They will need to be recompiled against the new perl.
93 In order to ensure that modules are recompiled, and to prevent users from
94 accidentally loading modules compiled for old perls into newer ones, the
95 C<XS_APIVERSION_BOOTCHECK> macro has been added. That macro, which is called
96 when loading every newly compiled extension, compares the API version of the
97 running perl with the version a module has been compiled for and raises an
98 exception if they don't match.
100 =head2 Binary Incompatible with all previous Perls
102 Some bit fields have been reordered, hence this release will not be binary
103 compatible with any previous Perl release.
107 =head2 List assignment to C<$[>
109 After assignment to C<$[> has been deprecated and started to give warnings in
110 perl version 5.12.0, this version of perl also starts to emit a warning when
111 assigning to C<$[> in list context. This fixes an oversight in 5.12.0.
113 =head1 Performance Enhancements
119 Make string appending 100 times faster
121 When doing a lot of string appending, perl could end up allocating a lot more
122 memory than needed in a very inefficient way, if perl was configured to use the
123 system's C<malloc> implementation instead of its own.
125 C<sv_grow>, which is what's being used to allocate more memory if necessary when
126 appending to a string, has now been teached how to round up the memory it
127 requests to a certain geometric progression, making it much faster on certain
128 platforms and configurations. On Win32, it's now about 100 times faster.
132 For weak references, the common case of just a single weak reference per
133 referent has been optimised to reduce the storage required. In this case it
134 saves the equivalent of one small perl array per referent.
138 C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body
139 they actually use, saving some space.
143 =head1 Modules and Pragmata
145 =head2 New Modules and Pragmata
147 This release does not introduce any new modules or pragmata.
149 =head2 Updated Modules and Pragmata
153 =item C<Archive::Tar>
155 Upgraded from version 1.64 to 1.68.
157 Among other things, the new version adds a new option to C<ptar> to allow safe
158 creation of tarballs without world-writable files on Windows, allowing those
159 archives to be uploaded to CPAN.
163 Upgraded from version 1.11 to 1.12.
167 Upgraded from version 1.16 to 1.18.
169 L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR"> overrides and
170 avoids using bogus C<@DB::args>. To provide backtraces, Carp relies on
171 particular behaviour of the caller built-in. Carp now detects if other code has
172 overridden this with an incomplete implementation, and modifies its backtrace
173 accordingly. Previously incomplete overrides would cause incorrect values in
174 backtraces (best case), or obscure fatal errors (worst case)
176 This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules
177 overriding C<caller()> incorrectly.
179 =item C<Compress::Raw::Bzip2>
181 Upgraded from version 2.027 to 2.030.
183 =item C<Compress::Raw::Zlib>
185 Upgraded from version 2.027 to 2.030.
189 Upgraded from version 3.31 to 3.31_01.
191 Various issues in L<File::Spec::VMS> have been fixed.
193 =item C<I18N::Langinfo>
195 Upgraded from version 0.03 to 0.04.
197 C<langinfo()> now defaults to using C<$_> if there is no argument given, just
198 like the documentation always claimed it did.
200 =item C<IO::Compress>
202 Upgraded from version 2.027 to 2.030.
204 =item C<Module::CoreList>
206 Upgraded from version 2.36 to 2.37.
208 Besides listing the updated core modules of this release, it also stops listing
209 the C<Filespec> module. That module never existed in core. The scripts
210 generating C<Module::CoreList> confused it with C<VMS::Filespec>, which actually
211 is a core module, since the time of perl 5.8.7.
213 =item C<Test::Harness>
215 Upgraded from version 3.21 to 3.22.
217 =item C<Test::Simple>
219 Upgraded from version 0.94 to 0.96.
221 Among many other things, subtests without a C<plan> or C<no_plan> now have an
222 implicit C<done_testing()> added to them.
224 =item C<Unicode::Collate>
226 Upgraded from version 0.53 to 0.56.
228 Among other things, it is now using UCA Revision 20 (based on Unicode 5.2.0) and
229 supports a couple of new locales.
233 Upgraded from version 1.17 to 1.18.
237 =head2 Removed Modules and Pragmata
239 This release does not remove any modules or pragmata.
243 =head2 Changes to Existing Documentation
251 The following existing diagnostics are now documented:
257 L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c">
261 L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s">
265 L<Ambiguous use of %c{%s%s} resolved to %c%s%s|perldiag/"Ambiguous use of %c{%s%s} resolved to %c%s%s">
269 L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()">
273 L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)">
277 L<Invalid version format (%s)|perldiag/"Invalid version format (%s)">
281 L<Invalid version object|perldiag/"Invalid version object">
293 Documented a L<limitation|perlport/alarm> of L<alarm()|perlfunc/"alarm SECONDS">
304 Minor fix to a multiple scalar match example.
308 =head1 Configuration and Compilation
314 Compatibility with C<C++> compilers has been improved.
318 On compilers that support it, C<-Wwrite-strings> is now added to cflags by
329 F<t/op/print.t> has been added to test implicit printing of C<$_>.
333 F<t/io/errnosig.t> has been added to test for restoration of of C<$!> when
334 leaving signal handlers.
338 F<t/op/tie_fetch_count.t> has been added to see if C<FETCH> is only called once
343 F<lib/Tie/ExtraHash.t> has been added to make sure the, previously untested,
344 L<Tie::ExtraHash> keeps working.
348 =head1 Platform Support
350 =head2 Platform-Specific Notes
360 Fixed a possible hang in F<t/op/readline.t>.
364 Fixed build process for SDK2003SP1 compilers.
368 When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set
369 in C<$Config{ccflags}>. This improves portability when compiling XS extensions
370 using new compilers, but for a perl compiled with old 32-bit compilers.
376 =head1 Internal Changes
380 =item Removed C<PERL_POLLUTE>
382 The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for backwards
383 compatibility has been removed. It's use was always discouraged, and MakeMaker
384 contains a more specific escape hatch:
386 perl Makefile.PL POLLUTE=1
388 This can be used for modules that have not been upgraded to 5.6 naming
389 conventions (and really should be completely obsolete by now).
391 =item Added C<PERL_STATIC_INLINE>
393 The C<PERL_STATIC_INLINE> define has been added to provide the best-guess
394 incantation to use for static inline functions, if the C compiler supports
395 C99-style static inline. If it doesn't, it'll give a plain C<static>.
397 C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports
402 =head1 Selected Bug Fixes
408 A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set
409 C<@DB::args> has been fixed.
413 Several memory leaks when loading XS modules were fixed.
417 A panic in the regular expression optimizer has been fixed (RT#75762).
421 Assignments to lvalue subroutines now honor copy-on-write behavior again, which
422 has been broken since version 5.10.0 (RT#75656).
426 Assignments to glob copies now behave just like assignments to regular globs
431 Within signal handlers, C<$!> is now implicitly localized.
435 L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied
440 L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">,
441 L<pos()|perlfunc/"index STR,SUBSTR,POSITION">, L<keys()|perlfunc/"keys HASH">,
442 and L<vec()|perlfunc/"vec EXPR,OFFSET,BITS"> could, when used in combination
443 with lvalues, result in leaking the scalar value they operate on, and cause its
444 destruction to happen too late. This has now been fixed.
448 Building with C<PERL_GLOBAL_STRUCT>, which has been broken accidentally in
449 5.13.3, now works again.
453 =head1 Known Problems
459 The changes in L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">
460 break L<HTML::Parser>. A patch has already been applied to its git repository
461 and will hopefully be released shortly.
465 =head1 Acknowledgements
467 Perl 5.13.4 represents approximately one month of development since Perl 5.13.3,
468 and contains XXX lines of changes across XXX files from XXX authors and
471 Thank you to the following for contributing to this release:
473 XXX The list of people to thank goes here.
475 =head1 Reporting Bugs
477 If you find what you think is a bug, you might check the articles recently
478 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
479 http://rt.perl.org/perlbug/ . There may also be information at
480 http://www.perl.org/ , the Perl Home Page.
482 If you believe you have an unreported bug, please run the B<perlbug> program
483 included with your release. Be sure to trim your bug down to a tiny but
484 sufficient test case. Your bug report, along with the output of C<perl -V>,
485 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
487 If the bug you are reporting has security implications, which make it
488 inappropriate to send to a publicly archived mailing list, then please send it
489 to perl5-security-report@perl.org. This points to a closed subscription
490 unarchived mailing list, which includes all the core committers, who be able to
491 help assess the impact of issues, figure out a resolution, and help co-ordinate
492 the release of patches to mitigate or fix the problem across all platforms on
493 which Perl is supported. Please only use this address for security issues in the
494 Perl core, not for modules independently distributed on CPAN.
498 The F<Changes> file for an explanation of how to view exhaustive details
501 The F<INSTALL> file for how to build Perl.
503 The F<README> file for general stuff.
505 The F<Artistic> and F<Copying> files for copyright information.