This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for fd8be4a16
[perl5.git] / pod / perldelta.pod
index 7dc7eaa..6a29ae2 100644 (file)
@@ -5,15 +5,15 @@
 [ 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.21.7
+perldelta - what is new for perl v5.21.8
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.21.6 release and the 5.21.7
+This document describes differences between the 5.21.7 release and the 5.21.8
 release.
 
-If you are upgrading from an earlier release such as 5.21.5, first read
-L<perl5216delta>, which describes differences between 5.21.5 and 5.21.6.
+If you are upgrading from an earlier release such as 5.21.6, first read
+L<perl5217delta>, which describes differences between 5.21.6 and 5.21.7.
 
 =head1 Notice
 
@@ -27,17 +27,31 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
-=head2 C<fileno> now works on directory handles
+=head2 The warnings pragma now supports warnings outside of "all"
 
-When the relevant support is available in the operating system, the
-C<fileno> builtin now works on directory handles, yielding the
-underlying file descriptor in the same way as for filehandles. On
-operating systems without such support, C<fileno> on a directory handle
-continues to return the undefined value, as before, but also sets C<$!> to
-indicate that the operation is not supported.
+Ever since perl v5.6.0 we've had no way of adding new warnings without
+retroactively adding them to all existing programs that used C<-w>,
+C<-W> or C<use warnings>.
 
-Currently, this uses either a C<dd_fd> member in the OS C<DIR>
-structure, or a dirfd(3) function as specified by POSIX.1-2008.
+This caused us to not add new useful warnings out of fear that they
+might unduly burden users who just wanted to upgrade perl and didn't
+want to deal with a bunch of warnings from their existing code.
+
+We now support a way to have our cake and eat it too, and can add new
+warnings to the core going forward through other top-level warning
+categories. See L<the warnings documentation|warnings/Top-level
+warning categories & associated confusion> for details.
+
+=head2 Non-Capturing Regular Expression Flag
+
+Regular expressions now support a C</n> flag that disables capturing
+and filling in C<$1>, C<$2>, etc... inside of groups:
+
+  "hello" =~ /(hi|hello)/n; # $1 is not set
+
+This is equivalent to putting C<?:> at the beginning of every capturing group.
+
+See L<perlre/"n"> for more information.
 
 =head1 Security
 
@@ -57,13 +71,6 @@ XXX For a release on a stable branch, this section aspires to be:
 
 [ List each incompatible change as a =head2 entry ]
 
-=head2 C<&> prototype accepts only subs
-
-The C<&> prototype character now accepts only anonymous subs (C<sub {...}>)
-and things beginning with C<\&>.  Formerly it erroneously also allowed
-C<undef> and references to array, hashes, and lists.  [perl #4539]
-[perl #123062]
-
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -97,14 +104,6 @@ as an updated module in the L</Modules and Pragmata> section.
 
 [ List each other deprecation as a =head2 entry ]
 
-=head2 Setting C<${^ENCODING}> to anything but C<undef>
-
-This variable allows Perl scripts to be written in a non-ASCII,
-non-UTF-8 encoding.  However, it affects all modules globally, leading
-to wrong answers and segmentation faults.  New scripts should be written
-in UTF-8; old scripts should be converted to UTF-8, which is easily done
-with the L<encoding> pragma.
-
 =head1 Performance Enhancements
 
 XXX Changes which enhance performance without changing behaviour go here.
@@ -116,9 +115,7 @@ There may well be none in a stable release.
 
 =item *
 
-Win32 Perl uses 8 KB less of per-process memory than before for every perl
-process of this version. This data is now memory mapped from disk and shared
-between perl processes from the same perl binary.
+XXX
 
 =back
 
@@ -148,41 +145,40 @@ XXX
 
 =item *
 
-L<B> has been upgraded from version 1.53 to 1.54.
-
-Nulled COPs are now of class C<B::COP>, rather than C<B::OP>.
+L<XXX> has been upgraded from version A.xx to B.yy.
 
 =item *
 
-L<B::Deparse> has been upgraded from version 1.30 to 1.31.
+L<attributes> has been upgraded from version 0.24 to 0.25.
 
-BEGIN blocks at the end of the enclosing scope are now deparsed in the
-right place.  [perl #77452]
+Minor internal change only.
 
 =item *
 
-L<ExtUtils::ParseXS> has been upgraded from version 3.26 to 3.27.
+L<B> has been upgraded from version 1.54 to 1.55.
 
-Only declare C<file> unused if we actually define it.
+A bug where, after an ithread creation or psuedofork, special/immortal SVs in
+the child ithread/psuedoprocess did not have the correct class of
+C<B::SPECIAL>, has been fixed.
 
-Improve generated C<RETVAL> code generation to avoid repeated
-references to C<ST(0)>.  [perl #123278]
+The C<id> and C<outid> PADLIST methods have been added.
 
 =item *
 
-The PathTools module collection has been upgraded from 3.52 to 3.53.
+L<B::Deparse> has been upgraded from version 1.31 to 1.32.
 
-Don't turn leading C<//> into C</> on Cygwin. [perl #122635]
+Deparsing C<BEGIN { undef &foo }> with the B<-w> switch enabled started to
+emit 'uninitialized' warnings in Perl 5.14.  This has been fixed.
 
-=item *
-
-L<Locale::Maketext> has been upgraded from version 1.25 to 1.26.
+Deparsing calls to subs with a C<(;+)> prototype resulted in an infinite
+loop.  The C<(;$>) C<(_)> and C<(;_)> prototypes were given the wrong
+precedence, causing C<foo($a<$b)> to be deparsed without the parentheses.
 
 =item *
 
-L<XSLoader> has been upgraded from version 0.19 to 0.20
+L<Safe> has been upgraded from version 2.38 to 2.39.
 
-Don't test twice for bootstrap file.
+C<reval> was not propagating void context properly.
 
 =back
 
@@ -257,6 +253,10 @@ XXX L<message|perldiag/"message">
 
 XXX L<message|perldiag/"message">
 
+=item *
+
+L<Wide character (U+%X) in %s|perldiag/"Wide character (U+%X) in %s">
+
 =back
 
 =head2 Changes to Existing Diagnostics
@@ -269,6 +269,15 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 XXX Describe change here
 
+The message
+L<Locale '%s' may not work well.%s|perldiag/"Locale '%s' may not work well.%s">
+is no longer raised unless the problemtatic locale is actually used in
+the Perl program.  Previously it was raised if it merely was the
+underlying locale.  All Perl programs have an underlying locale at all
+times, but something like a C<S<use locale>> is needed for that locale
+to actually have some effect.  This message will not be raised when
+the underlying locale is hidden.
+
 =back
 
 =head1 Utility Changes
@@ -361,13 +370,37 @@ XXX
 
 =head2 Platform-Specific Notes
 
-=head3 Win32
+XXX List any changes for specific platforms.  This could include configuration
+and compilation changes or changes in portability/compatibility.  However,
+changes within modules for platforms should generally be listed in the
+L</Modules and Pragmata> section.
 
-=over
+=over 4
+
+=item Win32
+
+=over 4
 
 =item *
 
-Intel C builds are now always built with C99 mode on.
+Previously, on Visual C++ for Win64 built Perls only, when compiling every Perl
+XS module (including CPAN ones) and Perl aware .c file with a 64 bit Visual C++,
+would uncondtionally have around a dozen warnings from hv_func.h.  These
+warnings have been silenced.  GCC all bitness and Visual C++ for Win32 were
+not affected.
+
+=item *
+
+Support for building without PerlIO has been removed from the Windows
+makefiles.  Non-PerlIO builds were all but deprecated in Perl 5.18.0 and are
+already not supported by F<Configure> on POSIX systems.
+
+=item *
+
+Between 2 and 6 ms and 7 I/O calls have been saved per attempt to open a perl
+module for each path in C<@INC>.
+
+=back
 
 =back
 
@@ -383,6 +416,27 @@ well.
 
 =item *
 
+Added Perl_sv_get_backrefs() to determine if an SV is a weak-referent.
+
+Function either returns an SV * of type AV, which contains the set of
+weakreferences which reference the passed in SV, or a simple RV * which
+is the only weakref to this item.
+
+=item *
+
+C<gv_add_by_type> which was added to public API in 5.11.0 but undocumented and
+shows no CPAN usage has been removed from public API. Please use public API
+C<GvSVn> C<GvIOn> C<GvAVn> and C<GvHVn> for adding elements to a GV.
+
+=item *
+
+C<GvSVn> C<GvIOn> C<GvAVn> and C<GvHVn> have been made rvalues, previously they
+were lvalues. If you are assigning a SV to C<GvSVn> C<GvIOn> C<GvAVn> and
+C<GvHVn> you are leaking memory. If you want an lvalue, use C<GvSV> C<GvIO>
+C<GvAV> and C<GvHV>.
+
+=item *
+
 XXX
 
 =back
@@ -398,27 +452,17 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
 
 =item *
 
-On Win32, restoring in a child pseudo-process a variable that was
-C<local()>ed in a parent pseudo-process before the C<fork> happened caused
-memory corruption and a crash in the child pseudo-process (and therefore OS
-process). 
-
-=item *
-
-The L<encoding> pragma's effect is now limited to lexical scope.  This
-pragma is deprecated, but in the meantime, it could adversely affect
-unrelated modules that are included in the same program.
-
-=item *
-
-Calling C<write> on a format with a C<^**> field could produce a panic
-in sv_chop() if there were insufficient arguments or if the variable
-used to fill the field was empty.  [perl #123245]
+A bug in regular expression patterns that could lead to segfaults and
+other crashes has been fixed.  This occurred only in patterns compiled
+with C<"/i">, while taking into account the current POSIX locale (this usually
+means they have to be compiled within the scope of C<S<"use locale">>),
+and there must be a string of at least 128 consecutive bytes to match.
+[perl #123539]
 
 =item *
 
-Non-ASCII lexical sub names (use in error messages) on longer have extra
-junk on the end.
+C<s///> now works on very long strings instead of dying with 'Substitution
+loop'.  [perl #103260] [perl #123071]
 
 =back
 
@@ -458,7 +502,7 @@ here.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.21.6..HEAD
+  perl Porting/acknowledgements.pl v5.21.7..HEAD
 
 =head1 Reporting Bugs