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