This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge branch 'errno' into blead
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
7a29aa48
FC
3=for comment
4To do:
53f40aba3 Merge branch 'ebcdic' into blead
b65db4bb
FC
6df8c7dee Fix segfault in filehandle duplication
7b66f3475 Fix PerlIO_get_cnt and friends
7a29aa48 8
44691e6f
AB
9=head1 NAME
10
ba03bc34
SH
11[ this is a template for a new perldelta file. Any text flagged as XXX needs
12to be processed before release. ]
13
14perldelta - what is new for perl v5.19.4
e128ab2c 15
4eabcf70 16=head1 DESCRIPTION
6db9054f 17
ba03bc34 18This document describes differences between the 5.19.3 release and the 5.19.4
e08634c5 19release.
6db9054f 20
ba03bc34
SH
21If you are upgrading from an earlier release such as 5.19.2, first read
22L<perl5193delta>, which describes differences between 5.19.2 and 5.19.3.
a3fb66a4 23
ba03bc34 24=head1 Notice
a3fb66a4 25
ba03bc34 26XXX Any important notices here
a3fb66a4 27
ba03bc34 28=head1 Core Enhancements
a3fb66a4 29
ba03bc34
SH
30XXX New core language features go here. Summarize user-visible core language
31enhancements. Particularly prominent performance optimisations could go
32here, but most should go in the L</Performance Enhancements> section.
a3fb66a4 33
ba03bc34 34[ List each enhancement as a =head2 entry ]
a3fb66a4 35
99366d6d 36=head2 C<rand> now uses a consistent random number generator
f1591529 37
99366d6d
SH
38Previously perl would use a platform specific random number generator, varying
39between the libc rand(), random() or drand48().
f1591529 40
99366d6d
SH
41This meant that the quality of perl's random numbers would vary from platform
42to platform, from the 15 bits of rand() on Windows to 48-bits on POSIX
43platforms such as Linux with drand48().
f1591529 44
99366d6d 45Perl now uses its own internal drand48() implementation on all platforms.
791f8f9a 46This does not make perl's rand() cryptographically secure. [perl #115928]
f1591529 47
f2ab313d 48=head2 Better 64-bit support
18ae6bbc
FC
49
50On 64-bit platforms, the internal array functions now use 64-bit offsets,
99366d6d
SH
51allowing Perl arrays to hold more than 2**31 elements, if you have the memory
52available.
18ae6bbc 53
99366d6d 54The regular expression engine now supports strings longer than 2**31
f2ab313d
FC
55characters. [perl #112790, #116907]
56
f53b57fd
FC
57=head2 New slice syntax
58
99366d6d
SH
59The new C<%hash{...}> and C<@array[...]> syntax returns a list of key/value (or
60index/value) pairs.
f53b57fd 61
ba03bc34 62=head1 Security
a3fb66a4 63
ba03bc34
SH
64XXX Any security-related notices go here. In particular, any security
65vulnerabilities closed should be noted here rather than in the
66L</Selected Bug Fixes> section.
4725e868 67
ba03bc34 68[ List each security issue as a =head2 entry ]
a3fb66a4 69
ba03bc34 70=head1 Incompatible Changes
a3fb66a4 71
e1c60bf3 72=head2 Locale decimal point character no longer leaks outside of
99366d6d 73S<C<use locale>> scope (with the exception of $!)
e46375fa 74
e1c60bf3
SH
75This is actually a bug fix, but some code has come to rely on the bug being
76present, so this change is listed here. The current locale that the program is
77running under is not supposed to be visible to Perl code except within the
78scope of a S<C<use locale>>. However, until now under certain circumstances,
79the character used for a decimal point (often a comma) leaked outside the
80scope.
e46375fa 81
e1c60bf3
SH
82This continues the work released in Perl 5.19.1. It turns out that that did
83not catch all the leaks, including C<printf> and C<sprintf> not respecting
84S<C<use locale>>. If your code is affected by this change, simply add a
85S<C<use locale>>.
e46375fa 86
99366d6d 87Now, the only known place where S<C<use locale>> is not respected is in the
e1c60bf3 88stringification of L<$!|perlvar/$!>.
a3fb66a4 89
ba03bc34 90=head1 Deprecations
a3fb66a4 91
ba03bc34 92XXX Any deprecated features, syntax, modules etc. should be listed here.
a3fb66a4 93
ba03bc34 94=head2 Module removals
4725e868 95
ba03bc34 96XXX Remove this section if inapplicable.
669d990b 97
ba03bc34
SH
98The following modules will be removed from the core distribution in a
99future release, and will at that time need to be installed from CPAN.
100Distributions on CPAN which require these modules will need to list them as
101prerequisites.
669d990b 102
ba03bc34
SH
103The core versions of these modules will now issue C<"deprecated">-category
104warnings to alert you to this fact. To silence these deprecation warnings,
105install the modules in question from CPAN.
669d990b 106
ba03bc34
SH
107Note that these are (with rare exceptions) fine modules that you are encouraged
108to continue to use. Their disinclusion from core primarily hinges on their
109necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
110not usually on concerns over their design.
2cf99697 111
ba03bc34 112=over
2cf99697 113
ba03bc34
SH
114XXX Note that deprecated modules should be listed here even if they are listed
115as an updated module in the L</Modules and Pragmata> section.
21d55435 116
ba03bc34 117=back
0f0eae2c 118
ba03bc34 119[ List each other deprecation as a =head2 entry ]
21d55435 120
ba03bc34 121=head1 Performance Enhancements
a3fb66a4 122
ba03bc34 123=over 4
a3fb66a4 124
2c99af42
SH
125=item *
126
e1c60bf3
SH
127The trie performance enhancement for regular expressions has now been extended
128to those compiled under C</iaa>.
2c99af42 129
c0ca71c9 130=back
42bff0d9 131
ba03bc34 132=head1 Modules and Pragmata
195e3ea0 133
ba03bc34
SH
134XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
135go here. If Module::CoreList is updated, generate an initial draft of the
136following sections using F<Porting/corelist-perldelta.pl>, which prints stub
137entries to STDOUT. Results can be pasted in place of the '=head2' entries
138below. A paragraph summary for important changes should then be added by hand.
139In an ideal world, dual-life modules would have a F<Changes> file that could be
140cribbed.
195e3ea0 141
ba03bc34 142[ Within each section, list entries as a =item entry ]
195e3ea0 143
ba03bc34 144=head2 New Modules and Pragmata
195e3ea0
SH
145
146=over 4
147
148=item *
149
ba03bc34 150XXX
195e3ea0
SH
151
152=back
153
ba03bc34 154=head2 Updated Modules and Pragmata
42bff0d9 155
38663f11 156=over 4
42bff0d9
DG
157
158=item *
159
082a4c42
SH
160L<autodie> has been upgraded from version 2.20 to 2.21.
161
162Numerous improvements have been made, many speed-related. See the F<Changes>
163file in the CPAN distribution for full details.
164
165=item *
166
8c24c1f7 167L<B> has been upgraded from version 1.45 to 1.46.
00c5962f
TC
168
169The fix for [perl #118525] introduced a regression in the behaviour of
e1c60bf3 170C<B::CV::GV>, changing the return value from a C<B::SPECIAL> object on a
99366d6d
SH
171C<NULL> C<CvGV> to C<undef>. C<B::CV::GV> again returns a C<B::SPECIAL> object
172in this case. [perl #119351]
00c5962f
TC
173
174=item *
175
8c24c1f7
SH
176L<B::Concise> has been upgraded from version 0.98 to 0.99.
177
479090d3
SH
178The handling of the C<glob> operator, broken since Perl 5.17.6, has been fixed
179and handling of the new kvaslice and kvhslice operators have been added.
180
181=item *
182
183L<B::Deparse> has been upgraded from version 1.22 to 1.23.
184
185The new kvaslice and kvhslice operators have been added.
8c24c1f7
SH
186
187=item *
188
d5dcec3a
Z
189L<Carp> has been upgraded from version 1.31 to 1.32.
190
6ffbec2c
Z
191=over 4
192
193=item *
194
e1c60bf3
SH
195In stack traces, subroutine arguments that are strings are now quoted in a
196consistent manner, regardless of what characters they contain and how they're
197internally represented.
6ffbec2c
Z
198
199=item *
200
99366d6d 201C<Carp> now takes care not to clobber the status variables $! and $^E.
0a9b5e6e
FC
202
203=item *
204
bf4588d0 205C<Carp> now won't vivify the C<overload::StrVal> glob or subroutine or the
bd098b9a 206C<overload> stash.
6ffbec2c
Z
207
208=item *
209
e1c60bf3 210C<Carp> now avoids some unwanted Unicode warnings on older Perls. This doesn't
99366d6d 211affect behaviour with current Perls.
6ffbec2c
Z
212
213=item *
214
e1c60bf3
SH
215C<Carp::Heavy> detects version mismatch with C<Carp>, to give a good error
216message if a current (stub) C<Carp::Heavy> gets loaded by an old C<Carp> that
217expects C<Carp::Heavy> to provide subroutines.
d5dcec3a 218
6ffbec2c
Z
219=back
220
c963f488
SH
221=item *
222
3a76eb28
SH
223L<charnames> has been upgraded from version 1.38 to 1.39.
224
225This module now works on EBCDIC platforms.
226
227=item *
228
53bb269a
SH
229L<CPAN::Meta> has been upgraded from version 2.132140 to 2.132510.
230
231No changes have been made to the installed code other than the version bump to
232keep in sync with the latest CPAN release.
233
234=item *
235
202c41cb
SH
236L<CPAN::Meta::Requirements> has been upgraded from version 2.122 to 2.123.
237
e1c60bf3
SH
238No changes have been made to the installed code other than the version bump to
239keep in sync with the latest CPAN release.
202c41cb
SH
240
241=item *
242
8c24c1f7
SH
243L<Data::Dumper> has been upgraded from version 2.148 to 2.149.
244
5b903226
SH
245This upgrade is part of a larger change to make the array interface 64-bit safe
246by using SSize_t instead of I32 for array indices.
8c24c1f7 247
2f92fb87
SH
248In addition, an EBCDIC fix has been applied.
249
8c24c1f7
SH
250=item *
251
252L<Devel::Peek> has been upgraded from version 1.13 to 1.14.
253
5b903226
SH
254This upgrade is part of a larger change to preserve referential identity when
255passing C<undef> to a subroutine by using NULL rather than &PL_sv_undef for
256nonexistent array elements.
8c24c1f7 257
2f92fb87
SH
258In addition, C<Dump> with no args was broken in Perl 5.19.3, but has now been
259fixed.
260
8c24c1f7
SH
261=item *
262
263L<DynaLoader> has been upgraded from version 1.19 to 1.20.
264
5b903226
SH
265The documentation now makes it clear, as has always been the case, that
266C<dl_unload_file> is only called automatically to unload all loaded shared
267objects if the perl interpreter was built with the C macro
b228daaa 268DL_UNLOAD_ALL_AT_EXIT defined. Support for GNU DLD has also been removed.
5b903226
SH
269
270=item *
271
369b9ffe 272L<Encode> has been upgraded from version 2.52 to 2.55.
f2c09143
SH
273
274An erroneous early return in C<decode_utf8> has been removed, and a bug in
369b9ffe
SH
275C<_utf8_on> under COW has been fixed. Encode also now uses L<parent> rather
276than L<base> throughout.
f2c09143
SH
277
278=item *
279
33826e50
SH
280L<Exporter> has been upgraded from version 5.69 to 5.70.
281
282A number of typos have been corrected in the documentation.
283
284=item *
285
a0e78e9f 286L<ExtUtils::CBuilder> has been upgraded from version 0.280205 to 0.280212.
2f92fb87 287
a0e78e9f
SH
288No changes have been made to the installed code other than the version bump to
289keep in sync with the latest CPAN release.
2f92fb87
SH
290
291=item *
292
33826e50
SH
293L<ExtUtils::Command> has been upgraded from version 1.17 to 1.18.
294
295No changes have been made to the installed code other than the version bump to
296keep in sync with the latest CPAN release.
297
298=item *
299
3a76eb28 300L<ExtUtils::MakeMaker> has been upgraded from version 6.72 to 6.76.
5b903226
SH
301
302Numerous updates and bug fixes are incorporated. See the F<Changes> file for
303full details.
8c24c1f7
SH
304
305=item *
306
1d0e852c 307L<ExtUtils::ParseXS> has been upgraded from version 3.21 to 3.23.
f2c09143 308
99366d6d
SH
309Unquoted "here-doc" markers for typemaps can now be optionally followed by a
310semicolon, just like quoted markers. [perl #119761]
f2c09143
SH
311
312=item *
313
77f1e6e4
SH
314L<File::Find> has been upgraded from version 1.24 to 1.25.
315
316Better diagnostics are now provided in the case of a failed C<chdir>.
317
318=item *
319
610ee5e3
TC
320L<File::Glob> has been upgraded from version 1.20 to 1.21.
321
99366d6d
SH
322C<glob> now warns in the context of C<use warnings "syscalls";> if the supplied
323pattern has an internal NUL (C<"\0">) character.
610ee5e3 324
d5dcec3a
Z
325=item *
326
479090d3
SH
327L<FileCache> has been upgraded from version 1.08 to 1.09.
328
329This upgrade is part of a larger change to use L<parent> rather than L<base>.
330
331=item *
332
333L<Hash::Util::FieldHash> has been upgraded from version 1.12 to 1.13.
334
335This upgrade is part of a larger change to use L<parent> rather than L<base>.
336
337=item *
338
0f07ea36 339L<HTTP::Tiny> has been upgraded from version 0.034 to 0.035.
4403b774
SH
340
341Encoded data from C<post_form> now preserves term order if data is provided as
342an array reference. (They are still sorted for consistency if provided as a
343hash reference.)
344
345=item *
346
3a76eb28
SH
347L<I18N::LangTags> has been upgraded from version 0.39 to 0.40.
348
349Bosnian has now joined Croatian and Serbian in the lists of mutually
99366d6d 350intelligible Slavic languages. [perl #72594]
3a76eb28
SH
351
352=item *
353
77f1e6e4
SH
354L<IO> has been upgraded from version 1.28 to 1.29.
355
356A minor internals-only change has been made to the XS code.
357
358=item *
359
e1c60bf3 360L<IPC::Open3> has been upgraded from version 1.15 to 1.16.
8c24c1f7 361
5b903226
SH
362This upgrade is part of a larger change to preserve referential identity when
363passing C<undef> to a subroutine by using NULL rather than &PL_sv_undef for
364nonexistent array elements.
8c24c1f7
SH
365
366=item *
367
a0109759
SH
368L<Locale::Codes> has been upgraded from version 3.26 to 3.27.
369
370New codes have been added and the (deprecated) set of FIPS-10 country codes has
371been removed.
372
373=item *
374
a8479f0e
TC
375L<Math::BigInt> has been upgraded from version 1.9992 to 1.9993.
376
e1c60bf3 377Cleaned up the L<Math::BigInt> and L<Math::BigFloat> documentation to be more
99366d6d 378consistent with other Perl documentation. [perl #86686]
a8479f0e 379
99366d6d 380Added a C<bint> method for rounding towards zero. [perl #85296]
a8479f0e
TC
381
382=item *
383
8c24c1f7
SH
384L<Math::BigInt::FastCalc> has been upgraded from version 0.30 to 0.31.
385
5b903226
SH
386This upgrade is part of a larger change to make the array interface 64-bit safe
387by using SSize_t instead of I32 for array indices.
8c24c1f7
SH
388
389=item *
390
37287258
SH
391L<Module::CoreList> has been upgraded from version 2.97 to 2.98.
392
393The list of Perl versions covered has been updated.
1fdd5e53 394
68cdd4b5
SH
395=item *
396
6c52f6c9 397L<Module::Load::Conditional> has been upgraded from version 0.54 to 0.58.
0022aab5 398
99366d6d 399C<requires> has been made more robust. [cpan #83728]
0022aab5
SH
400
401=item *
402
979f1f2b 403L<Module::Metadata> has been upgraded from version 1.000014 to 1.000018.
68cdd4b5
SH
404
405The module's DESCRIPTION has been re-worded regarding safety/security to
99366d6d 406satisfy CVE-2013-1437. Also, versions are now detainted if needed. [cpan
bff978fa 407#88576]
68cdd4b5 408
93f72154
SH
409=item *
410
e1c60bf3 411L<mro> has been upgraded from version 1.13 to 1.14.
8c24c1f7 412
5b903226
SH
413This upgrade is part of a larger change to make the array interface 64-bit safe
414by using SSize_t instead of I32 for array indices.
8c24c1f7
SH
415
416=item *
417
479090d3
SH
418L<Opcode> has been upgraded from version 1.25 to 1.26.
419
420The new kvaslice and kvhslice operators have been added.
421
422=item *
423
e1c60bf3
SH
424L<parent> has been upgraded from version 0.226 to 0.227.
425
426No changes have been made to the installed code other than the version bump to
427keep in sync with the latest CPAN release.
428
429=item *
430
545c8cda
SH
431L<Parse::CPAN::Meta> has been upgraded from version 1.4405 to 1.4407.
432
433No changes have been made to the installed code other than the version bump to
434keep in sync with the latest CPAN release.
435
436=item *
437
ba58de91 438L<Perl::OSType> has been upgraded from version 1.003 to 1.005.
93f72154
SH
439
440The Unix OSType 'bitrig' has been added.
441
8c24c1f7
SH
442=item *
443
dd741cc9
SH
444L<perlfaq> has been upgraded from version 5.0150043 to 5.0150044.
445
446The use of C<gensym> in a number of examples has been removed, the use of C<&>
447in subroutine calls is now clarified and several new questions have been
448answered.
449
450=item *
451
479090d3
SH
452L<Pod::Html> has been upgraded from version 1.20 to 1.21.
453
454This upgrade is part of a larger change to use L<parent> rather than L<base>.
455
456=item *
457
8c24c1f7
SH
458L<re> has been upgraded from version 0.25 to 0.26.
459
94902151
SH
460This upgrade is part of a larger change to support 64-bit string lengths in the
461regular expression engine.
8c24c1f7
SH
462
463=item *
464
e1c60bf3
SH
465L<Scalar::Util> has been upgraded from version 1.31 to 1.32.
466
467The documentation of C<blessed> has been improved to mention the fact that
468package "0" is defined but false.
469
470=item *
471
406cccc2
SH
472L<Socket> has been upgraded from version 2.011 to 2.012.
473
99366d6d
SH
474Syntax errors when building on the WinCE platform have been fixed. [cpan
475#87389]
406cccc2
SH
476
477=item *
478
8c24c1f7
SH
479L<Storable> has been upgraded from version 2.46 to 2.47.
480
5b903226
SH
481This upgrade is part of a larger change to preserve referential identity when
482passing C<undef> to a subroutine by using NULL rather than &PL_sv_undef for
483nonexistent array elements.
8c24c1f7
SH
484
485=item *
486
2f92fb87
SH
487L<Term::ReadLine> has been upgraded from version 1.10 to 1.14.
488
489Term::ReadLine::EditLine support has been added.
490
491=item *
492
3a76eb28
SH
493L<Time::Piece> has been upgraded from version 1.22 to 1.23.
494
495Day of year parsing (like "%y%j") has been fixed.
496
497=item *
498
60f577e0
SH
499L<Unicode::Collate> has been upgraded from version 0.98 to 0.99.
500
e1c60bf3
SH
501By default, out-of-range values are replaced with C<U+FFFD> (REPLACEMENT
502CHARACTER) when C<UCA_Version> E<gt>= 22, or ignored when C<UCA_Version> E<lt>=
50320. When C<UCA_Version> E<gt>= 22, the weights of out-of-range values can be
504overridden.
60f577e0
SH
505
506=item *
507
3a76eb28
SH
508L<Unicode::UCD> has been upgraded from version 0.53 to 0.54.
509
510This module now works on EBCDIC platforms.
511
512=item *
513
5565c738
SH
514L<version> has been upgraded from version 0.9903 to 0.9904.
515
516No changes have been made to the installed code other than the version bump to
517keep in sync with the latest CPAN release.
518
519=item *
520
8c24c1f7
SH
521L<warnings> has been upgraded from version 1.18 to 1.19.
522
5b903226 523The C<syscalls> warnings category has been added to check for embedded NUL
b8f07b9f 524(C<"\0">) characters in pathnames and string arguments to other system calls.
8c24c1f7
SH
525
526=item *
527
528L<XS::Typemap> has been upgraded from version 0.10 to 0.11.
529
6d53e62b
SH
530This upgrade is part of the change to remove the uninitialized warnings
531exemption for uninitialized values returned by XSUBs (see the L</Selected Bug
532Fixes> section).
99366d6d 533
583aa5c2
RS
534=back
535
ba03bc34 536=head2 Removed Modules and Pragmata
a3fb66a4
SH
537
538=over 4
539
540=item *
541
ba03bc34 542XXX
a3fb66a4
SH
543
544=back
545
ba03bc34 546=head1 Documentation
8fecfff0 547
ba03bc34
SH
548XXX Changes to files in F<pod/> go here. Consider grouping entries by
549file and be sure to link to the appropriate page, e.g. L<perlfunc>.
8fecfff0 550
ba03bc34 551=head2 New Documentation
8fecfff0 552
1944fb52 553=head3 L<perlrepository>
195e3ea0 554
1944fb52
SH
555This document was removed (actually, renamed L<perlgit> and given a major
556overhaul) in Perl 5.13.10, causing Perl documentation websites to show the now
557out of date version in Perl 5.12 as the latest version. It has now been
558restored in stub form, directing readers to current information.
195e3ea0 559
ba03bc34 560=head2 Changes to Existing Documentation
195e3ea0 561
1944fb52
SH
562=head3 L<perldata>
563
564=over 4
565
566=item *
567
568New sections have been added to document the new index/value array slice and
569key/value hash slice syntax.
570
a71a93a7
TC
571=item *
572
573Briefly documented the C<&DB::goto> and C<&DB::lsub> debugger
574subroutines in L<perldebguts> [perl #77680]
575
576=item *
577
578L<perlsub> now includes a list of subroutine names used by the perl
579implementation. [perl #77680]
580
1944fb52
SH
581=back
582
583=head3 L<perlguts>
584
585=over 4
586
587=item *
588
589Numerous minor changes have been made to reflect changes made to the perl
590internals in this release.
591
592=back
195e3ea0 593
1944fb52 594=head3 L<perlhack>
a3fb66a4
SH
595
596=over 4
597
598=item *
599
1944fb52
SH
600The L<SUPER QUICK PATCH GUIDE|perlhack/SUPER QUICK PATCH GUIDE> section has
601been updated.
a3fb66a4
SH
602
603=back
604
c0ca71c9
AP
605=head1 Diagnostics
606
607The following additions or changes have been made to diagnostic output,
608including warnings and fatal error messages. For the complete list of
609diagnostic messages, see L<perldiag>.
610
ba03bc34
SH
611XXX New or changed warnings emitted by the core's C<C> code go here. Also
612include any changes in L<perldiag> that reconcile it to the C<C> code.
613
c0ca71c9
AP
614=head2 New Diagnostics
615
ba03bc34
SH
616XXX Newly added diagnostic messages go under here, separated into New Errors
617and New Warnings
618
12dcbffb 619=head3 New Errors
583aa5c2 620
38663f11 621=over 4
583aa5c2 622
b8a02ff1 623=item *
583aa5c2 624
35d27e9c 625L<delete argument is indexE<sol>value array slice, use array slice|perldiag/"delete argument is index/value array slice, use array slice">
4a0af295
SH
626
627(F) You used index/value array slice syntax (C<%array[...]>) as the argument to
628C<delete>. You probably meant C<@array[...]> with an @ symbol instead.
629
630=item *
631
35d27e9c 632L<delete argument is keyE<sol>value hash slice, use hash slice|perldiag/"delete argument is key/value hash slice, use hash slice">
4a0af295
SH
633
634(F) You used key/value hash slice syntax (C<%hash{...}>) as the argument to
635C<delete>. You probably meant C<@hash{...}> with an @ symbol instead.
636
637=item *
638
639L<delete argument is not a HASH or ARRAY element or slice|perldiag/"delete argument is not a HASH or ARRAY element or slice">
640
641(F) The argument to C<delete> must be either a hash or array element, such as:
642
643 $foo{$bar}
644 $ref->{"susie"}[12]
645
646or a hash or array slice, such as:
647
648 @foo[$bar, $baz, $xyzzy]
649 @{$ref->[12]}{"susie", "queue"}
650
651=item *
652
653L<exists argument is not a HASH or ARRAY element or a subroutine|perldiag/"exists argument is not a HASH or ARRAY element or a subroutine">
654
655(F) The argument to C<exists> must be a hash or array element or a subroutine
656with an ampersand, such as:
657
658 $foo{$bar}
659 $ref->{"susie"}[12]
660 &do_something
661
662=item *
663
664L<exists argument is not a subroutine name|perldiag/"exists argument is not a subroutine name">
665
666(F) The argument to C<exists> for C<exists &sub> must be a subroutine name, and
667not a subroutine call. C<exists &sub()> will generate this error.
583aa5c2 668
b8a02ff1 669=back
583aa5c2 670
12dcbffb 671=head3 New Warnings
96d496e4 672
38663f11 673=over 4
b8a02ff1
DG
674
675=item *
676
610ee5e3
TC
677L<Invalid \0 character in %s for %s: %s\0%s|perldiag/"Invalid \0 character in %s for %s: %s\0%s">
678
b8f07b9f 679(W syscalls) Embedded \0 characters in pathnames or other system call arguments
99366d6d 680produce a warning as of 5.20. The parts after the \0 were formerly ignored by
b8f07b9f 681system calls.
487a71ff 682
4a0af295
SH
683=item *
684
685L<Possible precedence issue with control flow operator|perldiag/"Possible precedence issue with control flow operator">
686
687(W syntax) There is a possible problem with the mixing of a control flow
688operator (e.g. C<return>) and a low-precedence operator like C<or>. Consider:
689
690 sub { return $a or $b; }
691
692This is parsed as:
693
694 sub { (return $a) or $b; }
695
696Which is effectively just:
697
698 sub { return $a; }
699
700Either use parentheses or the high-precedence variant of the operator.
701
702Note this may be also triggered for constructs like:
703
704 sub { 1 if die; }
705
706=item *
707
708L<Scalar value %%s[%s] better written as $%s[%s]|perldiag/"Scalar value %%s[%s] better written as $%s[%s]">
709
710(W syntax) In scalar context, you've used an array index/value slice (indicated
711by %) to select a single element of an array. Generally it's better to ask for
712a scalar value (indicated by $). The difference is that C<$foo[&bar]> always
713behaves like a scalar, both in the value it returns and when evaluating its
714argument, while C<%foo[&bar]> provides a list context to its subscript, which
715can do weird things if you're expecting only one subscript. When called in
716list context, it also returns the index (what C<&bar> returns) in addition to
717the value.
718
719=item *
720
721L<Scalar value %%s{%s} better written as $%s{%s}|perldiag/"Scalar value %%s{%s} better written as $%s{%s}">
722
723(W syntax) In scalar context, you've used a hash key/value slice (indicated by
724%) to select a single element of a hash. Generally it's better to ask for a
725scalar value (indicated by $). The difference is that C<$foo{&bar}> always
726behaves like a scalar, both in the value it returns and when evaluating its
727argument, while C<@foo{&bar}> and provides a list context to its subscript,
728which can do weird things if you're expecting only one subscript. When called
729in list context, it also returns the key in addition to the value.
730
12dcbffb 731=back
1310e590 732
ba03bc34
SH
733=head2 Changes to Existing Diagnostics
734
735XXX Changes (i.e. rewording) of diagnostic messages go here
e727f86a 736
12dcbffb 737=over 4
e727f86a 738
81ca6d44
FC
739=item *
740
c1d900c3
BF
741Warnings and errors from the regexp engine are now UTF-8 clean
742
743=item *
744
99366d6d
SH
745The "Unknown switch condition" error message has some slight changes. This
746error triggers when there is an unknown condition in a C<(?(foo))> conditional.
747The error message used to read:
c1d900c3
BF
748
749 Unknown switch condition (?(%s in regex;
750
99366d6d
SH
751But what %s could be was mostly up to luck. For C<(?(foobar))>, you might have
752seen "fo" or "f". For Unicode characters, you would generally get a corrupted
753string. The message has been changed to read:
c1d900c3
BF
754
755 Unknown switch condition (?(...)) in regex;
756
99366d6d
SH
757Additionally, the C<'E<lt>-- HERE'> marker in the error will now point to the
758correct spot in the regex.
e38fc308 759
4a0af295
SH
760=item *
761
762The "%s "\x%X" does not map to Unicode" warning is now correctly listed as a
763severe warning rather than as a fatal error.
764
ba03bc34 765=back
a34da6c4 766
ba03bc34 767=head1 Utility Changes
a34da6c4 768
ba03bc34
SH
769XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
770Most of these are built within the directories F<utils> and F<x2p>.
558673e6 771
ba03bc34
SH
772[ List utility changes as a =head3 entry for each utility and =item
773entries for each change
774Use L<XXX> with program names to get proper documentation linking. ]
558673e6 775
b2d74da6 776=head3 L<find2perl>
47a7c93d 777
12dcbffb 778=over 4
b5a80c26 779
7f1d4316
FC
780=item *
781
99366d6d 782L<find2perl> now handles C<?> wildcards correctly. [perl #113054]
7f1d4316 783
ba03bc34 784=back
ef947715 785
ba03bc34 786=head1 Configuration and Compilation
ef947715 787
ba03bc34
SH
788XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
789go here. Any other changes to the Perl build process should be listed here.
790However, any platform-specific changes should be listed in the
791L</Platform Support> section, instead.
02bef66e 792
ba03bc34 793[ List changes as a =item entry ].
d30fb844 794
12dcbffb 795=over 4
21c01741 796
467582e8
FC
797=item *
798
e1c60bf3
SH
799The F<Makefile.PL> for C<SDBM_File> now generates a better F<Makefile>, which
800avoids a race condition during parallel makes, which could cause the build to
801fail. This is the last known parallel make problem (on *nix platforms), and
802therefore we believe that a parallel make should now always be error free.
4d106cc5
NC
803
804=for comment
805
806Strictly only for a build where build files such as F<Makefile.SH> have not
807been updated by C<git> in an already configured and built tree.
467582e8 808
ba03bc34 809=back
64da853d 810
ba03bc34 811=head1 Testing
8847717e 812
ba03bc34
SH
813XXX Any significant changes to the testing of a freshly built perl should be
814listed here. Changes which create B<new> files in F<t/> go here as do any
815large changes to the testing harness (e.g. when parallel testing was added).
816Changes to existing files in F<t/> aren't worth summarizing, although the bugs
817that they represent may be covered elsewhere.
8847717e 818
ba03bc34 819[ List each test improvement as a =item entry ]
f1b856da 820
ba03bc34 821=over 4
f1b856da 822
eaed284b
FC
823=item *
824
5b903226 825The test script F<t/bigmem/regexp.t> has been added to test that regular
28f52e64 826expression matches on very large strings now succeed as expected.
8c24c1f7
SH
827
828=item *
829
b895ac6f
SH
830The new test scripts F<t/op/kvaslice.t> and F<t/op/kvhslice.t> test the new
831index/value array slice and key/value hash slice syntax respectively.
832
833=item *
834
5b903226
SH
835Various cases of C<die>, C<last>, C<goto> and C<exit> triggering C<DESTROY> are
836now tested by the new test script F<t/op/rt119311.t>.
8c24c1f7
SH
837
838=item *
839
b895ac6f
SH
840The latest copyright years in the top-level F<README> file and the B<perl -v>
841output are now tested as matching each other by the new test script
842F<t/porting/copyright.t>
843
844=item *
845
99366d6d
SH
846The new test script F<t/win32/signal.t> tests that $! and $^E are now preserved
847across signal handlers by the Win32 signal emulation code.
8c24c1f7
SH
848
849=item *
850
5b903226
SH
851The test script F<t/x2p/find2perl.t> has been added to test the F<find2perl>
852program on platforms where it is practical to do so.
eaed284b 853
ba03bc34 854=back
0335212c 855
ba03bc34 856=head1 Platform Support
0335212c 857
ba03bc34 858XXX Any changes to platform support should be listed in the sections below.
c3e455cf 859
ba03bc34
SH
860[ Within the sections, list each platform as a =item entry with specific
861changes as paragraphs below it. ]
c3e455cf 862
ba03bc34 863=head2 New Platforms
019705bc 864
ba03bc34
SH
865XXX List any platforms that this version of perl compiles on, that previous
866versions did not. These will either be enabled by new files in the F<hints/>
867directories, or new subdirectories and F<README> files at the top level of the
868source tree.
019705bc 869
ba03bc34 870=over 4
25921d77 871
44d412d1 872=item Bitrig
25921d77 873
489ee6b6 874Compile support has been added for Bitrig, a fork of OpenBSD.
28ea507e 875
ba03bc34 876=back
28ea507e 877
ba03bc34 878=head2 Discontinued Platforms
28ea507e 879
99366d6d
SH
880Configure hints and conditional code for several very old platforms has been
881removed. We have not received reports for these in many years, typically not
882since Perl 5.6.0.
7b0e9f13 883
ba03bc34 884=over 4
074d6753 885
7b0e9f13 886=item AT&T 3b1
074d6753 887
99366d6d
SH
888Configure support for the 3b1, also known as the AT&T Unix PC (and the similar
889AT&T 7300), has been removed.
4e5b563d 890
ba03bc34 891=back
4e5b563d 892
ba03bc34 893=head2 Platform-Specific Notes
ee818f56 894
ba03bc34
SH
895XXX List any changes for specific platforms. This could include configuration
896and compilation changes or changes in portability/compatibility. However,
897changes within modules for platforms should generally be listed in the
898L</Modules and Pragmata> section.
ee818f56 899
ba03bc34 900=over 4
c054cc81 901
8c24c1f7 902=item WinCE
c054cc81 903
99366d6d 904The building of XS modules has largely been restored. Several still cannot
5b903226
SH
905(yet) be built but it is now possible to build Perl on WinCE with only a couple
906of further patches (to L<Socket> and L<ExtUtils::MakeMaker>), hopefully to be
907incorporated soon.
efcbb8b2 908
846aaad8
CBW
909=item GNU/Hurd
910
911The BSD compatibility library C<libbsd> is no longer required for builds.
912
ba03bc34 913=back
efcbb8b2 914
ba03bc34 915=head1 Internal Changes
36813eeb 916
ba03bc34
SH
917XXX Changes which affect the interface available to C<XS> code go here. Other
918significant internal changes for future core maintainers should be noted as
919well.
36813eeb 920
ba03bc34 921[ List each change as a =item entry ]
52937067 922
ba03bc34 923=over 4
52937067 924
6760cac5
FC
925=item *
926
99366d6d
SH
927The internal representation has changed for the match variables $1, $2 etc.,
928$`, $&, $', ${^PREMATCH}, ${^MATCH} and ${^POSTMATCH}. It uses slightly less
929memory, avoids string comparisons and numeric conversions during lookup, and
930uses 23 fewer lines of C. This change should not affect any external code.
671f9ff7 931
c2ee494e
FC
932=item *
933
934Arrays now use NULL internally to represent unused slots, instead of
99366d6d
SH
935&PL_sv_undef. &PL_sv_undef is no longer treated as a special value, so
936av_store(av, 0, &PL_sv_undef) will cause element 0 of that array to hold a
937read-only undefined scalar. C<$array[0] = anything> will croak and
c2ee494e
FC
938C<\$array[0]> will compare equal to C<\undef>.
939
6a67a797
TC
940=item *
941
942The SV returned by HeSVKEY_force() now correctly reflects the UTF8ness
943of the underlying hash key when that key is not stored as a SV. [perl
944#79074]
945
ba03bc34 946=back
671f9ff7 947
ba03bc34 948=head1 Selected Bug Fixes
912a9a8f 949
ba03bc34
SH
950XXX Important bug fixes in the core language are summarized here. Bug fixes in
951files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
912a9a8f 952
ba03bc34 953[ List each fix as a =item entry ]
0d25b9d4 954
ba03bc34 955=over 4
0d25b9d4 956
a82207ba
FC
957=item *
958
99366d6d 959The value of $^E is now saved across signal handlers on Windows. [perl #85104]
18e2e6cd 960
85037c5c
FC
961=item *
962
99366d6d
SH
963A lexical filehandle (as in C<open my $fh...>) is usually given a name based on
964the current package and the name of the variable, e.g. "main::$fh". Under
965recursion, the filehandle was losing the "$fh" part of the name. This has been
966fixed.
85037c5c 967
0664879b
FC
968=item *
969
99366d6d
SH
970Perl 5.19.3 accidentally extended the previous bug to all closures, even when
971not called recursively, i.e. lexical handles in closure would always be called
972"main::" or "MyPackage::" etc. This has been fixed.
0664879b 973
343e7167
FC
974=item *
975
99366d6d
SH
976Uninitialized values returned by XSUBs are no longer exempt from uninitialized
977warnings. [perl #118693]
343e7167 978
1261f9a2
FC
979=item *
980
99366d6d 981C<elsif ("")> no longer erroneously produces a warning about void context.
1261f9a2
FC
982[perl #118753]
983
c2ee494e
FC
984=item *
985
99366d6d
SH
986Passing C<undef> to a subroutine now causes @_ to contain the same read-only
987undefined scalar that C<undef> returns. Furthermore, C<exists $_[0]> will now
988return true if C<undef> was the first argument. [perl #7508, #109726]
c2ee494e 989
21c314ca
FC
990=item *
991
99366d6d
SH
992Passing a nonexistent array element to a subroutine does not usually autovivify
993it unless the subroutine modifies its argument. This did not work correctly
994with negative indices and with nonexistent elements within the array. The
995element would be vivified immediately. The delayed vivification has been
996extended to work with those. [perl #118691]
21c314ca 997
7a7c28da
FC
998=item *
999
99366d6d
SH
1000Assigning references or globs to the scalar returned by $#foo after the @foo
1001array has been freed no longer causes assertion failures on debugging builds
1002and memory leaks on regular builds.
7a7c28da 1003
8bdbe216
FC
1004=item *
1005
99366d6d
SH
1006Perl 5.19.2 threw line numbers off after some cases of line breaks following
1007keywords, such as
8bdbe216
FC
1008
1009 1 unless
1010 1;
1011
1012This has been fixed. [perl #118931]
1013
96c0ab99
FC
1014=item *
1015
99366d6d
SH
1016On 64-bit platforms, large ranges like 1..1000000000000 no longer crash, but
1017eat up all your memory instead. [perl #119161]
96c0ab99 1018
c2823449
FC
1019=item *
1020
1021C<__DATA__> now puts the C<DATA> handle in the right package, even if the
1022current package has been renamed through glob assignment.
1023
ab82aa51
FC
1024=item *
1025
1026The string position set by C<pos> could shift if the string changed
1027representation internally to or from utf8. This could happen, e.g., with
1028references to objects with string overloading.
1029
c4403db5
FC
1030=item *
1031
cabe2f6f
FC
1032Taking references to the return values of two C<pos> calls with the same
1033argument, and then assigning a reference to one and C<undef> to the other,
1034could result in assertion failures or memory leaks.
1035
1036=item *
1037
99366d6d
SH
1038Elements of @- and @+ now update correctly when they refer to nonexistent
1039captures. Previously, a referenced element (C<$ref = \$-[1]>) could refer to
1040the wrong match after subsequent matches.
c4403db5 1041
e7f2d651
FC
1042=item *
1043
99366d6d
SH
1044When C<die>, C<last>, C<next>, C<redo>, C<goto> and C<exit> unwind the scope,
1045it is possible for C<DESTROY> recursively to call a subroutine or format that
1046is currently being exited. It that case, sometimes the lexical variables
1047inside the sub would start out having values from the outer call, instead of
1048being undefined as they should. This has been fixed. [perl #119311]
e7f2d651 1049
d66ad208
FC
1050=item *
1051
99366d6d 1052${^MPEN} is no longer treated as a synonym for ${^MATCH}.
d66ad208 1053
ab70e266
FC
1054=item *
1055
1056Perl now tries a little harder to return the correct line number in
1057C<(caller)[2]>. [perl #115768]
1058
ae66f305
FC
1059=item *
1060
99366d6d
SH
1061Line numbers inside multiline quote-like operators are now reported correctly.
1062[perl #3643]
ae66f305
FC
1063
1064=item *
1065
99366d6d
SH
1066C<#line> directives inside code embedded in quote-like operators are now
1067respected.
ae66f305 1068
f8f2d1ac
FC
1069=item *
1070
bc86bb16
FC
1071Line numbers are now correct inside the second here-doc when two here-doc
1072markers occur on the same line.
1073
1074=item *
1075
99366d6d
SH
1076Starting with Perl 5.12, line numbers were off by one if the B<-d> switch was
1077used on the #! line. Now they are correct.
b3c26d51
FC
1078
1079=item *
1080
99366d6d
SH
1081Perl 5.19.2 inadvertently stopped some lines of code from being available to
1082the debugger if C<=E<gt>> occurred at the beginning of a line and the previous
1083line ended with a keyword. This is now fixed.
f8f2d1ac 1084
ac29d451
FC
1085=item *
1086
99366d6d
SH
1087Perl 5.19.2 allowed the PERL5DB environment variable to contain multiple lines
1088of code, but those lines were not made available to the debugger. Now they are
1089all stuffed into line number 0, accessible via C<$dbline[0]> in the debugger.
b3c26d51
FC
1090
1091=item *
1092
ac29d451
FC
1093An optimisation in Perl 5.18 made incorrect assumptions causing a bad
1094interaction with the L<Devel::CallParser> CPAN module. If the module was
99366d6d
SH
1095loaded then lexical variables declared in separate statements following a
1096C<my(...)> list might fail to be cleared on scope exit.
ac29d451 1097
f34cd7c8
FC
1098=item *
1099
99366d6d
SH
1100C<&xsub> and C<goto &xsub> calls now allow the called subroutine to autovivify
1101elements of @_.
f34cd7c8 1102
6f9296e1
FC
1103=item *
1104
99366d6d
SH
1105C<&xsub> and C<goto &xsub> no longer crash if *_ has been undefined and has no
1106ARRAY entry (i.e. @_ does not exist).
6f9296e1 1107
82d5eae5
FC
1108=item *
1109
1144b44d
FC
1110C<&xsub> and C<goto &xsub> now work with tied @_.
1111
1112=item *
1113
82d5eae5
FC
1114Overlong identifiers no longer cause a buffer overflow (and a crash). They
1115started doing so in Perl 5.18.
1116
cfbe45f9
FC
1117=item *
1118
99366d6d
SH
1119The warning "Scalar value @hash{foo} better written as $hash{foo}" now produces
1120far fewer false positives. In particular, C<@hash{+function_returning_a_list}>
1121and C<@hash{ qw "foo bar baz" }> no longer warn. The same applies to array
1122slices. [perl #28380, #114024]
cfbe45f9 1123
ba03bc34 1124=back
18e2e6cd 1125
ba03bc34 1126=head1 Known Problems
a82207ba 1127
ba03bc34
SH
1128XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
1129tests that had to be C<TODO>ed for the release would be noted here. Unfixed
1130platform specific bugs also go here.
31d5dc65 1131
ba03bc34 1132[ List each fix as a =item entry ]
31d5dc65 1133
ba03bc34 1134=over 4
31d5dc65 1135
74dac2b5
FC
1136=item *
1137
ba03bc34 1138XXX
74dac2b5 1139
ba03bc34 1140=back
8fecfff0 1141
ba03bc34 1142=head1 Obituary
8fecfff0 1143
ba03bc34
SH
1144XXX If any significant core contributor has died, we've added a short obituary
1145here.
d7bfa554 1146
583aa5c2 1147=head1 Acknowledgements
a75569c0 1148
ba03bc34
SH
1149XXX Generate this with:
1150
1151 perl Porting/acknowledgements.pl v5.19.3..HEAD
f5b73711 1152
44691e6f
AB
1153=head1 Reporting Bugs
1154
e08634c5
SH
1155If you find what you think is a bug, you might check the articles recently
1156posted to the comp.lang.perl.misc newsgroup and the perl bug database at
1157http://rt.perl.org/perlbug/ . There may also be information at
1158http://www.perl.org/ , the Perl Home Page.
44691e6f 1159
e08634c5
SH
1160If you believe you have an unreported bug, please run the L<perlbug> program
1161included with your release. Be sure to trim your bug down to a tiny but
1162sufficient test case. Your bug report, along with the output of C<perl -V>,
1163will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
1164
1165If the bug you are reporting has security implications, which make it
e08634c5
SH
1166inappropriate to send to a publicly archived mailing list, then please send it
1167to perl5-security-report@perl.org. This points to a closed subscription
1168unarchived mailing list, which includes all the core committers, who will be
1169able to help assess the impact of issues, figure out a resolution, and help
f9001595 1170co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
1171platforms on which Perl is supported. Please only use this address for
1172security issues in the Perl core, not for modules independently distributed on
1173CPAN.
44691e6f
AB
1174
1175=head1 SEE ALSO
1176
e08634c5
SH
1177The F<Changes> file for an explanation of how to view exhaustive details on
1178what changed.
44691e6f
AB
1179
1180The F<INSTALL> file for how to build Perl.
1181
1182The F<README> file for general stuff.
1183
1184The F<Artistic> and F<Copying> files for copyright information.
1185
1186=cut