This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #96126] Allocate CvFILE more simply
[perl5.git] / pod / perldelta.pod
index 10a2d80..0c9488a 100644 (file)
@@ -1,20 +1,27 @@
 =encoding utf8
 
+=for comment
+This has been completed up to 8367b6810 except for:
+747627ec455e0765e07733ece1545aa3f728a00a (Steffen Müller)
+dd35fa16610ef2fa0d46f5129e626b99cf350d77 (H. Merijn Brand)
+e64345f82d66a32f6da47acf482e7e6c9282b433 (Steffen Müller)
+f1d35e3443aa8451bf47be80983076fe28626113 (Karthik Rajagopalan)
+
 =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.1
+perldelta - what is new for perl v5.15.2
 
 =head1 DESCRIPTION
 
 This document describes differences between the 5.15.1 release and
-the 5.15.0 release.
+the 5.15.2 release.
 
-If you are upgrading from an earlier release such as 5.14.0, first read
-L<perl5150delta>, which describes differences between 5.14.0 and
-5.15.0.
+If you are upgrading from an earlier release such as 5.15.0, first read
+L<perl5151delta>, which describes differences between 5.15.0 and
+5.15.1.
 
 =head1 Notice
 
@@ -28,10 +35,26 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
-=head2 C<splice()> doesn't warn when truncating
+=head2 Subroutines in the CORE namespace
+
+Many Perl keywords are now available as subroutines in the CORE namespace.
+These cannot be called through references or via C<&foo> syntax yet, but
+must be called as barewords.  In other words, you can now do this:
+
+    BEGIN { *entangle = \&CORE::tie }
+    entangle $variable, $package, @args;
+
+This currently works for overridable keywords other than C<dump> and the
+infix operators.
 
-You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
-worrying about warnings.
+Work is under way to allow these subroutines to be called through
+references.
+
+=head2 C<__FILE__()> Syntax
+
+The C<__FILE__>, C<__LINE__> and C<__PACKAGE__> tokens can now be written
+with an empty pair of parentheses after them.  This makes them parse the
+same way as C<time>, C<fork> and other built-in functions.
 
 =head1 Security
 
@@ -50,6 +73,15 @@ XXX For a release on a stable branch, this section aspires to be:
 
 [ List each incompatible change as a =head2 entry ]
 
+=head2 C<UNIVERSAL::VERSION> now returns $VERSION
+
+C<UNIVERSAL::VERSION> now return whatever is in $VERSION, instead of
+returning $VERSION converted to a version object and then to a string.
+As a result, it no longer parses the version when called without arguments,
+so it no longer dies in that case for malformed versions.  This allows
+custom version number parsers to use C<< ->VERSION >> to retrieve the
+version number, as was the case in Perl 5.8 [perl #95544].
+
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -101,26 +133,113 @@ XXX
 
 =item *
 
-L<Compress::Raw::Bzip2> has been upgraded from version 2.035 to version 2.036
+L<B> has been upgraded from version 1.30 to version 1.31
+
+The XS code has changed slightly, as it was too tightly coupled to
+the contents of the header F<embedvar.h>. Documentation in L<B::Terse>
+and L<B::Xref> has been improved, hence their versions have been increased.
+
+=item *
+
+L<CPAN> has been upgraded from version 1.9600 to version 1.9800
+
+=item *
+
+L<CPANPLUS> has been upgraded from version 0.9108 to version 0.9109
+
+Fixed support for v-strings and x.y.z versions with v5.8.4
+
+=item *
+
+L<CPAN::Meta> has been upgraded from version 2.110930_001 to version 2.112150
+
+Stringify any objects encountered during conversion.
+
+Clarified that file paths in the 'provides' section must be in
+Unix-style (i.e. forward slashes)
+
+=item *
+
+L<DB_File> has been upgraded from version 1.822 to version 1.824
+
+Will now croak if attempt to freeze/thaw DB_File object [RT #69985]
+
+=item *
+
+L<diagnostics> has been upgraded from version 1.23 to 1.24.
+
+It now supports the %u formatting code.  Previously it was unable to find
+descriptions for messages whose entries in L<perldiag> included that code
+[perl #94988].
+
+=item *
+
+L<Encode> has been upgraded from version 2.43 to version 2.44
+
+Addressed 'decode_xs n-byte heap-overflow' security bug in Unicode.xs
+
+=item *
+
+L<ExtUtils::Install> has been upgraded from version 1.56 to version 1.57.
+
+There is no change to ExtUtils::Install other than the version number
+increase, but L<ExtUtils::Installed> has been upgraded from version 1.999_001
+to version 1.999002 and a new C<skip_cwd> attribute has been added.
+
+=item *
+
+L<ExtUtils::MakeMaker> has been upgraded from version 6.58 to version 6.59
+
+=item *
+
+L<IPC::Open3> has been upgraded from version 1.11 to 1.12.
+
+C<open3> with "-" for the program name works once more.  This was broken in
+version 1.06 (and hence in Perl 5.14.0) [perl #95748].
+
+=item *
+
+L<Module::Build> has been upgraded from version 0.3800 to version 0.39_01.
+
+Pod to HTML internals changed to support revisions to Pod::Html in core.
+Also fixes some minor bugs. [rt.cpan.org #68585] [rt.cpan.org #67893]
+[rt.cpan.org #67008]
+
+=item *
+
+L<Module::Load> has been upgraded from version 0.18 to version 0.20
 
 =item *
 
-L<Compress::Raw::Zlib> has been upgraded from version 2.035 to version 2.036
+L<Module::Metadata> has been upgraded from version 1.000004 to version 1.000005
 
-Added offset parameter to CRC32
+Added C<new_from_handle()> method.
 
 =item *
 
-L<Compress::Zlib> has been upgraded from version 2.035 to version 2.036
+L<Params::Check> has been upgraded from version 0.28 to version 0.32
+
+=item *
 
-IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA (method 14).
-There is a fix for a CRC issue in IO::Compress::Unzip. And fixed a Zip64 issue in
-IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.
+L<PerlIO::via> has been upgraded from version 0.11 to version 0.12.
+
+The only change is a correction in the documentation.
 
 =item *
 
-L<attributes> has been upgraded from version 0.14 to 0.15, as part of the
-lvalue attribute warnings fix.  See L</Selected Bug Fixes>, below.
+L<Term::ANSIColor> has been upgraded from version 3.00 to version 3.01
+
+Only interpret an initial array reference as a list of colors, not any initial
+reference, allowing the colored function to work properly on objects with
+stringification defined.
+
+=item *
+
+L<Unicode::Collate> has been upgraded from version 0.77 to version 0.78
+
+=item *
+
+L<Unicode::Normalize> has been upgraded from version 1.12 to version 1.13
 
 =back
 
@@ -143,9 +262,10 @@ file and be sure to link to the appropriate page, e.g. L<perlfunc>.
 
 XXX Changes which create B<new> files in F<pod/> go here.
 
-=head3 L<XXX>
+=head3 L<perlexperiment>
 
-XXX Description of the purpose of the new file here
+This document is intended to provide a list of experimental features in
+Perl.  It is still a work in progress.
 
 =head2 Changes to Existing Documentation
 
@@ -153,13 +273,15 @@ XXX Changes which significantly change existing files in F<pod/> go here.
 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
 section.
 
-=head3 L<XXX>
+=head3 L<perlsub>
 
 =over 4
 
 =item *
 
-XXX Description of the change here
+The ($;) prototype syntax, which has existed for rather a long time, is now
+documented in L<perlsub>.  It allows a unary function to have the same
+precedence as a list operator.
 
 =back
 
@@ -190,7 +312,15 @@ XXX Newly added diagnostic messages go here
 
 =item *
 
-XXX L<message|perldiag/"message">
+L<&CORE::%s cannot be called directly|perldiag/"&CORE::%s cannot be called directly">
+
+(F) You tried to call a subroutine in the C<CORE::> namespace
+with C<&foo> syntax or through a reference.  The subroutines
+in this package cannot yet be called that way, but must be
+called as barewords.  Something like this will work:
+
+    BEGIN { *shove = \&CORE::push; }
+    shove @array, 1,2,3; # pushes on to @array
 
 =back
 
@@ -225,16 +355,27 @@ here. Most of these are built within the directories F<utils> and F<x2p>.
 entries for each change
 Use L<XXX> with program names to get proper documentation linking. ]
 
-=head3 L<XXX>
+=head3 L<perlivp>
 
 =over 4
 
 =item *
 
-XXX
+Fixed a bug whereby other perls under the current directory could cause
+false positive failures.
+
+=item *
+
+Tests for .ph files have been removed, as these test have been optional since
+2005 and .ph files are no longer generated during installation.
 
 =back
 
+=head3 L<splain>
+
+See the entry for C<< diagnostics >> in L</Updated Modules and Pragmata>,
+above.
+
 =head1 Configuration and Compilation
 
 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
@@ -248,7 +389,8 @@ L</Platform Support> section, instead.
 
 =item *
 
-XXX
+F<makedef.pl> has been refactored. This should have no noticeable affect on
+any of the platforms that use it as part of their build (AIX, VMS, Win32).
 
 =back
 
@@ -277,6 +419,15 @@ XXX Any changes to platform support should be listed in the sections below.
 [ Within the sections, list each platform as a =item entry with specific
 changes as paragraphs below it. ]
 
+=over 4
+
+=item HP-UX PA-RISC/64 now supports gcc-4.x
+
+A fix to correct the socketsize now makes the test suite pass on HP-UX
+PA-RISC for 64bitall builds.
+
+=back
+
 =head2 New Platforms
 
 XXX List any platforms that this version of perl compiles on, that previous
@@ -331,7 +482,12 @@ be noted as well.
 
 =item *
 
-XXX
+F<embedvar.h> has been simplified, and one level of macro indirection for
+PL_* variables has been removed for the default (non-multiplicity)
+configuration. PERLVAR*() macros now directly expand their arguments to
+tokens such as C<PL_defgv>, instead of expanding to C<PL_Idefgv>, with
+F<embedvar.h> defining a macro to map C<PL_Idefgv> to C<PL_defgv>. XS code
+which has unwarranted chumminess with the implementation may need updating.
 
 =back
 
@@ -347,20 +503,94 @@ L</Modules and Pragmata>.
 
 =item *
 
-Applying the :lvalue attribute to subroutine that is already defined does
-not work properly, as the attribute changes the way the sub is compiled.
-Hence, Perl 5.12 began warning when an attempt is made to apply the
-attribute to an already defined sub.  In such cases, the attribute is
-discarded.
+Locking a subroutine (via C<lock &sub>) is no longer a compile-time error
+for regular subs.  For lvalue subroutines, it no longer tries to return the
+sub as a scalar, resulting in strange side effects like C<ref \$_>
+returning "CODE" in some instances.
+
+C<lock &sub> is now a run-time error if L<threads::shared> is loaded (a
+no-op otherwise), but that may be rectified in a future version.
 
-But the change in 5.12 missed the case where custom attributes are also
-present: that case still silently and ineffectively applied the attribute.
-That omission has now been corrected.  C<sub foo :lvalue :Whatever> (when
-C<foo> is already defined) now warns about the :lvalue attribute, and does
-not apply it.
+=item *
 
-L<attributes.pm|attributes> has likewise been updated to warn and not apply
-the attribute.
+The prototypes of several built-in functions--C<getprotobynumber>, C<lock>,
+C<not> and C<select>--have been corrected, or at least are now closer to
+reality than before.
+
+=item *
+
+Most dereferencing operators (C<${}>, etc.) used to call C<FETCH> twice on
+a tied operand when doing a symbolic dereference (looking up a variable by
+name, which is not permitted under C<use strict 'refs'>).  Only C<&{}> did
+not have this problem.  This has been fixed.
+
+=item *
+
+A minor regression introduced in 5.15.0 has been fixed.  Dereferencing a
+magical mortal (e.g., the return value of C<delete> on a tied hash element)
+explicitly returned from a subroutine called recursively was not calling
+C<FETCH>.  This would affect code like C<@{ foo() }> where the C<foo> sub
+contains C<return delete $hash{elem}> and is calling itself.
+
+=item *
+
+A panic involving the combination of the regular expression modifiers
+C</aa> and the C<\b> escape sequence introduced in 5.14.0 has been
+fixed [perl #95964].
+
+=item *
+
+stat() would always return the inode number as an IV, even when the
+original was unsigned, or too large to fit in an IV.  stat() now
+returns the inode number as the type that would best preserve the
+original value. [perl #84590]
+
+=item *
+
+The combination of the regular expression modifiers C</aa> and the C<\b>
+and C<\B> escape sequences did not work properly on UTF-8 encoded
+strings.  All non-ASCII characters under C</aa> should be treated as
+non-word characters, but what was happening was that Unicode rules were
+used to determine wordness/non-wordness for non-ASCII characters.  This
+is now fixed [perl #95968].
+
+=item *
+
+Infinite loops like C<1 while 1> used to stop C<strict 'subs'> mode from
+working for the rest of the block.t
+
+=item *
+
+The C<\h>, C<\H>, C<\v> and C<\V> regular expression metacharacters used to
+cause a panic error message when attempting to match at the end of the
+string [perl #96354].
+
+=item *
+
+For list assignments like C<($a,$b) = ($b,$a)>, Perl has to make a copy of
+the items on the right-hand side before assignment them to the left.  For
+efficiency's sake, it assigns the values on the right straight to the items
+on the left no variable is mentioned on both sides, as in
+C<($a,$b) = ($c,$d)>.  The logic for determining when it can cheat was
+faulty, in that C<&&> and C<||> on the right-hand side could fool it.  So
+C<($a,$b) = $some_true_value && ($b,$a)> would end up assigning the value
+of C<$b> to both scalars.
+
+=item *
+
+Perl no longer tries to apply lvalue context to the string in
+C<("string", $variable) ||= 1> (which used to be an error).  Since the
+left-hand side of C<||=> is evaluated in scalar context, that's a scalar
+comma operator, which gives all but the last item void context.  There is
+no such thing as void lvalue context, so it was a mistake for Perl to try
+to force it [perl #96942].
+
+=item *
+
+Every subroutine has a filename associated with it, that the debugger uses.
+The one associated with constant subroutines used to be misallocated when
+cloned under threads.  Consequently, debugging threaded applications could
+result in memory corruption [perl #96126].
 
 =back
 
@@ -390,7 +620,9 @@ here.
 
 =head1 Acknowledgements
 
-XXX The list of people to thank goes here.
+XXX Generate this with:
+
+  perl Porting/acknowledgements.pl v5.15.1..HEAD
 
 =head1 Reporting Bugs