5 perldelta - what is new for perl v5.13.3
7 XXX Add links around modules throughout
11 This document describes differences between the 5.13.3 release and
14 If you are upgrading from an earlier release such as 5.13.1, first read
15 L<perl5132delta>, which describes differences between 5.13.1 and
18 =head1 Core Enhancements
22 The escape sequence C<"\o"> in double-quotish contexts is now defined. It
23 must be followed by braces enclosing an octal number of at least one digit. It
24 means the character whose ordinal value is that octal number. This construct
25 allows large octal ordinals beyond the current max of 0777 to be represented.
26 It also allows you to specify a character in octal which can safely be
27 concatenated with other regex snippets without danger of changing its meaning,
28 and one which won't ever be confused with being a backreference to a regex
29 capture group. See L<perlre/Capture groups>
31 =head2 C<\N{I<name>}> and C<charnames> enhancements
33 C<\N{}> and C<charnames::vianame> now know about the abbreviated character
34 names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., as well as all the
35 customary abbreviations for the C0 and C1 control characters (such as ACK, BEL,
36 CAN, etc.), as well as a few new variants in common usage of some C1 full
39 In the past, it was ineffective to override one of Perl's abbreviations with
40 your own custom alias. Now it works.
42 And you can create a custom alias directly to the ordinal of a character, known
43 by C<\N{...}>, C<charnames::vianame()>, and C<charnames::viacode()>.
44 Previously, an alias had to be to an official Unicode character name. This
45 made it impossible to create an alias for a code point that had no name,
46 such as the ones reserved for private use. So this change allows you to make
47 more effective use of private use characters. Only if there is no official
48 name will C<charnames::viacode()> return your custom one.
50 See L<charnames> for details on all these changes.
52 =head2 Uppercase X/B allowed in hexadecimal/binary literals
54 Literals may now use either upper case C<0X...> or C<0B...> prefixes,
55 in addition to the already supported C<0x...> and C<0b...>
56 syntax. (RT#76296) (a674e8d)
58 C, Ruby, Python and PHP already supported this syntax, and it makes
59 Perl more internally consistent. A round-trip with C<eval sprintf
60 "%#X", 0x10> now returns C<16> in addition to C<eval sprintf "%#x",
61 0x10>, which worked before.
63 =head1 Incompatible Changes
67 Use of C<\400> - C<\777> in regexes in certain circumstances has given different,
68 anomalous behavior than their use in all other double-quotish contexts. Since
69 5.10.1, a deprecated warning message has been raised when this happens. Now,
70 all double-quotish contexts have the same behavior, namely to be equivalent to
71 C<\x{100}> - C<\x{1FF}>, with no deprecation warning. Use of these values in the
72 command line option C<"-0"> retains the current meaning to slurp input files
73 whole; previously, this was documented only for C<"-0777">. It is recommended,
74 however, because of various ambiguities, to use the new L</\o{...}> construct
75 to represent characters in octal.
79 =head2 Omitting a space between regular expression and subsequent word
81 Omitting a space between a regex pattern or pattern modifiers and the
82 following word is deprecated. Deprecation for regular expression matches
83 was added in Perl 5.13.2. In this release, the deprecation is extended
84 to regular expression substitutions. For example,
85 C<< s/foo/bar/sand $bar >> will still be parsed as
86 C<< s/foo/bar/s and $bar >> but will issue a warning.
88 =head2 Deprecation warning added for deprecated-in-core .pl libs
90 This is a mandatory warning, not obeying -X or lexical warning bits.
91 The warning is modelled on that supplied by deprecate.pm for
92 deprecated-in-core .pm libraries. It points to the specific CPAN
93 distribution that contains the .pl libraries. The CPAN version, of
94 course, does not generate the warning. (0111154)
96 =head1 Performance Enhancements
102 There are several small optimizations to improve CPU cache performance
106 =head1 Modules and Pragmata
108 =head2 Updated Modules and Pragmata
110 XXX Make sure these get sorted, are phrased similarly and all version
117 autodie updated to CPAN version 2.10 (a009834)
121 charnames -- viacode() is now significantly faster (f3227b7)
125 version now prevents object methods from being called as class methods
130 warnings updated to 1.10. Calling C<use warnings> without
131 arguments is now significantly more efficient. (8452af9)
135 Archive-Extract updated to CPAN version 0.42 (d7f8799)
137 Updates since 0.38 include: a safe print method that Michael Schwern
138 contributed, that guards Archive::Extract from changes to $\; a
139 fix to the tests when run in core perl from Robin Barker; and
140 support for TZ files contributed by Paul Marquess, who also supplied a
141 modification for the lzma logic to favour IO::Uncompress::Unlzma
145 Archive-Tar updated to version 1.64 (afabe0e)
147 Important changes since 1.54 include: compatibility with busybox
148 implementations of tar which was added by Mark Swayne; a fix so
149 that write() and create_archive() close only handles
150 they opened by Darrell K.; and a bug was fixed regarding the exit code
151 of extract_archive which was spotted by and upstreamed from RedHat by
156 Attribute-Handlers updated to CPAN version 0.88 (f2ea78b)
160 Compress-Raw-Bzip2 updated to CPAN version 2.027 (9e09409)
164 Compress-Raw-Zlib updated to CPAN version 2.027 (f02c02e)
168 CPANPLUS updated to version 0.9007 (d4e225a)
170 Fix the shell test to skip if test is not being run under a
171 terminal; resolved the issue where a prereq on Config would not be
172 recognised as a core module
176 Digest-MD5 updated to CPAN version 2.40 (326fafa)
180 Digest-SHA updated to CPAN version 5.48 (dfe1edc)
184 Exporter no longer overrides C<$SIG{__WARN__}> (RT #74472) (9b86bb5)
188 ExtUtils-CBuilder updated to CPAN version 0.2703 (7b0eef9)
192 ExtUtils-Manifest updated to CPAN version 1.58 (49c6bc4)
196 ExtUtil-ParseXS updated to version 2.2206 (494e8c4)
200 File::Copy skips suid tests on a nosuid partition (cae9400)
204 IO-Compress upated to CPAN version 2.027 (e8796d6)
208 IPC-Cmd updated to CPAN version 0.60 (e667e1e)
212 IPC-SysV updated to CPAN version 2.03 (10613b6)
216 Locale::Maketext guts have been merged back into the main module (87d86da)
217 and adds external cache support (ace47d6)
221 Module-Build updated to CPAN version 0.3607 (40c9afb)
225 Module-Load updated to CPAN version 0.18 (93eaa32)
229 Term-ANSIColor to CPAN version 3.00 (2c33c76)
233 Test-Harness to CPAN version 3.21 (6d31366)
237 Time-HiRes updated to CPAN version 1.9721 (68c5b4d)
241 Time-Piece updated to CPAN version 1.20 (90d55c2)
245 Unicode-Collate updated to CPAN version 0.53. Includes Unicode Collation
246 Algorithm 18 (74b94a7)
250 Unicode-Normalize updated to CPAN release 1.06 (a96160d)
256 =head2 New Documentation
258 =head3 L<perl5121delta>
260 The Perl 5.12.1 perldelta file was added from the Perl maintenance branch
262 =head2 Changes to Existing Documentation
264 =head3 General changes
270 Octal character escapes in documentation now prefer a three-digit octal
271 escape or the new C<\o{}> escape as they have more consistent behavior
272 in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a)
276 Documentation now standardizes on the term 'capture group' over 'buffer'
277 in regular expression documentation (c27a5cf)
287 Added cautionary note about "no VERSION" (e0de7c2)
291 Add additional notes regarding srand and forking (d460397)
301 Improved documentation of unusual character escapes (bf82ca4)
305 Clarifies how hexadecimal escapes are interpreted, with particular
306 attention to the treatment of invalid characters. (9644846)
316 Clarifies the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb)
326 Added the policy on compatibility and deprecation along with definitions of
327 terms like "deprecation" (70e4a83)
337 Added examples on the perils of not using \g{} when there are more
338 than nine back-references (9d86067)
348 Some examples updated for modern Perl style (67d00dd)
352 =head1 Utility Changes
360 The remote terminal works after forking and spawns new sessions - one
361 for each forked process.
365 Uses the less pager path from Config instead of searching for it (bf320d6)
369 =head1 Configuration and Compilation
375 Adjusts 'make test.valgrind' to account for cpan/dist/ext separation. (e07ce2e)
385 F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1)
389 Many common testing routines were refactored into t/lib/common.pl
393 Several test files have been modernized to use Test::More
397 =head1 Platform Support
399 =head2 Discontinued Platforms
405 Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in
406 December 2004. Vestigial MacOS Classic specific code has now been removed
407 from other core modules as well (8f8c2a4..c457df0).
411 =head2 Platform-Specific Notes
417 t/io/openpid.t now uses the alarm() watchdog strategy for more
418 robustness. (5732108)
422 =head1 Internal Changes
428 Under some circumstances, the C<CvGV()> field of a CV is now reference
429 counted. To ensure consistent behaviour, direct assignment to it, for
430 example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
431 C<CvGV_set(cv,gv)> has been introduced to perform this operation safely.
432 Note that modification of this field is not part of of the public API,
433 regardless of this new macro. This change caused some
434 L<issues|/"Known Problems"> in modules that used the private C<GvGV()>
439 It is now possible for XS code to hook into Perl's lexical scope
440 mechanism at compile time, using the new C<Perl_blockhook_register>
441 function. See L<perlguts/"Compile-time scope hooks">.
445 Added C<Perl_croak_no_modify()> to implement
446 C<Perl_croak("%s", PL_no_modify)>. (6ad8f25)
450 Added prototypes for C<tie()> and C<untie()> to allow overloading. (RT#75902)
455 Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>. C<my_stat()> and
456 C<my_lstat()> call get magic on the stack arg, so create C<_flags()>
457 variants that allow us to control this. (0d7d409)
461 =head1 Selected Bug Fixes
467 Some work has been done on the internal pointers that link between symbol
468 tables (stashes), typeglobs and subroutines. This has the effect that
469 various edge cases related to deleting stashes or stash entries (e.g.
470 <%FOO:: = ()>), and complex typeglob or code reference aliasing, will no
471 longer crash the interpreter.
475 Fixed readline() when interrupted by signals so it no longer returns
476 the "same thing" as before or random memory.
480 Fixed a regression of kill() when a match variable is used for the
481 process ID to kill. (RT#75812) (8af710e)
485 Fixed several subtle bugs in sort() when @_ is accessed within a subroutine
486 used for sorting. (RT#72334) (8f443ca)
490 Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691)
494 Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381)
498 Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa)
502 Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12.
507 Avoids multiple FETCH/stringify on filetest ops (40c852d)
511 Fixed issue with string C<eval> not detecting taint of overloaded/tied
512 arguments (RT #75716) (895b760)
516 Fix potential crashes of string C<eval> when evaluating a object with
517 overloaded stringification by creating a stringified copy when necessary
522 Fixed bug where overloaded stringification could remove tainting
523 (RT #75716) (a02ec77)
527 Plugs more memory leaks in vms.c. (9e2bec0)
531 Fix pthread include error for Time::Piece (e9f284c)
535 =head1 Known Problems
541 Bug fixes involving CvGV reference counting break L<Sub::Name>. A
542 patch has been sent upstream to the maintainer.
546 readline() returns an empty string instead of undef when it is
547 interrupted by a signal.
557 Retroactively added the Acknowledgements list to L<perl5132delta>,
558 which was excluded in the original release (d1e2db0)
562 =head1 Acknowledgements
564 XXX The list of people to thank goes here.
566 =head1 Reporting Bugs
568 If you find what you think is a bug, you might check the articles
569 recently posted to the comp.lang.perl.misc newsgroup and the perl
570 bug database at http://rt.perl.org/perlbug/ . There may also be
571 information at http://www.perl.org/ , the Perl Home Page.
573 If you believe you have an unreported bug, please run the B<perlbug>
574 program included with your release. Be sure to trim your bug down
575 to a tiny but sufficient test case. Your bug report, along with the
576 output of C<perl -V>, will be sent off to perlbug@perl.org to be
577 analysed by the Perl porting team.
579 If the bug you are reporting has security implications, which make it
580 inappropriate to send to a publicly archived mailing list, then please send
581 it to perl5-security-report@perl.org. This points to a closed subscription
582 unarchived mailing list, which includes all the core committers, who be able
583 to help assess the impact of issues, figure out a resolution, and help
584 co-ordinate the release of patches to mitigate or fix the problem across all
585 platforms on which Perl is supported. Please only use this address for
586 security issues in the Perl core, not for modules independently
591 The F<Changes> file for an explanation of how to view exhaustive details
594 The F<INSTALL> file for how to build Perl.
596 The F<README> file for general stuff.
598 The F<Artistic> and F<Copying> files for copyright information.