This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix stack corruption by unsupported filetests
[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
ac9f49e6
FR
346=item *
347
348F<t/re/overload.t> has been added to test against string corruption in pattern
349matches on overloaded objects. This is a TODO test.
350
e90f0e29
DG
351=back
352
353=head1 Platform Support
354
e90f0e29
DG
355=head2 Platform-Specific Notes
356
e90f0e29
DG
357=over 4
358
09d86ea5 359=item Win32
e90f0e29 360
09d86ea5
FR
361=over 4
362
363=item *
364
365Fixed a possible hang in F<t/op/readline.t>.
366
367=item *
368
123a0cbb 369Fixed build process for SDK2003SP1 compilers.
09d86ea5 370
a98d1b31
FR
371=item *
372
373When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set
374in C<$Config{ccflags}>. This improves portability when compiling XS extensions
375using new compilers, but for a perl compiled with old 32-bit compilers.
376
09d86ea5 377=back
e90f0e29
DG
378
379=back
380
381=head1 Internal Changes
382
e90f0e29
DG
383=over 4
384
09d86ea5 385=item Removed C<PERL_POLLUTE>
e90f0e29 386
09d86ea5
FR
387The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for backwards
388compatibility has been removed. It's use was always discouraged, and MakeMaker
389contains a more specific escape hatch:
390
391 perl Makefile.PL POLLUTE=1
392
393This can be used for modules that have not been upgraded to 5.6 naming
394conventions (and really should be completely obsolete by now).
395
8f7d8cf4
FR
396=item Added C<PERL_STATIC_INLINE>
397
123a0cbb 398The C<PERL_STATIC_INLINE> define has been added to provide the best-guess
8f7d8cf4
FR
399incantation to use for static inline functions, if the C compiler supports
400C99-style static inline. If it doesn't, it'll give a plain C<static>.
401
402C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports
403inline functions.
404
e90f0e29
DG
405=back
406
407=head1 Selected Bug Fixes
408
e90f0e29
DG
409=over 4
410
411=item *
412
48792a70
FR
413A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set
414C<@DB::args> has been fixed.
09d86ea5
FR
415
416=item *
417
418Several memory leaks when loading XS modules were fixed.
e90f0e29 419
5aa76647
FR
420=item *
421
422A panic in the regular expression optimizer has been fixed (RT#75762).
423
424=item *
425
426Assignments to lvalue subroutines now honor copy-on-write behavior again, which
427has been broken since version 5.10.0 (RT#75656).
428
dbce4399
FR
429=item *
430
431Assignments to glob copies now behave just like assignments to regular globs
432(RT#1804).
433
434=item *
435
436Within signal handlers, C<$!> is now implicitly localized.
437
874cd4e1
FR
438=item *
439
440L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied
441arguments.
442
6f3f41ca
FR
443=item *
444
643222e1 445L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">,
6f3f41ca
FR
446L<pos()|perlfunc/"index STR,SUBSTR,POSITION">, L<keys()|perlfunc/"keys HASH">,
447and L<vec()|perlfunc/"vec EXPR,OFFSET,BITS"> could, when used in combination
448with lvalues, result in leaking the scalar value they operate on, and cause its
449destruction to happen too late. This has now been fixed.
450
8f7d8cf4
FR
451=item *
452
453Building with C<PERL_GLOBAL_STRUCT>, which has been broken accidentally in
4545.13.3, now works again.
455
e90f0e29
DG
456=back
457
458=head1 Known Problems
459
e90f0e29
DG
460=over 4
461
462=item *
463
643222e1 464The changes in L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">
e5e6576a
FR
465broke C<HTML::Parser> <= 3.66. A fixed C<HTML::Parser> is available as version
4663.67 on CPAN.
e90f0e29 467
63cf2492
FR
468=item *
469
470The changes in prototype handling break C<Switch>. A patch has been sent
471upstream and will hopefully appear on CPAN soon.
472
e90f0e29
DG
473=back
474
123a0cbb 475=head1 Acknowledgements
e90f0e29 476
123a0cbb
FR
477Perl 5.13.4 represents approximately one month of development since Perl 5.13.3,
478and contains XXX lines of changes across XXX files from XXX authors and
479committers.
e90f0e29 480
123a0cbb 481Thank you to the following for contributing to this release:
e90f0e29
DG
482
483XXX The list of people to thank goes here.
484
485=head1 Reporting Bugs
486
123a0cbb
FR
487If you find what you think is a bug, you might check the articles recently
488posted to the comp.lang.perl.misc newsgroup and the perl bug database at
489http://rt.perl.org/perlbug/ . There may also be information at
490http://www.perl.org/ , the Perl Home Page.
e90f0e29 491
123a0cbb
FR
492If you believe you have an unreported bug, please run the B<perlbug> program
493included with your release. Be sure to trim your bug down to a tiny but
494sufficient test case. Your bug report, along with the output of C<perl -V>,
495will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
e90f0e29
DG
496
497If the bug you are reporting has security implications, which make it
123a0cbb
FR
498inappropriate to send to a publicly archived mailing list, then please send it
499to perl5-security-report@perl.org. This points to a closed subscription
500unarchived mailing list, which includes all the core committers, who be able to
501help assess the impact of issues, figure out a resolution, and help co-ordinate
502the release of patches to mitigate or fix the problem across all platforms on
503which Perl is supported. Please only use this address for security issues in the
504Perl core, not for modules independently distributed on CPAN.
e90f0e29
DG
505
506=head1 SEE ALSO
507
508The F<Changes> file for an explanation of how to view exhaustive details
509on what changed.
510
511The F<INSTALL> file for how to build Perl.
512
513The F<README> file for general stuff.
514
515The F<Artistic> and F<Copying> files for copyright information.
516
517=cut