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)
202 These tests were being skipped on OpenBSD, but nosuid partitions can
203 exist on other systems too. Now it just checks if it can create a suid
204 directory, if not the tests are skipped.
206 Perl builds without errors in a nosuid /tmp with this patch.
210 IO-Compress upated to CPAN version 2.027 (e8796d6)
214 IPC-Cmd updated to CPAN version 0.60 (e667e1e)
218 IPC-SysV updated to CPAN version 2.03 (10613b6)
222 Locale::Maketext guts have been merged back into the main module (87d86da)
223 and adds external cache support (ace47d6)
227 Module-Build updated to CPAN version 0.3607 (40c9afb)
231 Module-Load updated to CPAN version 0.18 (93eaa32)
235 Term-ANSIColor to CPAN version 3.00 (2c33c76)
239 Test-Harness to CPAN version 3.21 (6d31366)
243 Time-HiRes updated to CPAN version 1.9721 (68c5b4d)
247 Time-Piece updated to CPAN version 1.20 (90d55c2)
251 Unicode-Collate updated to CPAN version 0.53. Includes Unicode Collation
252 Algorithm 18 (74b94a7)
256 Unicode-Normalize updated to CPAN release 1.06 (a96160d)
262 =head2 New Documentation
264 =head3 L<perl5121delta>
266 The Perl 5.12.1 perldelta file was added from the Perl maintenance branch
268 =head2 Changes to Existing Documentation
270 =head3 General changes
276 Octal character escapes in documentation now prefer a three-digit octal
277 escape or the new C<\o{}> escape as they have more consistent behavior
278 in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a)
282 Documentation now standardizes on the term 'capture group' over 'buffer'
283 in regular expression documentation (c27a5cf)
293 Added cautionary note about "no VERSION" (e0de7c2)
297 Add additional notes regarding srand and forking (d460397)
307 Improved documentation of unusual character escapes (bf82ca4)
311 Clarifies how hexadecimal escapes are interpreted, with particular
312 attention to the treatment of invalid characters. (9644846)
322 Clarifies the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb)
332 Added the policy on compatibility and deprecation along with definitions of
333 terms like "deprecation" (70e4a83)
343 Added examples on the perils of not using \g{} when there are more
344 than nine back-references (9d86067)
354 Some examples updated for modern Perl style (67d00dd)
358 =head1 Utility Changes
366 The remote terminal works after forking and spawns new sessions - one
367 for each forked process.
371 Uses the less pager path from Config instead of searching for it (bf320d6)
375 =head1 Configuration and Compilation
381 Adjusts 'make test.valgrind' to account for cpan/dist/ext separation. (e07ce2e)
391 F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1)
395 Many common testing routines were refactored into t/lib/common.pl
399 Several test files have been modernized to use Test::More
403 =head1 Platform Support
405 =head2 Discontinued Platforms
411 Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in
412 December 2004. Vestigial MacOS Classic specific code has now been removed
413 from other core modules as well (8f8c2a4..c457df0).
417 =head2 Platform-Specific Notes
423 t/io/openpid.t now uses the alarm() watchdog strategy for more
424 robustness. (5732108)
428 =head1 Internal Changes
434 Under some circumstances, the C<CvGV()> field of a CV is now reference
435 counted. To ensure consistent behaviour, direct assignment to it, for
436 example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
437 C<CvGV_set(cv,gv)> has been introduced to perform this operation safely.
438 Note that modification of this field is not part of of the public API,
439 regardless of this new macro. This change caused some
440 L<issues|/"Known Problems"> in modules that used the private C<GvGV()>
445 It is now possible for XS code to hook into Perl's lexical scope
446 mechanism at compile time, using the new C<Perl_blockhook_register>
447 function. See L<perlguts/"Compile-time scope hooks">.
451 Added C<Perl_croak_no_modify()> to implement
452 C<Perl_croak("%s", PL_no_modify)>. (6ad8f25)
456 Added prototypes for C<tie()> and C<untie()> to allow overloading. (RT#75902)
461 Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>. C<my_stat()> and
462 C<my_lstat()> call get magic on the stack arg, so create C<_flags()>
463 variants that allow us to control this. (0d7d409)
467 =head1 Selected Bug Fixes
473 Some work has been done on the internal pointers that link between symbol
474 tables (stashes), typeglobs and subroutines. This has the effect that
475 various edge cases related to deleting stashes or stash entries (e.g.
476 <%FOO:: = ()>), and complex typeglob or code reference aliasing, will no
477 longer crash the interpreter.
481 Fixed readline() when interrupted by signals so it no longer returns
482 the "same thing" as before or random memory.
486 Fixed a regression of kill() when a match variable is used for the
487 process ID to kill. (RT#75812) (8af710e)
491 Fixed several subtle bugs in sort() when @_ is accessed within a subroutine
492 used for sorting. (RT#72334) (8f443ca)
496 Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691)
500 Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381)
504 Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa)
508 Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12.
513 Avoids multiple FETCH/stringify on filetest ops (40c852d)
517 Fixed issue with string C<eval> not detecting taint of overloaded/tied
518 arguments (RT #75716) (895b760)
522 Fix potential crashes of string C<eval> when evaluating a object with
523 overloaded stringification by creating a stringified copy when necessary
528 Fixed bug where overloaded stringification could remove tainting
529 (RT #75716) (a02ec77)
533 Plugs more memory leaks in vms.c. (9e2bec0)
537 Fix pthread include error for Time::Piece (e9f284c)
541 =head1 Known Problems
547 Bug fixes involving CvGV reference counting break L<Sub::Name>. A
548 patch has been sent upstream to the maintainer.
552 readline() returns an empty string instead of undef when it is
553 interrupted by a signal.
563 Retroactively added the Acknowledgements list to L<perl5132delta>,
564 which was excluded in the original release (d1e2db0)
568 =head1 Acknowledgements
570 XXX The list of people to thank goes here.
572 =head1 Reporting Bugs
574 If you find what you think is a bug, you might check the articles
575 recently posted to the comp.lang.perl.misc newsgroup and the perl
576 bug database at http://rt.perl.org/perlbug/ . There may also be
577 information at http://www.perl.org/ , the Perl Home Page.
579 If you believe you have an unreported bug, please run the B<perlbug>
580 program included with your release. Be sure to trim your bug down
581 to a tiny but sufficient test case. Your bug report, along with the
582 output of C<perl -V>, will be sent off to perlbug@perl.org to be
583 analysed by the Perl porting team.
585 If the bug you are reporting has security implications, which make it
586 inappropriate to send to a publicly archived mailing list, then please send
587 it to perl5-security-report@perl.org. This points to a closed subscription
588 unarchived mailing list, which includes all the core committers, who be able
589 to help assess the impact of issues, figure out a resolution, and help
590 co-ordinate the release of patches to mitigate or fix the problem across all
591 platforms on which Perl is supported. Please only use this address for
592 security issues in the Perl core, not for modules independently
597 The F<Changes> file for an explanation of how to view exhaustive details
600 The F<INSTALL> file for how to build Perl.
602 The F<README> file for general stuff.
604 The F<Artistic> and F<Copying> files for copyright information.