This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta update
[perl5.git] / pod / perldelta.pod
index a1df93a..ceda45a 100644 (file)
@@ -1,23 +1,24 @@
 =encoding utf8
 
 =for comment
-This has been completed up to 527d644b124fe.
+This has been completed up to 3ea0c5818 except for:
+a1da11a30dfa4f3543dcab00834ff535202f5085 (GNU/Hurd hints)
 
 =head1 NAME
 
 [ this is a template for a new perldelta file. Any text flagged as
 XXX needs to be processed before release. ]
 
-perldelta - what is new for perl v5.15.3
+perldelta - what is new for perl v5.15.5
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.15.2 release and
-the 5.15.3 release.
+This document describes differences between the 5.15.4 release and
+the 5.15.5 release.
 
-If you are upgrading from an earlier release such as 5.15.1, first read
-L<perl5152delta>, which describes differences between 5.15.1 and
-5.15.2.
+If you are upgrading from an earlier release such as 5.15.3, first read
+L<perl5154delta>, which describes differences between 5.15.3 and
+5.15.4.
 
 =head1 Notice
 
@@ -29,17 +30,15 @@ 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</Performance Enhancements> section.
 
-[ List each enhancement as a =head2 entry ]
+=head2 C<$[> is back
 
-=head2 More CORE subs are callable through references
+The C<$[> variable is back again, but is now implemented as a module, so
+programs that do not mention it (i.e., most of them), will not incur any
+run-time penalty.  It is disabled in the scope of C<use v5.16>.
 
-Perl 5.15.2 introduced subroutines in the CORE namespace.  Most of them
-could only be called as barewords; i.e., they could be aliased at compile
-time and then inlined under new names.
+XXX That last sentence is not true yet.
 
-Almost all of these functions can now be called through references and via
-C<&foo()> syntax, bypassing the prototype.  See L<CORE> for a list of the
-exceptions.
+The new implementation has some bug fixes.  See L<arybase>.
 
 =head1 Security
 
@@ -49,33 +48,14 @@ L</Selected Bug Fixes> section.
 
 [ List each security issue as a =head2 entry ]
 
-=head2 C<File::Glob::bsd_glob()> memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).
-
-Calling C<File::Glob::bsd_glob> with the unsupported flag GLOB_ALTDIRFUNC would 
-cause an access violation / segfault.  A Perl program that accepts a flags value from
-an external source could expose itself to denial of service or arbitrary code
-execution attacks.  There are no known exploits in the wild.  The problem has been
-corrected by explicitly disabling all unsupported flags and setting unused function
-pointers to null.  Bug reported by ClĂ©ment Lecigne.
-
 =head1 Incompatible Changes
 
-=head2 User-defined case changing operations.
-
-This feature was deprecated in Perl 5.14, and has now been removed.
-The CPAN module L<Unicode::Casing> provides better functionality without
-the drawbacks that this feature had, as are detailed in the 5.14
-documentation:
-L<http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29>
+XXX For a release on a stable branch, this section aspires to be:
 
-=head2 XSUBs are now 'static'
+    There are no changes intentionally incompatible with 5.XXX.XXX
+    If any exist, they are bugs and reports are welcome.
 
-XSUB C functions are now 'static', that is, they are not visible from
-outside the compilation unit. For the exceedingly rare case where
-this is not desired, a new public macro C<XS_EXTERNAL(name)> can be
-used in place of C<XS(name)>. C<ExtUtils::ParseXS> (C<xsubpp>)
-can be made to declare XSUBs with C<XS_EXTERNAL> using the
-C<EXPORT_XSUB_SYMBOLS> keyword, see L<perlxs> for details.
+[ List each incompatible change as a =head2 entry ]
 
 =head1 Deprecations
 
@@ -96,7 +76,12 @@ may well be none in a stable release.
 
 =item *
 
-XXX
+Due to changes in L<File::Glob>, Perl's C<glob> function and its
+C<< <...> >> equivalent are now much faster.  The splitting of the pattern
+into words has been rewritten in C, resulting in speed-ups of 20% in some
+cases.
+
+This does not affect VMS, as it does not use File::Glob.
 
 =back
 
@@ -118,7 +103,7 @@ cribbed.
 
 =item *
 
-XXX
+L<arybase> -- this new module implements the C<$[> variable.
 
 =back
 
@@ -128,65 +113,71 @@ XXX
 
 =item *
 
-L<AnyDBM_File> has been upgraded from version 1.00 to version 1.01.
-
-This is only a minor documentation update.
+L<Archive::Extract> has been upgraded from version 0.56 to version 0.58.
 
 =item *
 
-L<Archive::Extract> has been upgraded from version 0.52 to version 0.56.
+L<B::Deparse> has been upgraded from version 1.08 to 1.08.
 
-Resolved an issue where C<unzip> executable was present in C<PATH> on MSWin32
+It now correctly deparses C<CORE::do> and C<CORE::glob>.
 
 =item *
 
-L<CPANPLUS> has been upgraded from version 0.9109 to version 0.9110.
+L<CPANPLUS::Dist::Build> has been upgraded from version 0.58 to version 0.60.
 
 =item *
 
-L<CPANPLUS::Dist::Build> has been upgraded from version 0.56 to version 0.58.
+L<ExtUtils::MakeMaker> has been upgraded from version 6.61_01 to version 6.63_01.
 
 =item *
 
-L<diagnostics> has been upgraded from version 1.24 to version 1.25.
+L<File::Glob> has been upgrade from version 1.13 to 1.14.
 
-It now strips out C<SZ<><...>> formatting codes before displaying
-descriptions [perl #94488].
+It has a new C<:bsd_glob> export tag, intended to replace C<:glob>.  Like
+C<:glob> it overrides C<glob> with a function that does not split the glob
+pattern into words, but, unlike C<:glob>, it iterates properly in scalar
+context, instead of returning the last file.
+
+There are other changes affecting Perl's own C<glob> operator (which uses
+File::Glob internally, except on VMS).  See L</Performance Enhancements>
+and L</Selected Bug Fixes>.
 
 =item *
 
-L<Locale::Codes> has been upgraded from version 3.17 to version 3.18.
+L<HTTP::Tiny> has been upgraded from version 0.013 to version 0.016.
 
-The CIA world added non-standard values, so this is no longer used as a source
-of data.
+Adds additional shorthand methods for all common HTTP verbs,
+a C<post_form()> method for POST-ing x-www-form-urlencoded data and
+a C<www_form_urlencode()> utility method.
 
 =item *
 
-L<File::Glob> has been upgraded from version 1.12 to version 1.13.
-
-See L</Security>.
+L<perlfaq> has been upgraded from version 5.0150035 to version 5.0150036.
 
 =item *
 
-L<Math::BigRat> has been upgraded from version 0.2602 to version 0.2603.
+L<Socket> as been upgraded from version 1.94_01 to 1.94_02.
 
-C<int()> on a Math::BigRat object containing -1/2 now creates a
-Math::BigInt containing 0, rather than -0.  L<Math::BigInt> does not even
-support negative zero, so the resulting object was actually malformed
-[perl #95530].
+It has new functions and constants for handling IPv6 sockets:
 
-=item *
-
-L<Pod::Simple> has been upgraded from version 3.18 to version 3.19.
+    pack_ipv6_mreq
+    unpack_ipv6_mreq
+    IPV6_ADD_MEMBERSHIP
+    IPV6_DROP_MEMBERSHIP
+    IPV6_MTU
+    IPV6_MTU_DISCOVER
+    IPV6_MULTICAST_HOPS
+    IPV6_MULTICAST_IF
+    IPV6_MULTICAST_LOOP
+    IPV6_UNICAST_HOPS
+    IPV6_V6ONLY
 
 =item *
 
-L<POSIX> has been upgraded from version 1.24 to version 1.25.
+L<Unicode::Collate> has been upgraded from version 0.80 to version 0.81.
 
-L<POSIX> no longer uses L<AutoLoader>. Any code which was relying on this
-implementation detail was buggy, and may fail as a result of this change.
-The module's Perl code has been considerably simplified, roughly halving
-the number of lines, with no change in functionality.
+Locales updated to CLDR 2.0: mk, mt, nb, nn, ro, ru.
+Newly supported locales: ml, mr, or, pa.
 
 =back
 
@@ -314,15 +305,7 @@ L</Platform Support> section, instead.
 
 =item *
 
-The file F<global.sym> is no longer needed, and has been removed. It
-contained a list of all exported functions, one of the files generated by
-F<regen/embed.pl> from data in F<embed.fnc> and F<regen/opcodes>. The code
-has been refactored so that the only user of F<global.sym>, F<makedef.pl>,
-now reads F<embed.fnc> and F<regen/opcodes> directly, removing the need to
-store the list of exported functions in an intermediate file.
-
-As F<global.sym> was never installed, this change will not be visible
-outside the build process.
+XXX
 
 =back
 
@@ -340,14 +323,7 @@ that they represent may be covered elsewhere.
 
 =item *
 
-F<t/porting/globvar.t> has been added, to run a sanity check on F<globar.sym>.
-F<globar.sym> is not needed on most *nix platforms, but is for Win32, hence
-previously was it was possible to inadvertently commit changes that worked
-perfectly locally, but broke the build on Win32.
-
-=item *
-
-F<t/op/unlink.t> has been added to test the C<unlink> function.
+XXX
 
 =back
 
@@ -412,7 +388,7 @@ be noted as well.
 
 =item *
 
-XXX
+C<PL_curstash> is now reference-counted.
 
 =back
 
@@ -428,97 +404,67 @@ L</Modules and Pragmata>.
 
 =item *
 
-In Perl 5.15.0 C<defined(${'$'})> stopped returning true if the C<$$>
-variable had not been used yet.  This has been fixed.
-
-=item *
-
-C<defined(${"..."})>, C<defined(*{"..."})>, etc., used to
-return true for most, but not all built-in variables, if
-they had not been used yet.  Many times that new built-in
-variables were added in past versions, this construct was
-not taken into account, so this affected C<${^GLOBAL_PHASE}> and
-C<${^UTF8CACHE}>, among others.  It also used to return false if the
-package name was given as well (C<${"::!"}>) and for subroutines in the
-CORE package [perl #97978] [perl #97492] [perl #97484].
-
-=item *
-
-Perl 5.10.0 introduced a similar bug: C<defined(*{"foo"})> where "foo"
-represents the name of a built-in global variable used to return false if
-the variable had never been used before, but only on the I<first> call.
-This, too, has been fixed.
-
-=item *
+Perl now holds an extra reference count on the package that code is
+currently compiling in.  This means that the following code no longer crashes [perl #101486]:
 
-Various functions that take a filehandle argument in rvalue context
-(C<close>, C<readline>, etc.) used to call C<FETCH> multiple times, if it
-was a tied variable, and warn twice, if it was C<undef> [perl #97482].
+    package Foo;
+    BEGIN {*Foo:: = *Bar::}
+    sub foo;
 
 =item *
 
-C<close> and similar filehandle functions, when called on built-in global
-variables (like C<$+>), used to die if the variable happened to hold the
-undefined value, instead of producing the usual "Use of uninitialized
-value" warning.
+F<dumpvar.pl>, and consequently the C<x> command in the debugger, have been
+fixed to handle objects blessed into classes whose names contain "=".  The
+contents of such objects used not to be dumped [perl #101814].
 
 =item *
 
-When autovivified file handles were introduced in Perl 5.6.0, C<readline>
-was inadvertently made to autovivify when called as C<readline($foo)> (but
-not as C<< <$foo> >>).  It has now been fixed never to autovivify.
+The C<x> repetition operator no longer crashes on 64-bit builds with large
+repeate counts [perl #94560].
 
 =item *
 
-C<defined ${ $tied_variable }> used to call C<FETCH> multiple times, but
-now calls it just once.
+A fix to C<glob> under miniperl (used to configure modules when perl itself
+is built) in Perl 5.15.3 stopped C<< <~> >> from returning the home
+directory, because it cleared %ENV before calling csh.  Now C<$ENV{HOME}>
+is preserved.  This fix probably does not affect anything.  If
+L<File::Glob> fails to load for some reason, Perl reverts to using csh.
+So it would apply in that case.
 
 =item *
 
-Some cases of dereferencing a complex expression, such as
-C<${ (), $tied } = 1>, used to call C<FETCH> multiple times, but now call
-it once.
-
-=item *
-
-For a tied variable returning a package name, C<< $tied->method >> used to
-call C<FETCH> multiple times (even up to six!), and sometimes would
-fail to call the method, due to memory corruption.
-
-=item *
-
-Calling an undefined anonymous subroutine (e.g., what $x holds after
-C<undef &{$x = sub{}}>) used to cause a "Not a CODE reference" error, which
-has been corrected to "Undefined subroutine called" [perl #71154].
-
-=item *
+On OSes other than VMS, Perl's C<glob> operator (and the C<< <...> >> form)
+use L<File::Glob> underneath.  L<File::Glob> splits the pattern into words,
+before feeding each word to its C<bsd_glob> function.
 
-Causing C<@DB::args> to be freed between uses of C<caller> no longer
-results in a crash [perl #93320].
+There were several inconsistencies in the way the split was done.  Now
+quotation marks (' and ") are always treated as shell-style word delimiters
+(that allow whitespace as part of a word) and backslashes are always
+preserved, unless they exist to escape quotation marks.  Before, those
+would only sometimes be the case, depending on whether the pattern
+contained whitespace.  Also, escaped whitespace at the end of the pattern
+is no longer stripped.
 
 =item *
 
-Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined
-values.  It would die in strict mode or lvalue context for most undefined
-values, but would be treated as the empty string (with a warning) for the
-specific scalar return by C<undef()> (C<&PL_sv_undef> internally).  This
-has been corrected.  C<undef()> is now treated like other undefined
-scalars, as in Perl 5.005.
+C<CORE::glob> now works as a way to call the default globbing function.  It
+used to respect overrides, despite the C<CORE::> prefix.
 
 =item *
 
-It used to be possible to free the typeglob of a localised array or hash
-(e.g., C<local @{"x"}; delete $::{x}>), resulting in a crash on scope exit.
+In 5.14, C</[[:lower:]]/i> and C</[[:upper:]]/i> no longer matched the
+opposite case.  This has been fixed [perl #101970].
 
 =item *
 
-C<setpgrp($foo)> used to be equivalent to C<($foo, setpgrp)>, because
-C<setpgrp> was ignoring its argument if there was just one.  Now it is
-equivalent to C<setpgrp($foo,0)>.
+A regular expression match with an overloaded object on the right-hand side
+would in some cases stringify the object too many times.
 
 =item *
 
-An assignment like C<*$tied = \&{"..."}> now calls FETCH only once.
+The C-level C<pregcomp> function could become confused as to whether the
+pattern was in UTF8 if the pattern was an overloaded, tied, or otherwise
+magical scalar [perl #101940].
 
 =back
 
@@ -550,7 +496,7 @@ here.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.15.2..HEAD
+  perl Porting/acknowledgements.pl v5.15.4..HEAD
 
 =head1 Reporting Bugs