=encoding utf8 =head1 NAME perldelta - what is new for perl v5.13.2 =head1 DESCRIPTION This document describes differences between the 5.13.2 release and the 5.13.1 release. If you are upgrading from an earlier release such as 5.10, first read L, which describes differences between 5.10 and 5.12. =head1 Notice XXX Any important notices here =head1 Incompatible Changes =head2 localised tied scalars are tied again. The change in behaviour in 5.13.1 of localising tied scalar values has been reverted to the existing 5.12.0 and earlier behaviour (the change for arrays and hashes remains). =head2 Naming fixes in Policy_sh.SH may invalidate Policy.sh Several long-standing typos and naming confusions in Policy_sh.SH have been fixed, standardizing on the variable names used in config.sh. This will change the behavior of Policy.sh if you happen to have been accidentally relying on the Policy.sh incorrect behavior. We'd appreciate feedback from anyone using Policy.sh to be sure nothing is broken by this change (c1bd23). =head1 Core Enhancements XXX New core language features go here. Summarise user-visible core language enhancements. Particularly prominent performance optimisations could go here, but most should go in the L section. =head2 Non-destructive substitution The substitution operator now supports a C option that copies the input variable, carries out the substitution on the copy and returns the result. The original remains unmodified. my $old = 'cat'; my $new = $old =~ s/cat/dog/r; # $old is 'cat' and $new is 'dog' This is particularly useful with C. See L for more examples (4f4d75, 000c65). =head2 package block syntax A package declaration can now contain a code block, in which case the declaration is in scope only inside that block. So C is precisely equivalent to C<{ package Foo; ... }>. It also works with a version number in the declaration, as in C. See L (434da3..36f77d, 702646). =head2 perl -h no longer recommends -w perl -h used to mark the -w option as recommended; since this option is far less useful than it used to be due to lexical 'use warnings' and since perl -h is primary a list and brief explanation of the command line switches, the recommendation has now been removed (60eaec). =head1 New Platforms XXX List any platforms that this version of perl compiles on, that previous versions did not. These will either be enabled by new files in the F directories, or new subdirectories and F files at the top level of the source tree. =head1 Modules and Pragmata XXX All changes to installed files in F, F, F and F go here. If Module::CoreList is updated, generate an initial draft of the following sections using F, which prints stub entries to STDOUT. Results can be pasted in place of the '=head2' entries below. A paragraph summary for important changes should then be added by hand. In an ideal world, dual-life modules would have a F file that could be cribbed. =head2 New Modules and Pragmata =head2 Pragmata Changes =head2 Updated Modules =head2 Locale-Codes 3.13 Locale::Country, Locale::Language and Locale::Currency were updated from 3.12 to 3.13 of the Locale-Codes distribution to include locale code changes (e1137b). =head2 Thread-Semaphore 2.11 Added new methods ->down_nb() and ->down_force() at the suggestion of Rick Garlick. Refactored methods to skip argument validation when no argument is supplied. (04febe, f06daa) =head2 CPAN.pm 1.94_57 * release 1.94_57 * bugfix: treat modules correctly that are deprecated in perl 5.12. * bugfix: RT #57482 and #57788 revealed that configure_requires implicitly assumed build_requires instead of normal requires. (Reported by Andrew Whatson and Father Chrysostomos respectively) * testfix: solaris should run the tests without expect because (some?) solaris have a broken expect * testfix: run tests with cache_metadata off to prevent spill over effects from previous test runs (742adb) =head2 Removed Modules and Pragmata =head1 Utility Changes XXX Changes to installed programs such as F and F go here. Most of these are built within the directories F and F. =over 4 =item F XXX =back =head1 New Documentation XXX Changes which create B files in F go here. =over 4 =item L XXX =back =head1 Changes to Existing Documentation XXX Changes which significantly change existing files in F go here. Any changes to F should go in L. =head2 Replace wrong tr/// table in perlebcdic.pod perlebcdic.pod contains a helpful table to use in tr/// to convert between EBCDIC and Latin1/ASCII. Unfortunately, the table was the inverse of the one it describes, though the code that used the table worked correctly for the specific example given. The table has been changed to its inverse, and the sample code changed to correspond, as this is easier for the person trying to follow the instructions since deriving the old table is somewhat more complicated. The table has also been changed to hex from octal, as that is more the norm these days, and the recipes in the pod altered to print out leading zeros to make all the values the same length, as the table that they can generate has them (5f26d5). =head2 Document tricks for user-defined casing perlunicode.pod now contains an explanation of how to override, mangle and otherwise tweak the way perl handles upper, lower and other case conversions on unicode data, and how to provide scoped changes to alter one's own code's behaviour without stomping on anybody else (71648f). =head2 Document $# and $* as removed and clarify $#array usage $# and $* were both disabled as of perl5 version 10; this release adds documentation to that effect, a description of the results of continuing to try and use them, and a note explaining that $# can also function as a sigil in the $#array form (7f315d2). =head2 INSTALL explicitly states the requirement for C89 This was already true but it's now Officially Stated For The Record (51eec7). =head2 No longer advertise Math::TrulyRandom This module hasn't been updated since 1996 so we can't recommend it any more (83918a). =head1 Performance Enhancements Only allocate entries for @_ on demand - this not only saves memory per subroutine defined but should hopefully improve COW behaviour (77bac2). Multiple small improvements to threads: =over 4 =item * Change the internal structured of thread->params from an SV (RV) to an AV - so we now pass around and store the array directly, rather than creating, holding and dereferencing a reference to it (78b7eff). =item * Change S_ithread_create() params from a single AV* to a pair of SV** pointers. This saves creating, duplicating and freeing and AV, which is only ever used for an internal calling convention (4cf5ea). =item * Remove redundant hv_exists() calls from ithread_create()'s spec parser (b1faab). =item * Skip unnecessary newAV() in ithread_create() (39f3f7). =item * Avoid duping pads created for recursion since there's no point pre-allocating the same memory in the new thread (6de654). =back Eliminated xhv_fill from struct xpvhv: This saves 1 IV per hash and on some systems will cause struct xpvhv to become cache aligned. To avoid this memory saving causing a slowdown elsewhere, boolean use of HvFILL now calls HvTOTALKEYS instead (which is equivalent) - so while the fill data when actually required is now calculated on demand, the cases when this needs to be done should be few and far between (f4431c .. fcd245). The foldEQ_utf8 API function for case-insensitive comparison of strings (which is used heavily by the regexp engine) was substantially refactored and optimised - and its documentation much improved as a free bonus gift (8b3587, e6226b). =head1 Installation and Configuration Improvements XXX Changes to F, F, F, and analogous tools go here. =head2 Configuration improvements XXX =head2 Compilation improvements Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under $(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME). This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and 'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now set correctly (23ae7f). =head2 Platform Specific Changes =over 4 =item XXX-some-platform XXX =back =head1 Selected Bug Fixes Timely cleanup of SVs that are cloned into a new thread but then discovered to be orphaned (i.e. their owners are -not- cloned) (e42956) Don't accidentally clone lexicals in scope within active stack frames in the parent when creating a child thread (RT #73086) (05d04d). Avoid loading feature.pm when 'no 5.13.2;' or similar is encountered (faee19). Trap invalid use of SvIVX on SVt_REGEXP when assertions are on (e77da3) Don't stamp on $DB::single, $DB::trace and $DB::signal if they already have values when $^P is assigned to (RT #72422) (4c0f30). chop now correctly handles perl's extended UTF-8 (RT #73246) (65ab92) Defer signal handling when shared SV locks are held to avoid deadlocks (RT #74868) (65c742). glob() no longer crashes when %File::Glob:: is empty and CORE::GLOBAL::glob isn't present (4984aa). perlbug now always permits the sender address to be changed before sending - if you were having trouble sending bug reports before now, this should fix it, we hope (e6eb90). =over 4 =item * Overloading now works properly in conjunction with tied variables. What formerly happened was that most ops checked their arguments for overloading I checking for magic, so for example an overloaded object returned by a tied array access would usually be treated as not overloaded (RT #57012) (6f1401, ed3b9b, 6a5f8c .. 24328f). =back Independently, a bug was fixed that prevented $tied->() from always calling FETCH correctly (RT #8438) (7c7501) =head1 New or Changed Diagnostics XXX New or changed warnings emitted by the core's C code go here. =over 4 =item C XXX =back =head1 Changed Internals XXX Changes which affect the interface available to C code go here. =over 4 =item * The C function has been deprecated. It appeared that its design was insufficient to reliably get the lexical C<$_> at run-time. Use the new C function or the C macro instead. They directly return the right SV representing C<$_>, whether it's lexical or dynamic (789bd8 .. 03d5bc). =item * The following new functions or macros have been added to the public API: C, C, C. =item * The C macro now calls C. C is now a noop but should still be used to ensure past and future compatibility. =item * The ibcmp_* functions have been renamed and are now called foldEQ, foldEQ_locale and foldEQ_utf8 (e6226b). =item * The ibcmp_* functions have been renamed and are now called foldEQ, foldEQ_locale and foldEQ_utf8 (e6226b). =back =head1 New Tests XXX Changes which create B files in F go here. Changes to existing files in F aren't worth summarising, although the bugs that they represent may be. =over 4 =item F XXX =back =head1 Known Problems XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any tests that had to be Ced for the release would be noted here, unless they were specific to a particular platform (see below). This is a list of some significant unfixed bugs, which are regressions from either 5.XXX.XXX or 5.XXX.XXX. =over 4 =item * XXX =back =head1 Deprecations XXX Add any new known deprecations here. The following items are now deprecated. =over 4 =item * Omitting a space between a regex pattern or pattern modifiers and the following word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed as C<< m/foo/s and $bar >> but will issue a warning. =back =head1 Platform Specific Notes XXX Any changes specific to a particular platform. VMS and Win32 are the usual stars here. It's probably best to group changes under the same section layout as the main perldelta =head1 Obituary XXX If any significant core contributor has died, we've added a short obituary here. =head1 Acknowledgements XXX The list of people to thank goes here. Your humble release manager would like to specifically call out Karl Williamson for making the tests a better place to be, and Shlomi Fish for a passel of tiny incremental docfixes of the sort that don't get made often enough. =head1 Reporting Bugs If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , the Perl Home Page. If you believe you have an unreported bug, please run the B program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of C, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN. =head1 SEE ALSO The F file for an explanation of how to view exhaustive details on what changed. The F file for how to build Perl. The F file for general stuff. The F and F files for copyright information. =cut