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