5 perl5133delta - what is new for perl v5.13.3
9 This document describes differences between the 5.13.3 release and
12 If you are upgrading from an earlier release such as 5.13.1, first read
13 L<perl5132delta>, which describes differences between 5.13.1 and
16 =head1 Core Enhancements
18 =head2 \o{...} for octals
20 There is a new escape sequence, C<"\o">, in double-quote-like contexts.
21 It must be followed by braces enclosing an octal number of at least one
22 digit. It interpolates as the character with an ordinal value equal to
23 the octal number. This construct allows large octal ordinals beyond the
24 current max of 0777 to be represented. It also allows you to specify a
25 character in octal which can safely be concatenated with other regex
26 snippets and which won't be confused with being a backreference to
27 a regex capture group. See L<perlre/Capture groups>.
29 =head2 C<\N{I<name>}> and C<charnames> enhancements
31 C<\N{}> and C<charnames::vianame> now know about the abbreviated
32 character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., as
33 well as all the customary abbreviations for the C0 and C1 control
34 characters (such as ACK, BEL, CAN, etc.), as well as a few new variants
35 in common usage of some C1 full names.
37 In the past, it was ineffective to override one of Perl's abbreviations
38 with your own custom alias. Now it works.
40 You can also create a custom alias directly to the ordinal of a
41 character, known by C<\N{...}>, C<charnames::vianame()>, and
42 C<charnames::viacode()>. Previously, an alias had to be to an official
43 Unicode character name. This made it impossible to create an alias for
44 a code point that had no name, such as the ones reserved for private
45 use. So this change allows you to make more effective use of private
46 use characters. Only if there is no official name will
47 C<charnames::viacode()> return your custom one.
49 See L<charnames> for details on all these changes.
51 =head2 Uppercase X/B allowed in hexadecimal/binary literals
53 Literals may now use either upper case C<0X...> or C<0B...> prefixes,
54 in addition to the already supported C<0x...> and C<0b...>
55 syntax. (RT#76296) (a674e8d, 333f87f)
57 C, Ruby, Python and PHP already supported this syntax, and it makes
58 Perl more internally consistent. A round-trip with C<eval sprintf
59 "%#X", 0x10> now returns C<16> in addition to C<eval sprintf "%#x",
60 0x10>, which worked before.
62 =head1 Incompatible Changes
66 Use of C<\400> - C<\777> in regexes in certain circumstances has given
67 different, anomalous behavior than their use in all other
68 double-quote-like contexts. Since 5.10.1, a deprecated warning message
69 has been raised when this happens. Now, all double-quote-like contexts
70 have the same behavior, namely to be equivalent to C<\x{100}> -
71 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
73 files whole; previously, this was documented only for C<"-0777">. It is
74 recommended, however, because of various ambiguities, to use the new
75 C<\o{...}> construct to represent characters in octal.
80 =head2 Omitting a space between a regular expression and subsequent word
82 Omitting a space between a regex pattern or pattern modifiers and the
83 following word is deprecated. Deprecation for regular expression
84 I<matches> was added in Perl 5.13.2. In this release, the deprecation
85 is extended to regular expression I<substitutions>. For example,
86 C<< s/foo/bar/sand $bar >> will still be parsed as
87 C<< s/foo/bar/s and $bar >> but will issue a warning. (aa78b66)
89 =head2 Deprecation warning added for deprecated-in-core .pl libs
91 This is a mandatory warning, not obeying -X or lexical warning bits.
92 The warning is modelled on that supplied by deprecate.pm for
93 deprecated-in-core .pm libraries. It points to the specific CPAN
94 distribution that contains the .pl libraries. The CPAN version, of
95 course, does not generate the warning. (0111154)
97 =head1 Performance Enhancements
99 There are several small optimizations to reduce CPU cache misses in various very
100 commonly used modules like C<warnings> and C<Carp> as well in accessing
101 file-handles for reading.
103 =head1 Modules and Pragmata
105 =head2 Updated Modules and Pragmata
111 Upgraded from version 2.06_01 to 2.10.
115 Upgraded from version 1.08 to 1.10.
117 C<viacode()> is now significantly faster. (f3227b7)
121 Upgraded from version 0.62 to 0.63.
125 Upgraded from version 1.77_02 to 1.77_03.
127 =item C<threads::shared>
129 Upgraded from version 1.33_01 to 1.33_02.
133 Upgraded from version 1.09 to 1.10.
135 Calling C<use warnings> without arguments is now significantly more efficient.
138 =item C<Archive::Extract>
140 Upgraded from version 0.38 to 0.42.
142 Updates since 0.38 include: a safe print method that guards
143 Archive::Extract from changes to $\; a fix to the tests when run in core
144 perl; support for TZ files; and a modification for the lzma logic to favour
145 IO::Uncompress::Unlzma (d7f8799)
147 =item C<Archive::Tar>
149 Upgraded from version 1.54 to 1.64.
151 Important changes since 1.54 include: compatibility with busybox
152 implementations of tar; a fix so that C<write()> and C<create_archive()>
153 close only handles they opened; and a bug was fixed regarding the exit code
154 of extract_archive. (afabe0e)
156 =item C<Attribute::Handlers>
158 Upgraded from version 0.87 to 0.88.
160 =item C<Compress::Raw::Bzip2>
162 Upgraded from version 2.024 to 2.027.
164 =item C<Compress::Raw::Zlib>
166 Upgraded from version 2.024 to 2.027_01.
168 =item C<Compress::Zlib>
170 Upgraded from version 2.024 to 2.027.
174 Upgraded from version 0.90 to 0.9007.
176 Fixed the shell test to skip if test is not being run under a terminal;
177 resolved the issue where a prereq on Config would not be recognised as a
178 core module. (d4e225a)
182 Upgraded from version 2.39 to 2.40.
186 Upgraded from version 5.47 to 5.48.
190 Upgraded from version 5.64_02 to 5.64_03.
192 Exporter no longer overrides C<$SIG{__WARN__}> (RT #74472) (9b86bb5)
194 =item C<ExtUtils::CBuilder>
196 Upgraded from version 0.27 to 0.2703.
198 =item C<ExtUtils::Manifest>
200 Upgraded from version 1.57 to 1.58.
202 =item C<ExtUtils::ParseXS>
204 Upgraded from version 2.2205 to 2.2206.
208 Upgraded from version 2.19 to 2.20.
210 Skips suid tests on a nosuid partition. These tests were being skipped on
211 OpenBSD, but nosuid partitions can exist on other systems too. Now it just
212 checks if it can create a suid directory, if not the tests are skipped.
213 Perl builds without errors in a nosuid /tmp with this patch. (cae9400)
215 =item C<I18N::LangTags>
217 Upgraded from version 0.35 to 0.35_01.
221 Upgraded from version 0.58 to 0.60.
225 Upgraded from version 2.01 to 2.03.
227 =item C<Locale::Maketext>
229 Upgraded from version 1.14 to 1.15.
231 Locale::Maketext guts have been merged back into the main module (87d86da)
232 and adds external cache support (ace47d6)
234 =item C<Module::Build>
236 Upgraded from version 0.3603 to 0.3607.
238 =item C<Module::CoreList>
240 Upgraded from version 2.34 to 2.36.
242 =item C<Module::Load>
244 Upgraded from version 0.16 to 0.18.
246 =item C<Term::ANSIColor>
248 Upgraded from version 2.02 to 3.00.
250 =item C<Test::Harness>
252 Upgraded from version 3.17 to 3.21.
254 The core update from Test-Harness 3.17 to 3.21 fixed some things, but
255 also L<introduced a known problem|/"Known Problems"> with argument
256 passing to non-Perl tests.
260 Upgraded from version 1.9719 to 1.9721.
264 Upgraded from version 1.15_01 to 1.20_01.
266 =item C<Unicode::Collate>
268 Upgraded from version 0.52_01 to 0.53.
270 Includes Unicode Collation Algorithm 18 (74b94a7)
272 =item C<Unicode::Normalize>
274 Upgraded from version 1.03 to 1.06.
280 =head2 New Documentation
282 =head3 L<perl5121delta>
284 The Perl 5.12.1 perldelta file was added from the Perl maintenance branch
286 =head2 Changes to Existing Documentation
288 =head3 General changes
294 Octal character escapes in documentation now prefer a three-digit octal
295 escape or the new C<\o{...}> escape as they have more consistent behavior
296 in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a)
300 Documentation now standardizes on the term 'capture group' over 'buffer'
301 in regular expression documentation (c27a5cf)
311 Added cautionary note about "no VERSION" (e0de7c2)
315 Added additional notes regarding srand when forking (d460397)
325 Improved documentation of unusual character escapes (4068718, 9644846)
329 Clarified how hexadecimal escapes are interpreted, with particular
330 attention to the treatment of invalid characters (9644846)
340 Clarified the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb)
350 Added the policy on compatibility and deprecation along with definitions of
351 terms like "deprecation" (70e4a83)
361 Added examples of the perils of not using \g{} when there are more
362 than nine back-references (9d86067)
372 Updated some examples for modern Perl style (67d00dd)
376 =head1 Utility Changes
384 The remote terminal works after forking and spawns new sessions - one
385 for each forked process (11653f7)
389 Uses the less pager path from Config instead of searching for it (bf320d6)
393 =head1 Configuration and Compilation
399 Adjusted 'make test.valgrind' to account for cpan/dist/ext separation
410 F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1)
414 Many common testing routines were refactored into t/lib/common.pl
418 Several test files have been modernized to use Test::More
422 =head1 Platform Support
424 =head2 Discontinued Platforms
430 Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in
431 December 2004. Vestigial MacOS Classic specific code has now been removed
432 from other core modules as well (8f8c2a4..c457df0)
436 =head2 Platform-Specific Notes
442 t/io/openpid.t now uses the alarm() watchdog strategy for more
447 =head1 Internal Changes
453 Under some circumstances, the C<CvGV()> field of a CV is now reference
454 counted. To ensure consistent behaviour, direct assignment to it, for
455 example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
456 C<CvGV_set(cv,gv)> has been introduced to perform this operation safely.
457 Note that modification of this field is not part of of the public API,
458 regardless of this new macro. This change caused some
459 L<issues|/"Known Problems"> in modules that used the private C<GvGV()>
464 It is now possible for XS code to hook into Perl's lexical scope
465 mechanism at compile time, using the new C<Perl_blockhook_register>
466 function. See L<perlguts/"Compile-time scope hooks">.
470 Added C<Perl_croak_no_modify()> to implement
471 C<Perl_croak("%s", PL_no_modify)> (6ad8f25)
475 Added prototypes for C<tie()> and C<untie()> to allow overloading (RT#75902)
480 Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>. C<my_stat()> and
481 C<my_lstat()> call get magic on the stack arg, so create C<_flags()>
482 variants that allow us to control this. (0d7d409)
486 =head1 Selected Bug Fixes
492 Some work has been done on the internal pointers that link between symbol
493 tables (stashes), typeglobs and subroutines. This has the effect that
494 various edge cases related to deleting stashes or stash entries (e.g.
495 <%FOO:: = ()>), and complex typeglob or code reference aliasing, will no
496 longer crash the interpreter.
500 Fixed readline() when interrupted by signals so it no longer returns
501 the "same thing" as before or random memory
505 Fixed a regression of kill() when a match variable is used for the
506 process ID to kill (RT#75812) (8af710e)
510 Fixed several subtle bugs in sort() when @_ is accessed within a subroutine
511 used for sorting (RT#72334) (8f443ca)
515 Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691)
519 Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381)
523 Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa)
527 Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12
532 Avoids multiple FETCH/stringify on filetest ops (40c852d)
536 Fixed issue with string C<eval> not detecting taint of overloaded/tied
537 arguments (RT #75716) (895b760)
541 Fix potential crashes of string C<eval> when evaluating a object with
542 overloaded stringification by creating a stringified copy when necessary
547 Fixed bug where overloaded stringification could remove tainting
548 (RT #75716) (a02ec77)
552 Plugs more memory leaks in vms.c. (9e2bec0)
556 Fix pthread include error for Time::Piece (e9f284c)
560 =head1 Known Problems
566 Bug fixes involving CvGV reference counting break Sub::Name. A
567 patch has been sent upstream to the maintainer
571 readline() returns an empty string instead of undef when it is
572 interrupted by a signal
576 Test-Harness was updated from 3.17 to 3.21 for this release. A rewrite
577 in how it handles non-Perl tests (in 3.17_01) broke argument passing to
578 non-Perl tests with L<prove> (RT #59186), and required that non-Perl
579 tests be run as C<prove ./test.sh> instead of C<prove test.sh> These
580 issues are being solved upstream, but didn't make it into this release.
581 They're expected to be fixed in time for perl v5.13.4. (RT #59457)
585 C<version> now prevents object methods from being called as class methods
596 Retroactively added the Acknowledgements list to L<perl5132delta>,
597 which was excluded in the original release (d1e2db0)
601 =head1 Acknowledgements
603 Perl 5.13.3 represents approximately one month of development since Perl
604 5.13.2, and contains 12,184 lines of changes across 575 files from 104
605 authors and committers.
607 Thank you to the following for contributing to this release:
609 Abhijit Menon-Sen, Abigail, Alex Davies, Alex Vandiver, Alexandr
610 Ciornii, Andreas J. Koenig, Andrew Rodland, Andy Dougherty, Aristotle
611 Pagaltzis, Arkturuz, Ben Morrow, Bo Borgerson, Bo Lindbergh, Brad
612 Gilbert, Bram, Brian Phillips, Chas. Owens, Chip Salzenberg, Chris
613 Williams, Craig A. Berry, Curtis Jewell, Dan Dascalescu, Daniel
614 Frederick Crisman, Dave Rolsky, David Caldwell, David E. Wheeler, David
615 Golden, David Leadbeater, David Mitchell, Dennis Kaarsemaker, Eric
616 Brine, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gene
617 Sullivan, George Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham
618 Barr, H.Merijn Brand, Harmen, Hugo van der Sanden, James E Keenan, James
619 Mastros, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Jim Cromie, John
620 Peacock, Jos Boumans, Josh ben Jore, Karl Williamson, Kevin Ryde, Leon
621 Brocard, Lubomir Rintel, Maik Hentsche, Marcus Holland-Moritz, Matt
622 Johnson, Matt S Trout, Max Maischein, Michael Breen, Michael G Schwern,
623 Moritz Lenz, Nga Tang Chan, Nicholas Clark, Nick Cleaton, Nick Johnston,
624 Niko Tyni, Offer Kaye, Paul Marquess, Philip Hazel, Philippe Bruhat,
625 Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes,
626 Richard Soderberg, Robin Barker, Ruslan Zakirov, Salvador Fandino,
627 Salvador Ortiz Garcia, Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic,
628 Steffen Mueller, Stepan Kasal, Steve Hay, Steve Peters, Sullivan Beck,
629 Tim Bunce, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook,
630 Vincent Pit, Yuval Kogman, Yves Orton, Zefram, brian d foy, chromatic,
631 kmx, Ævar Arnfjörð Bjarmason
633 =head1 Reporting Bugs
635 If you find what you think is a bug, you might check the articles
636 recently posted to the comp.lang.perl.misc newsgroup and the perl
637 bug database at http://rt.perl.org/perlbug/ . There may also be
638 information at http://www.perl.org/ , the Perl Home Page.
640 If you believe you have an unreported bug, please run the B<perlbug>
641 program included with your release. Be sure to trim your bug down
642 to a tiny but sufficient test case. Your bug report, along with the
643 output of C<perl -V>, will be sent off to perlbug@perl.org to be
644 analysed by the Perl porting team.
646 If the bug you are reporting has security implications, which make it
647 inappropriate to send to a publicly archived mailing list, then please send
648 it to perl5-security-report@perl.org. This points to a closed subscription
649 unarchived mailing list, which includes all the core committers, who be able
650 to help assess the impact of issues, figure out a resolution, and help
651 co-ordinate the release of patches to mitigate or fix the problem across all
652 platforms on which Perl is supported. Please only use this address for
653 security issues in the Perl core, not for modules independently
658 The F<Changes> file for an explanation of how to view exhaustive details
661 The F<INSTALL> file for how to build Perl.
663 The F<README> file for general stuff.
665 The F<Artistic> and F<Copying> files for copyright information.