5 perldelta - what is new for perl v5.13.9
9 This document describes differences between the 5.13.8 release and
12 If you are upgrading from an earlier release such as 5.13.7, first read
13 L<perl5138delta>, which describes differences between 5.13.7 and
16 =head1 Core Enhancements
18 =head2 New regular expression modifier C</a>
20 The C</a> regular expression modifier restricts C<\s> to match precisely
21 the five characters C<[ \f\n\r\t]>, C<\d> to match precisely the 10
22 characters C<[0-9]>, C<\w> to match precisely the 63 characters
23 C<[A-Za-z0-9_]>, and the Posix (C<[[:posix:]]>) character classes to
24 match only the appropriate ASCII characters. The complements, of
25 course, match everything but; and C<\b> and C<\B> are correspondingly
26 affected. Otherwise, C</a> behaves like the C</u> modifier, in that
27 case-insensitive matching uses Unicode semantics; for example, "k" will
28 match the Unicode C<\N{KELVIN SIGN}> under C</i> matching, and code
29 points in the Latin1 range, above ASCII will have Unicode semantics when
30 it comes to case-insensitive matching. Like its cousins (C</u>, C</l>,
31 and C</d>), and in spite of the terminology, C</a> in 5.14 will not
32 actually be able to be used as a suffix at the end of a regular
33 expression (this restriction is planned to be lifted in 5.16). It must
34 occur either as an infix modifier, such as C<(?a:...)> or (C<(?a)...>,
35 or it can be turned on within the lexical scope of C<use re '/a'>.
36 Turning on C</a> turns off the other "character set" modifiers.
38 =head2 Any unsigned value can be encoded as a character
40 With this release, Perl is adopting a model that any unsigned value can
41 be treated as a code point and encoded internally (as utf8) without
42 warnings -- not just the code points that are legal in Unicode.
43 However, unless utf8 warnings have been
44 explicitly lexically turned off, outputting or performing a
45 Unicode-defined operation (such as upper-casing) on such a code point
46 will generate a warning. Attempting to input these using strict rules
47 (such as with the C<:encoding('UTF-8')> layer) will continue to fail.
48 Prior to this release the handling was very inconsistent, and incorrect
49 in places. Also, the Unicode non-characters, some of which previously were
50 erroneously considered illegal in places by Perl, contrary to the Unicode
51 standard, are now always legal internally. But inputting or outputting
52 them will work the same as for the non-legal Unicode code points, as the
53 Unicode standard says they are illegal for "open interchange".
55 =head2 Regular expression debugging output improvement
57 Regular expression debugging output (turned on by C<use re 'debug';>) now
58 uses hexadecimal when escaping non-ASCII characters, instead of octal.
62 =head2 Restrict \p{IsUserDefined} to In\w+ and In\w+
64 In L<perlunicode/"User-Defined Character Properties">, it says you can
65 create custom properties by defining subroutines whose names begin with
66 "In" or "Is". However, perl doesn't actually enforce that naming
67 restriction, so \p{foo::bar} will call foo::Bar() if it exists.
69 This commit finally enforces this convention. Note that this broke a
70 number of existing tests for properties, since they didn't always use an
73 =head1 Incompatible Changes
75 =head2 All objects are destroyed
77 It used to be possible to prevent a destructor from being called during
78 global destruction by artificially increasing the reference count of an
81 Now such objects I<will> will be destroyed, as a result of a bug fix
82 L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>.
84 This has the potential to break some XS modules. (In fact, it break some.
85 See L</Known Problems>, below.)
87 =head1 Modules and Pragmata
89 =head2 New Modules and Pragmata
95 C<CPAN::Meta::YAML> 0.003 has been added as a dual-life module. It supports a
96 subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files
97 included with CPAN distributions or generated by the module installation
98 toolchain. It should not be used for any other general YAML parsing or
103 C<HTTP::Tiny> 0.009 has been added as a dual-life module. It is a very
104 small, simple HTTP/1.1 client designed for simple GET requests and file
105 mirroring. It has has been added to enable CPAN.pm and CPANPLUS to
106 "bootstrap" HTTP access to CPAN using pure Perl without relying on external
107 binaries like F<curl> or F<wget>.
111 C<JSON::PP> 2.27103 has been added as a dual-life module, for the sake of
112 reading F<META.json> files in CPAN distributions.
116 C<Module::Metadata> 1.000003 has been added as a dual-life module. It gathers
117 package and POD information from Perl module files. It is a standalone module
118 based on Module::Build::ModuleInfo for use by other module installation
119 toolchain components. Module::Build::ModuleInfo has been deprecated in
120 favor of this module instead.
124 C<Perl::OSType> 1.002 has been added as a dual-life module. It maps Perl
125 operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic types
126 with standardized names (e.g. "Unix" or "Windows"). It has been refactored
127 out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into
128 a single location for easier maintenance.
132 =head2 Updated Modules and Pragmata
138 C<Archive::Extract> has been upgraded from version 0.46 to 0.48
142 C<Archive::Tar> has been upgraded from version 1.74 to 1.76
146 C<CGI> has been upgraded from version 3.50 to 3.51
148 Further improvements have been made to guard against newline injections
153 C<Compress::Raw::Bzip2> has been upgraded from version 2.031 to 2.033
157 C<Compress::Raw::Zlib> has been upgraded from version 2.030 to 2.033
161 C<CPAN> has been upgraded from version 1.94_62 to 1.94_63
165 C<CPANPLUS> has been upgraded from version 0.9010 to 0.9011
169 C<CPANPLUS::Dist::Build> has been upgraded from version 0.50 to 0.52
173 C<DB_File> has been upgraded from version 1.820 to 1.821
177 C<Encode> has been upgraded from version 2.40 to 2.42.
178 Now, all 66 Unicode non-characters are treated the same way U+FFFF has
179 always been treated; if it was disallowed, all 66 are disallowed; if it
184 C<File::Fetch> has been upgraded from version 0.28 to 0.32
188 C<IO::Compress> has been upgraded from version 2.030 to 2.033
192 C<IPC::Cmd> has been upgraded from version 0.66 to 0.68
196 C<Log::Message> has been upgraded from version 0.02 to 0.04
200 C<Log::Message::Simple> has been upgraded from version 0.06 to 0.08
204 C<Module::Load::Conditional> has been upgraded from version 0.38 to 0.40
208 C<Object::Accessor> has been upgraded from version 0.36 to 0.38
212 C<Params::Check> has been upgraded from version 0.26 to 0.28
216 C<Pod::LaTeX> has been upgraded from version 0.58 to 0.59
220 C<Socket> has been updated with new affordances for IPv6,
221 including implementations of the C<Socket::getaddrinfo()> and
222 C<Socket::getnameinfo()> functions, along with related constants.
226 C<Term::UI> has been upgraded from version 0.20 to 0.24
230 C<Thread::Queue> has been upgraded from version 2.11 to 2.12.
234 C<Thread::Semaphore> has been upgraded from version 2.11 to 2.12.
238 C<threads> has been upgraded from version 1.81_03 to 1.82
242 C<threads::shared> has been upgraded from version 1.35 to 1.36
246 C<Time::Local> has been upgraded from version 1.1901_01 to 1.2000.
250 C<Unicode::Normalize> has been upgraded from version 1.07 to 1.10
254 C<version> has been upgraded from 0.86 to 0.88.
258 C<Win32> has been upgraded from version 0.41 to 0.44.
264 =head2 Changes to Existing Documentation
266 =head3 All documentation
272 Numerous POD warnings were fixed.
276 Many, many spelling errors and typographical mistakes were corrected throughout Perl's core.
286 C<perlhack> was extensively reorganized.
296 It has now been documented that C<ord> returns 0 for an empty string.
302 The following additions or changes have been made to diagnostic output,
303 including warnings and fatal error messages. For the complete list of
304 diagnostic messages, see L<perldiag>.
306 =head2 New Diagnostics
312 Performing an operation requiring Unicode semantics (such as case-folding)
313 on a Unicode surrogate or a non-Unicode character now triggers a warning:
314 'Operation "%s" returns its argument for ...'.
318 =head2 Changes to Existing Diagnostics
324 Previously, if none of the C<gethostbyaddr>, C<gethostbyname> and
325 C<gethostent> functions were implemented on a given platform, they would
326 all die with the message 'Unsupported socket function "gethostent" called',
327 with analogous messages for C<getnet*> and C<getserv*>. This has been
332 =head1 Utility Changes
340 C<perlbug> did not previously generate a From: header, potentially
341 resulting in dropped mail. Now it does include that header.
351 F<pod/buildtoc> has been modernized and can now be used to test the
352 well-formedness of F<pod/perltoc.pod> automatically.
362 C<lib/File/DosGlob.t> has been modernized and now uses C<Test::More>.
366 A new test script, C<t/porting/filenames.t>, makes sure that filenames and
367 paths are reasonably portable.
371 C<t/porting/diag.t> is now several orders of magnitude faster.
375 C<t/porting/buildtoc.t> now tests that the documentation TOC file is current and well-formed.
379 C<t/base/while.t> now tests the basics of a while loop with minimal dependencies.
383 C<t/cmd/while.t> now uses F<test.pl> for better maintainability.
387 C<t/op/split.t> now tests calls to C<split> without any pattern specified.
393 =head1 Platform Support
395 =head2 Discontinued Platforms
399 =item Apollo DomainOS
401 The last vestiges of support for this platform have been excised from the
402 Perl distribution. It was officially discontinued in version 5.12.0. It had
403 not worked for years before that.
407 The last vestiges of support for this platform have been excised from the
408 Perl distribution. It was officially discontinued in an earlier version.
412 =head2 Platform-Specific Notes
423 Updated MakeMaker to build man pages on cygwin.
427 Improved rebase behaviour
429 If a dll is updated on cygwin reuse the old imagebase address.
430 This solves most rebase errors, esp when updating on core dll's.
431 See L<http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README> for more information.
435 Support the standard cyg dll prefix, which is e.g. needed for FFI's.
439 Updated build hints file
446 DTrace is now supported on Solaris. There used to be build failures, but
447 these have been fixed
448 L<[perl #73630]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=73630>.
452 =head1 Internal Changes
458 The opcode bodies for C<chop> and C<chomp> and for C<schop> and C<schomp> have
459 been merged. The implementation functions C<Perl_do_chop()> and
460 C<Perl_do_chomp()>, never part of the public API, have been merged and moved to
461 a static function in F<pp.c>. This shrinks the perl binary slightly, and should
462 not affect any code outside the core (unless it is relying on the order of side
463 effects when C<chomp> is passed a I<list> of values).
467 Some of the flags parameters to the uvuni_to_utf8_flags() and
468 utf8n_to_uvuni() have changed. This is a result of Perl now allowing
469 internal storage and manipulation of code points that are problematic
470 in some situations. Hence, the default actions for these functions has
471 been complemented to allow these code points. The new flags are
472 documented in L<perlapi>. Code that requires the problematic code
473 points to be rejected needs to change to use these flags. Some flag
474 names are retained for backward source compatibility, though they do
475 nothing, as they are now the default. However the flags
476 C<UNICODE_ALLOW_FDD0>, C<UNICODE_ALLOW_FFFF>, C<UNICODE_ILLEGAL>, and
477 C<UNICODE_IS_ILLEGAL> have been removed, as they stem from a
478 fundamentally broken model of how the Unicode non-character code points
479 should be handled, which is now described in
480 L<perlunicode/Non-character code points>. See also L</Selected Bug Fixes>.
484 Certain shared flags in the C<pmop.op_pmflags> and C<regexp.extflags>
485 structures have been removed. These are: C<Rxf_Pmf_LOCALE>,
486 C<Rxf_Pmf_UNICODE>, and C<PMf_LOCALE>. Instead there are encodes and
487 three static in-line functions for accessing the information:
488 C<get_regex_charset()>, C<set_regex_charset()>, and C<get_regex_charset_name()>,
489 which are defined in the places where the orginal flags were.
493 A new option has been added to C<pv_escape> to dump all characters above
494 ASCII in hexadecimal. Before, one could get all characters as hexadecimal
495 or the Latin1 non-ASCII as octal
500 Generate pp_* prototypes in pp_proto.h, and remove pp.sym
502 Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
503 locations that relied on them.
505 regen/opcode.pl now generates prototypes for the PP functions directly, into
506 pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads
507 this, removing the only ordering dependency in the regen scripts. opcode.pl
508 is now responsible for prototypes for pp_* functions. (embed.pl remains
509 responsible for ck_* functions, reading from regen/opcodes)
513 =head1 Selected Bug Fixes
519 The handling of Unicode non-characters has changed.
520 Previously they were mostly considered illegal, except that only one of
521 the 66 of them was known about in places. The Unicode standard
522 considers them legal, but forbids the "open interchange" of them.
523 This is part of the change to allow the internal use of any code point
524 (see L</Core Enhancements>). Together, these changes resolve
525 L<# 38722|https://rt.perl.org/rt3/Ticket/Display.html?id=38722>,
526 L<# 51918|http://rt.perl.org/rt3/Ticket/Display.html?id=51918>,
527 L<# 51936|http://rt.perl.org/rt3/Ticket/Display.html?id=51936>,
528 L<# 63446|http://rt.perl.org/rt3/Ticket/Display.html?id=63446>
532 Sometimes magic (ties, tainted, etc.) attached to variables could cause an
533 object to last longer than it should, or cause a crash if a tied variable
534 were freed from within a tie method. These have been fixed
535 L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>.
539 Most I/O functions were not warning for unopened handles unless the
540 'closed' and 'unopened' warnings categories were both enabled. Now only
541 C<use warnings 'unopened'> is necessary to trigger these warnings (as was
542 always meant to be the case.
546 C<< E<lt>exprE<gt> >> always respects overloading now if the expression is
549 Due to the way that 'E<lt>E<gt> as glob' was parsed differently from
550 'E<lt>E<gt> as filehandle' from 5.6 onwards, something like C<< E<lt>$foo[0]E<gt> >> did
551 not handle overloading, even if C<$foo[0]> was an overloaded object. This
552 was contrary to the documentation for overload, and meant that C<< E<lt>E<gt> >>
553 could not be used as a general overloaded iterator operator.
557 Destructors on objects were not called during global destruction on objects
558 that were not referenced by any scalars. This could happen if an array
559 element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a
560 blessed variable (C<bless \my @a; sub foo { @a }>).
562 Now there is an extra pass during global destruction to fire destructors on
563 any objects that might be left after the usual passes that check for
564 objects referenced by scalars
565 L<[perl #36347]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=36347>.
569 A long standing bug has now been fully fixed (partial fixes came in
570 earlier releases), in which some Latin-1 non-ASCII characters on
571 ASCII-platforms would match both a character class and its complement,
572 such as U+00E2 being both in C<\w> and C<\W>, depending on the
573 UTF-8-ness of the regular expression pattern and target string.
574 Fixing this did expose some bugs in various modules and tests that
575 relied on the previous behavior of C<[[:alpha:]]> not ever matching
576 U+00FF, "LATIN SMALL LETTER Y WITH DIAERESIS", even when it should, in
577 Unicode mode; now it does match when appropriate.
578 L<[perl #60156]|http://rt.perl.org/rt3/Ticket/Display.html?id=60156>.
582 =head1 Known Problems
588 The fix for [perl #81230] causes test failures for C<Tk> version 804.029.
589 This is still being investigated.
593 =head1 Acknowledgements
595 Perl 5.13.8 represents approximately one month of development since Perl 5.13.7
596 and contains approximately 48000 lines of changes across 809 files from 35 authors and committers:
598 Abigail, Ævar Arnfjörð Bjarmason, brian d foy, Chris 'BinGOs' Williams,
599 Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father
600 Chrysostomos, Florian Ragwitz, Gerard Goossen, H.Merijn Brand, Jan
601 Dubois, Jerry D. Hedden, Jesse Vincent, John Peacock, Karl Williamson,
602 Leon Timmermans, Michael Parker, Michael Stevens, Nicholas Clark,
603 Nuno Carvalho, Paul "LeoNerd" Evans, Peter J. Acklam, Peter Martini,
604 Rainer Tammer, Reini Urban, Renee Baecker, Ricardo Signes, Robin Barker,
605 Tony Cook, Vadim Konovalov, Vincent Pit, Zefram, and Zsbán Ambrus.
607 Many of the changes included in this version originated in the CPAN
608 modules included in Perl's core. We're grateful to the entire CPAN
609 community for helping Perl to flourish.
611 =head1 Reporting Bugs
613 If you find what you think is a bug, you might check the articles
614 recently posted to the comp.lang.perl.misc newsgroup and the perl
615 bug database at http://rt.perl.org/perlbug/ . There may also be
616 information at http://www.perl.org/ , the Perl Home Page.
618 If you believe you have an unreported bug, please run the L<perlbug>
619 program included with your release. Be sure to trim your bug down
620 to a tiny but sufficient test case. Your bug report, along with the
621 output of C<perl -V>, will be sent off to perlbug@perl.org to be
622 analysed by the Perl porting team.
624 If the bug you are reporting has security implications, which make it
625 inappropriate to send to a publicly archived mailing list, then please send
626 it to perl5-security-report@perl.org. This points to a closed subscription
627 unarchived mailing list, which includes all the core committers, who be able
628 to help assess the impact of issues, figure out a resolution, and help
629 co-ordinate the release of patches to mitigate or fix the problem across all
630 platforms on which Perl is supported. Please only use this address for
631 security issues in the Perl core, not for modules independently
636 The F<Changes> file for an explanation of how to view exhaustive details
639 The F<INSTALL> file for how to build Perl.
641 The F<README> file for general stuff.
643 The F<Artistic> and F<Copying> files for copyright information.