This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
No longer print experimental::isa warning (closes #18754)
[perl5.git] / pod / perldelta.pod
index b6d3abb..39261f9 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.35.6
+perldelta - what is new for perl v5.35.9
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.35.5 release and the 5.35.6
+This document describes differences between the 5.35.8 release and the 5.35.9
 release.
 
-If you are upgrading from an earlier release such as 5.35.4, first read
-L<perl5355delta>, which describes differences between 5.35.4 and 5.35.5.
+If you are upgrading from an earlier release such as 5.35.7, first read
+L<perl5358delta>, which describes differences between 5.35.7 and 5.35.8.
 
 =head1 Notice
 
@@ -27,15 +27,40 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
-=head2 C<use v5.36> now disables bareword_filehandles, indirect, and multidimensional
+=head2 @_ is now experimental within signatured subs
 
-The C<:5.36> bundle, loaded by C<use v5.36>, no longer includes
-C<bareword_filehandles>, C<indirect>, or C<multidimensional> meaning that these
-discouraged forms of syntax will not be allowed within the scope of that
-version declaration.
+Even though subroutine signatures currently remain experimental, use of the
+default arguments array (C<@_>) with a subroutine that has a signature is
+specifically also experimental, with its own warning category.  Silencing the
+C<experimental::signatures> warning category is not sufficient to dismiss
+this.  The new warning is emitted with the category name
+C<experimental::args_array_with_signatures>.
 
-This will also affect C<use v5.35.x>, even on subversions of v5.35 prior to
-this one.
+Any subroutine that has a signature and tries to make use of the defaults
+argument array or an element thereof (C<@_> or C<$_[INDEX]>), either
+explicitly or implicitly (such as C<shift> or C<pop> with no argument) will
+provoke a warning at compile-time:
+
+    use experimental 'signatures';
+
+    sub f ($x, $y = 123) {
+      say "The first argument is $_[0]";
+    }
+
+Z<>
+
+    Use of @_ in array element with signatured subroutine is experimental
+    at file.pl line 4.
+
+The behaviour of code which attempts to do this is no longer specified, and
+may be subject to change in a future version.
+
+=head2 The C<isa> operator is no longer experimental
+
+Introduced in Perl version 5.32.0, this operator has remained unchanged
+since then. The operator is now considered a stable languauge feature.
+
+For more detail see L<perlop/Class Instance Operator>.
 
 =head1 Security
 
@@ -59,6 +84,39 @@ XXX For a release on a stable branch, this section aspires to be:
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
 
+=head2 Downgrading a C<use VERSION> statement to below v5.11
+
+Attempting to issue a second C<use VERSION> statement that requests a version
+lower than C<v5.11> when an earlier statement that requested a version at
+least C<v5.11> has already been seen, will now print a deprecation warning.
+
+For example:
+
+    use v5.14;
+    say "The say statement is permitted";
+    use v5.8;                               # This will print a warning
+    print "We must use print\n";
+
+This is because of an intended related change to the interaction between
+C<use VERSION> and C<use strict>. If you specify a version >= 5.11, strict is
+enabled implicitly. If you request a version < 5.11, strict will become
+disabled I<even if you had previously written> C<use strict>. This was not
+the previous behaviour of C<use VERSION>, which at present will track
+explicitly-enabled strictness flags independently.
+
+Code which wishes to mix versions in this manner should use lexical scoping
+with block syntax to ensure that the differently versioned regions remain
+lexically isolated.
+
+    {
+        use v5.14;
+        say "The say statement is permitted";
+    }
+    {
+        use v5.8;                           # No warning is emitted
+        print "We must use print\n";
+    }
+
 =head2 Module removals
 
 XXX Remove this section if not applicable.
@@ -228,7 +286,9 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =item *
 
-XXX Describe change here
+L<Subroutine %s redefined|perldiag/"Subroutine %s redefined">
+
+Localized subroutine redefinitions no longer trigger this warning.
 
 =back
 
@@ -325,16 +385,9 @@ XXX List any platforms that this version of perl no longer compiles on.
 
 =over 4
 
-=item DOS/DJGPP
-
-DJGPP is a port of the GNU toolchain to 32-bit x86 systems running
-DOS.  The last known attempt to build Perl on it was on 5.20, which
-only got as far as building miniperl.
-
-=item AT&T UWIN
+=item XXX-some-platform
 
-UWIN is a UNIX compatibility layer for Windows.  It was last released
-in 2012 and has been superseded by Cygwin these days.
+XXX
 
 =back
 
@@ -365,7 +418,10 @@ well.
 
 =item *
 
-XXX
+New equality-test functions C<sv_numeq> and C<sv_streq> have been added, along
+with C<..._flags>-suffixed variants.  These expose a simple and consistent API
+to perform numerical or string comparison which is aware of operator
+overloading.
 
 =back
 
@@ -380,8 +436,7 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
 
 =item *
 
-Setting a breakpoint on a BEGIN or equivalently a C<use> statement
-could cause a memory write to a freed C<dbstate> op. [github #19198]
+XXX
 
 =back
 
@@ -421,7 +476,7 @@ died, add a short obituary here.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.35.5..HEAD
+  perl Porting/acknowledgements.pl v5.35.8..HEAD
 
 =head1 Reporting Bugs