5 perl5199delta - what is new for perl v5.19.9
9 This document describes differences between the 5.19.8 release and the 5.19.9
12 If you are upgrading from an earlier release such as 5.19.7, first read
13 L<perl5198delta>, which describes differences between 5.19.7 and 5.19.8.
15 =head1 Core Enhancements
17 =head2 UTF-8 locales now supported better under C<S<use locale>>
19 A UTF-8 locale is one in which the character set is Unicode and the
20 encoding is UTF-8. Now, the POSIX C<LC_CTYPE> category operations under
21 such a locale (within the scope of C<S<use locale>>), which include case
22 changing (like C<lc()>, C<"\U">), and character classification (C<\w>,
23 C<\D>, C<qr/[[:punct:]]/> work just as if not under locale, except taint
24 rules are followed. Prior to this, Perl only handled single-byte
25 locales. This resolves [perl #56820].
27 =head2 C<S<use locale>> now compiles on systems without locale ability
29 Previously doing this caused the program to not compile. Within its
30 scope the program behaves as if in the "C" locale. Thus programs
31 written for platforms that support locales can run on locale-less
32 platforms without change. Attempts to change the locale away from the
33 "C" locale will, of course, fail.
35 =head2 PERL_DEBUG_READONLY_COW
37 On some operating systems Perl can be compiled in such a way that any
38 attempt to modify string buffers shared by multiple SVs will crash. This
39 way XS authors can test that their modules handle copy-on-write scalars
40 correctly. See L<perlguts/"Copy on Write"> for detail.
42 This feature was actually added in 5.19.8, but was unintentionally omitted
43 from its delta document.
45 =head2 C<-DL> runtime option now added for tracing locale setting
47 This is designed for Perl core developers to aid in field debugging bugs
50 =head2 Subroutine signatures
52 Declarative syntax to unwrap argument list into lexical variables.
53 C<sub foo ($a,$b) {...}> checks the number of arguments and puts the
54 arguments into lexical variables. Signatures are not equivalent to
55 the existing idiom of C<sub foo { my($a,$b) = @_; ... }>. Signatures
56 are only available by enabling a non-default feature, and generate
57 warnings about being experimental. The syntactic clash with
58 prototypes is managed by disabling the short prototype syntax when
59 signatures are enabled.
61 See L<perlsub/Signatures> for details.
63 =head2 More locale initialization fallback options
65 If there was an error with locales during Perl start-up, it immediately
66 gave up and tried to use the C<"C"> locale. Now it first tries using
67 other locales given by the environment variables, as detailed in
68 L<perllocale/ENVIRONMENT>. For example, if C<LC_ALL> and C<LANG> are
69 both set, and using the C<LC_ALL> locale fails, Perl will now try the
70 C<LANG> locale, and only if that fails, will it fall back to C<"C">. On
71 Windows machines, Perl will try, ahead of using C<"C">, the system
72 default locale if all the locales given by environment variables fail.
74 =head1 Incompatible Changes
76 =head2 Tainting happens under more circumstances; now conforms to documentation
78 This affects regular expression matching and changing the case of a
79 string (C<lc>, C<"\U">, I<etc>.) within the scope of C<use locale>.
80 The result is now tainted based on the operation, no matter what the
81 contents of the string were, as the documentation (L<perlsec>,
82 L<perllocale/SECURITY>) indicates it should. Previously, for the case
83 change operation, if the string contained no characters whose case
84 change could be affected by the locale, the result would not be tainted.
85 For example, the result of C<uc()> on an empty string or one containing
86 only above-Latin1 code points is now tainted, and wasn't before. This
87 leads to more consistent tainting results. Regular expression patterns
88 taint their non-binary results (like C<$&>, C<$2>) if and only if the
89 pattern contains elements whose matching depends on the current
90 (potentially tainted) locale. Like the case changing functions, the
91 actual contents of the string being matched now do not matter, whereas
92 formerly it did. For example, if the pattern contains a C<\w>, the
93 results will be tainted even if the match did not have to use that
94 portion of the pattern to succeed or fail, because what a C<\w> matches
95 depends on locale. However, for example, a C<.> in a pattern will not
96 enable tainting, because the dot matches any single character, and what
97 the current locale is doesn't change in any way what matches and what
100 =head2 Quote-like escape changes
102 The character after C<\c> in a double-quoted string ("..." or qq(...))
103 or regular expression must now be a printable character and may not be
106 A literal C<{> after C<\B> or C<\b> is now fatal.
108 These were deprecated in perl v5.14.
116 Setting C<$/> to a reference to zero or a reference to a negative integer is
117 now deprecated, and will behave B<exactly> as though it was set to C<undef>.
118 If you want slurp behavior set C<$/> to C<undef> explicitly.
122 Setting C<$/> to a reference to a non integer is now forbidden and will
123 throw an error. Perl has never documented what would happen in this
124 context and while it used to behave the same as setting C<$/> to
125 the address of the references in future it may behave differently, so we
126 have forbidden this usage.
130 Use of any of these functions in the C<POSIX> module is now deprecated:
131 C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>,
132 C<isprint>, C<ispunct>, C<isspace>, C<isupper>, and C<isxdigit>. The
133 functions are buggy and don't work on UTF-8 encoded strings. See their
134 entries in L<POSIX> for more information.
136 A warning is raised on the first call to any of them from each place in
137 the code that they are called. (Hence a repeated statement in a loop
138 will raise just the one warning.)
142 =head1 Performance Enhancements
157 In combination with the padrange optimization, this means longer
158 uninitialized my variable statements are also optimized, so:
170 =head1 Modules and Pragmata
172 =head2 Updated Modules and Pragmata
178 L<autodie> has been upgraded from version 2.22 to 2.23.
180 C<autodie> no longer weakens strict by allowing undeclared variables
181 with the same name as built-ins. [cpan #74246]
183 C<use autodie qw( foo ! foo);> now correctly insists that we have
188 L<B> has been upgraded from version 1.47 to 1.48.
190 Remove the obsolete C<DEREFed> flag from L<B::Concise>.
194 L<B::Deparse> has been upgraded from version 1.24 to 1.25.
196 It now knows how to handle whitespace in prototypes. Previously, it could
197 loop infinitely. [perl #121050]
201 L<CGI> has been upgraded from version 3.64 to 3.65.
205 L<Compress::Raw::Bzip2> has been upgraded from version 2.063 to 2.064.
207 Handle non-PVs better. [cpan #91558]
211 L<Compress::Raw::Zlib> has been upgraded from version 2.063 to 2.065.
213 Handle non-PVs better. [cpan #91558]
215 Z_OK instead of Z_BUF_ERROR. [cpan #92521]
217 Resolve a C++ build failure in core. [cpan #92657]
221 L<Config::Perl::V> has been upgraded from version 0.19 to 0.20.
223 Synchronize with blead (bincompat options)
227 L<CPAN::Meta::YAML> has been upgraded from version 0.010 to 0.011.
231 L<Devel::Peek> has been upgraded from version 1.15 to 1.16.
233 Devel::Peek::SvREFCNT() now ensures it has been passed a reference, as
234 specified by its prototype.
238 L<diagnostics> has been upgraded from version 1.33 to 1.34.
242 L<Digest::SHA> has been upgraded from version 5.85 to 5.87.
244 Improved the performance of hexadecimal output functions and simplified capture
245 of intermediate SHA states, which can now be done via strings (see
246 C<L<getstate()|Digest::SHA/getstate>>/C<L<putstate()|Digest::SHA/putstate($str)>>).
250 L<DynaLoader> has been upgraded from version 1.24 to 1.25.
256 L<English> has been upgraded from version 1.08 to 1.09.
258 Added C<$OLD_PERL_VERSION> as an alias for C<$]>.
262 L<ExtUtils::CBuilder> has been upgraded from version 0.280213 to 0.280216.
268 L<ExtUtils::Embed> has been upgraded from version 1.31 to 1.32.
270 Skip tests when cross-compiling and $Config{cc} isn't available.
274 L<ExtUtils::Install> has been upgraded from version 1.61 to 1.62.
276 Skip tests when cross-compiler and make isn't available.
280 L<ExtUtils::MakeMaker> has been upgraded from version 6.86 to 6.88.
282 Improved support for Android and other minor changes.
286 L<feature> has been upgraded from version 1.34 to 1.35.
290 L<File::Fetch> has been upgraded from version 0.46 to 0.48.
292 Force curl to be IPv4 only during testing on NetBSD.
296 L<HTTP::Tiny> has been upgraded from version 0.039 to 0.042.
298 Added support for keep-alive connections.
300 If L<IO::Socket::IP> 0.25 or later is available, use that for
301 transparent IPv4 or IPv6 support.
305 L<inc::latest> has been upgraded from version 0.4204 to 0.4205.
307 NOTE: L<inc::latest> is deprecated and may be removed from a future version of Perl.
311 The IO-Compress module collection has been upgraded from version 2.063
318 L<IO::Socket::IP>, tentatively introduced in L<Perl 5.19.8|perl5198delta>,
319 has been upgraded from 0.26 to 0.28.
323 L<IPC::Cmd> has been upgraded from version 0.90 to 0.92.
327 The libnet module collection has been upgraded from version 1.24 to 1.25.
329 The creation of L<Net::FTP> dataconnections now honour the requested timeout,
330 errors from C<Net::Cmd::response()> are now handled in C<Net::FTP::pasv_wait()>
331 and a warning from C<Net::Domain::domainname()> on Android is now stopped.
335 L<locale> has been upgraded from version 1.02 to 1.03.
337 Allow C<use locale;> on systems without locales, such as Android.
341 L<Locale::Codes> has been upgraded from version 3.28 to 3.29.
345 L<Module::Build> has been upgraded from version 0.4204 to 0.4205.
347 Fix license code regression for artistic license.
349 Don't swallow ExtUtils::CBuilder loading errors.
351 Handle testing on cross-compile builds.
353 Protect against platforms without getpw{nam,uid}.
357 L<Module::CoreList> has been upgraded from version 3.04 to 3.06.
361 L<Module::Load> has been upgraded from version 0.28 to 0.30.
363 Prevent uninitialized warnings during testing.
367 L<Module::Load::Conditional> has been upgraded from version 0.60 to 0.62.
371 L<mro> has been upgraded from version 1.14 to 1.15.
373 Use HEKfARG() instead of creating and throwing away SVs.
377 L<Net::Ping> has been upgraded from version 2.42 to 2.43.
379 Handle getprotobyname() or getprotobynumber() not being available.
383 L<Parse::CPAN::Meta> has been upgraded from version 1.4409 to 1.4413.
385 Invalid UTF-8 encoding in YAML files are now replaced with "PERLQQ"
386 quoting from the Encode module and without warnings.
388 Removed legacy test modifications for testing with the perl core.
392 The PathTools module collection has been upgraded from version 3.45 to
395 Improved support for Android.
397 C<< File::Spec::Unix->tmpdir >> now consistently returns an absolute
398 path, unless in taint mode. [perl #120593]
402 L<Pod::Escapes> has been upgraded from version 1.04 to 1.06.
404 Now strict and warning clean. Several minor documentation updates.
406 e2charnum() no longer treats non-ASCII Unicode digits as suitable for
407 an escape. [cpan #70246]
411 L<Pod::Parser> has been upgraded from version 1.61 to 1.62.
415 L<POSIX> has been upgraded from version 1.38_01 to 1.38_02.
417 Deprecate use of isfoo() functions.
421 L<Scalar::Util> has been upgraded from version 1.36 to 1.38.
423 A backwards-compatibility issue with older perls has been fixed. [cpan #92363]
427 L<threads> has been upgraded from version 1.91 to 1.92.
429 Synchronization with CPAN release.
433 L<version> has been upgraded from version 0.9907 to 0.9908.
437 L<warnings> has been upgraded from version 1.21 to 1.22.
439 C<< use warnings "FATAL"; >> now implies C<< "all" >>, and similarly
440 for C<< use warnings "NONFATAL" >>. [perl #120977]
446 =head2 Changes to Existing Documentation
454 L<perlfunc/exec>'s handling of arguments is now more clearly
465 New sections on L<Read-Only Values|perlguts/"Read-Only Values"> and
466 L<Copy on Write|perlguts/"Copy on Write"> have been added. They were
467 actually added in 5.19.8 but accidentally omitted from its delta document.
473 The following additions or changes have been made to diagnostic output,
474 including warnings and fatal error messages. For the complete list of
475 diagnostic messages, see L<perldiag>.
477 =head2 New Diagnostics
485 Added L<Setting $E<sol> to a %s reference is forbidden|perldiag/"Setting $E<sol> to %s reference is forbidden">
495 Added L<Setting $E<sol> to a reference to %s as a form of slurp is deprecated, treating as undef|perldiag/"Setting $E<sol> to a reference to %s as a form of slurp is deprecated, treating as undef">
499 =head1 Configuration and Compilation
505 The cross-compilation model has been renovated.
506 There's several new options, and some backwards-incompatible changes:
508 We now build binaries for miniperl and generate_uudmap to be used on the host, rather than running
509 every miniperl call on the target; this means that, short of 'make test',
510 we no longer need access to the target system once Configure is done.
511 You can provide already-built binaries through the C<hostperl> and
512 C<hostgenerate> options to Configure.
514 Additionally, if targeting an EBCDIC platform from an ASCII host,
515 or viceversa, you'll need to run Configure with C<-Uhostgenerate>, to
516 indicate that generate_uudmap should be run on the target.
518 Finally, there's also a way of having Configure end early, right after
519 building the host binaries, by cross-compiling without specifying a
522 The incompatible changes include no longer using xconfig.h, xlib, or
523 Cross.pm, so canned config files and Makefiles will have to be updated.
527 Related to the above, there is now a way of specifying the location of sh
528 (or equivalent) on the target system: C<targetsh>.
530 For example, Android has its sh in /system/bin/sh, so if cross-compiling
531 from a more normal Unixy system with sh in /bin/sh, "targetsh" would end
532 up as /system/bin/sh, and "sh" as /bin/sh.
536 =head1 Platform Support
544 Perl can now be built for Android, either natively or through
545 cross-compilation, for all three currently available architectures (ARM,
546 MIPS, and x86), on a wide range of versions.
550 =head2 Platform-Specific Notes
556 Skip access checks on remotes in opendir(). [perl #121002]
560 Fixed a build error in cygwin.c on Cygwin 1.7.28.
562 Tests now handle the errors that occur when C<cygserver> isn't
567 =head1 Internal Changes
571 =item Regexp Engine Changes That Affect The Pluggable Regex Engine Interface
573 Many flags that used to be exposed via regexp.h and used to populate the
574 extflags member of struct regexp have been removed. These fields were
575 technically private to Perl's own regexp engine and should not have been
576 exposed there in the first place.
578 The affected flags are:
589 As well as the follow flag masks:
594 All have been renamed to PREGf_ equivalents and moved to regcomp.h.
596 The behavior previously achieved by setting one or more of the RXf_ANCH_
597 flags (via the RXf_ANCH mask) have now been replaced by a *single* flag bit
602 pluggable regex engines which previously used to set these flags should
603 now set this flag ALONE.
607 =head1 Selected Bug Fixes
613 Backticks (C< `` > or C< qx// >) combined with multiple threads on
614 Win32 could result in output sent to stdout on one thread being
615 captured by backticks of an external command in another thread.
617 This could occur for pseudo-forked processes too, as Win32's
618 pseudo-fork is implemented in terms of threads. [perl #77672]
622 C<< open $fh, ">+", undef >> no longer leaks memory when TMPDIR is set
623 but points to a directory a temporary file cannot be created in. [perl
628 C<$^R> wasn't available outside of the regular expression that
629 initialized it. [perl #121070]
633 Fixed a regular expression bug introduced in 5.19.5 where \S, \W etc
634 could fail for above ASCII. [perl #121144]
638 A large set of fixes and refactoring for re_intuit_start() was merged,
645 Fixed a panic when compiling the regular expression
646 C</\x{100}[xy]\x{100}{2}/>.
650 Fixed a performance regression when performing a global pattern match
651 against a UTF-8 string. [perl #120692]
655 Fixed another performance issue where matching a regular expression
656 like C</ab.{1,2}x/> against a long UTF-8 string would unnecessarily
657 calculate byte offsets for a large portion of the string. [perl
664 C< for ( $h{k} || '' ) > no longer auto-vivifies C<$h{k}>. [perl
669 On Windows machines, Perl now emulates the POSIX use of the environment
670 for locale initialization. Previously, the environment was ignored.
671 See L<perllocale/ENVIRONMENT>.
675 Fixed a crash when destroying a self-referencing GLOB. [perl #121242]
679 Call set-magic when setting $DB::sub. [perl #121255]
683 Fixed an alignment error when compiling regular expressions when built
684 with GCC on HP-UX 64-bit.
688 =head1 Known Problems
694 The F<lib/locale.t> test may fail rarely.
698 =head1 Errata From Previous Releases
702 =item perl5180delta.pod
704 This pod file contains a statement saying that C<RXf_SPLIT> (and its alias
705 C<RXf_PMf_SPLIT>) and C<RXf_SKIPWHITE> were no longer used and #defined
706 to 0. This was the case for a short period, but the change was reverted
707 before Perl 5.18 was released. As such it was not true in Perl 5.18.x,
708 and is also not true now. Both flags continue to be used. The incorrect
709 entry has been removed from C<perl5180delta.pod> in this release.
713 =head1 Acknowledgements
715 Perl 5.19.9 represents approximately 4 weeks of development since Perl 5.19.8
716 and contains approximately 47,000 lines of changes across 610 files from 32
719 Excluding auto-generated files, documentation and release tools, there were
720 approximately 34,000 lines of changes to 420 .pm, .t, .c and .h files.
722 Perl continues to flourish into its third decade thanks to a vibrant community
723 of users and developers. The following people are known to have contributed the
724 improvements that became Perl 5.19.9:
726 Abigail, Alan Haggai Alavi, Brad Gilbert, Brian Fraser, Chris 'BinGOs'
727 Williams, Craig A. Berry, Daniel Dragan, David Golden, David Mitchell, Father
728 Chrysostomos, Gavin Shelley, H.Merijn Brand, Hauke D, James E Keenan, Jerry D.
729 Hedden, Jess Robinson, John Peacock, Karl Williamson, Matthew Horsfall, Neil
730 Williams, Peter Martini, Piotr Roszatycki, Rafael Garcia-Suarez, Reini Urban,
731 Ricardo Signes, Steffen Müller, Steve Hay, Sullivan Beck, Tom Hukins, Tony
732 Cook, Yves Orton, Zefram.
734 The list above is almost certainly incomplete as it is automatically generated
735 from version control history. In particular, it does not include the names of
736 the (very much appreciated) contributors who reported issues to the Perl bug
739 Many of the changes included in this version originated in the CPAN modules
740 included in Perl's core. We're grateful to the entire CPAN community for
741 helping Perl to flourish.
743 For a more complete list of all of Perl's historical contributors, please see
744 the F<AUTHORS> file in the Perl source distribution.
746 =head1 Reporting Bugs
748 If you find what you think is a bug, you might check the articles recently
749 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
750 https://rt.perl.org/ . There may also be information at
751 http://www.perl.org/ , the Perl Home Page.
753 If you believe you have an unreported bug, please run the L<perlbug> program
754 included with your release. Be sure to trim your bug down to a tiny but
755 sufficient test case. Your bug report, along with the output of C<perl -V>,
756 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
758 If the bug you are reporting has security implications, which make it
759 inappropriate to send to a publicly archived mailing list, then please send it
760 to perl5-security-report@perl.org. This points to a closed subscription
761 unarchived mailing list, which includes all the core committers, who will be
762 able to help assess the impact of issues, figure out a resolution, and help
763 co-ordinate the release of patches to mitigate or fix the problem across all
764 platforms on which Perl is supported. Please only use this address for
765 security issues in the Perl core, not for modules independently distributed on
770 The F<Changes> file for an explanation of how to view exhaustive details on
773 The F<INSTALL> file for how to build Perl.
775 The F<README> file for general stuff.
777 The F<Artistic> and F<Copying> files for copyright information.