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