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 Time-HiRes updated to CPAN version 1.9721 (68c5b4d)
233 Time-Piece updated to CPAN version 1.20 (90d55c2)
237 Unicode-Collate updated to CPAN version 0.53. Includes Unicode Collation
238 Algorithm 18 (74b94a7)
242 Unicode-Normalize updated to CPAN release 1.06 (a96160d)
248 =head2 New Documentation
250 =head3 L<perl5121delta>
252 The Perl 5.12.1 perldelta file was added from the Perl maintenance branch
254 =head2 Changes to Existing Documentation
256 =head3 General changes
262 Octal character escapes in documentation now prefer a three-digit octal
263 escape or the new C<\o{}> escape as they have more consistent behavior
264 in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a)
268 Documentation now standardizes on the term 'capture group' over 'buffer'
269 in regular expression documentation (c27a5cf)
279 Added cautionary note about "no VERSION" (e0de7c2)
283 Add additional notes regarding srand and forking (d460397)
293 Improved documentation of unusual character escapes (bf82ca4)
297 Clarifies how hexadecimal escapes are interpreted, with particular
298 attention to the treatment of invalid characters. (9644846)
308 Clarifies the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb)
318 Added the policy on compatibility and deprecation along with definitions of
319 terms like "deprecation" (70e4a83)
329 Added examples on the perils of not using \g{} when there are more
330 than nine back-references (9d86067)
340 Some examples updated for modern Perl style (67d00dd)
344 =head1 Utility Changes
352 The remote terminal works after forking and spawns new sessions - one
353 for each forked process.
357 Uses the less pager path from Config instead of searching for it (bf320d6)
361 =head1 Configuration and Compilation
367 Adjusts 'make test.valgrind' to account for cpan/dist/ext separation. (e07ce2e)
377 F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1)
381 Many common testing routines were refactored into t/lib/common.pl
385 Several test files have been modernized to use Test::More
389 =head1 Platform Support
391 =head2 Discontinued Platforms
397 Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in
398 December 2004. Vestigial MacOS Classic specific code has now been removed
399 from other core modules as well (8f8c2a4..c457df0).
403 =head2 Platform-Specific Notes
409 t/io/openpid.t now uses the alarm() watchdog strategy for more
410 robustness. (5732108)
414 =head1 Internal Changes
420 Under some circumstances, the C<CvGV()> field of a CV is now reference
421 counted. To ensure consistent behaviour, direct assignment to it, for
422 example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
423 C<CvGV_set(cv,gv)> has been introduced to perform this operation safely.
424 Note that modification of this field is not part of of the public API,
425 regardless of this new macro.
429 It is now possible for XS code to hook into Perl's lexical scope
430 mechanism at compile time, using the new C<Perl_blockhook_register>
431 function. See L<perlguts/"Compile-time scope hooks">.
435 Added C<Perl_croak_no_modify()> to implement
436 C<Perl_croak("%s", PL_no_modify)>. (6ad8f25)
440 Added prototypes for C<tie()> and C<untie()> to allow overloading. (RT#75902)
445 Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>. C<my_stat()> and
446 C<my_lstat()> call get magic on the stack arg, so create C<_flags()>
447 variants that allow us to control this. (0d7d409)
451 =head1 Selected Bug Fixes
457 Some work has been done on the internal pointers that link between symbol
458 tables (stashes), typeglobs and subroutines. This has the effect that
459 various edge cases related to deleting stashes or stash entries (e.g.
460 <%FOO:: = ()>), and complex typeglob or code reference aliasing, will no
461 longer crash the interpreter.
465 Fixed readline() when interrupted by signals so it no longer returns
466 the "same thing" as before or random memory.
470 Fixed a regression of kill() when a match variable is used for the
471 process ID to kill. (RT#75812) (8af710e)
475 Fixed several subtle bugs in sort() when @_ is accessed within a subroutine
476 used for sorting. (RT#72334) (8f443ca)
480 Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691)
484 Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381)
488 Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa)
492 Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12.
497 Avoids multiple FETCH/stringify on filetest ops (40c852d)
501 Fixed issue with string C<eval> not detecting taint of overloaded/tied
502 arguments (RT #75716) (895b760)
506 Fix potential crashes of string C<eval> when evaluating a object with
507 overloaded stringification by creating a stringified copy when necessary
512 Fixed bug where overloaded stringification could remove tainting
513 (RT #75716) (a02ec77)
517 Plugs more memory leaks in vms.c. (9e2bec0)
521 Fix pthread include error for Time::Piece (e9f284c)
525 =head1 Known Problems
531 Bug fixes involving CvGV reference counting break L<Sub::Name>. A
532 patch has been sent upstream to the maintainer.
536 readline() returns an empty string instead of undef when it is
537 interrupted by a signal.
547 Retroactively added the Acknowledgements list to L<perl5132delta>,
548 which was excluded in the original release (d1e2db0)
552 =head1 Acknowledgements
554 XXX The list of people to thank goes here.
556 =head1 Reporting Bugs
558 If you find what you think is a bug, you might check the articles
559 recently posted to the comp.lang.perl.misc newsgroup and the perl
560 bug database at http://rt.perl.org/perlbug/ . There may also be
561 information at http://www.perl.org/ , the Perl Home Page.
563 If you believe you have an unreported bug, please run the B<perlbug>
564 program included with your release. Be sure to trim your bug down
565 to a tiny but sufficient test case. Your bug report, along with the
566 output of C<perl -V>, will be sent off to perlbug@perl.org to be
567 analysed by the Perl porting team.
569 If the bug you are reporting has security implications, which make it
570 inappropriate to send to a publicly archived mailing list, then please send
571 it to perl5-security-report@perl.org. This points to a closed subscription
572 unarchived mailing list, which includes all the core committers, who be able
573 to help assess the impact of issues, figure out a resolution, and help
574 co-ordinate the release of patches to mitigate or fix the problem across all
575 platforms on which Perl is supported. Please only use this address for
576 security issues in the Perl core, not for modules independently
581 The F<Changes> file for an explanation of how to view exhaustive details
584 The F<INSTALL> file for how to build Perl.
586 The F<README> file for general stuff.
588 The F<Artistic> and F<Copying> files for copyright information.