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