This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for 1f039d60d3 (last $foo)
[perl5.git] / pod / perldelta.pod
index 27ab286..32b0243 100644 (file)
@@ -28,6 +28,13 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
+=head2 Computed Labels
+
+The loop controls C<next>, C<last> and C<redo>, and the special C<dump>
+operator, now allow arbitrary expressions to be used to compute labels at
+run time.  Previously, any argument that was not a constant was treated as
+the empty string.
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -38,13 +45,21 @@ L</Selected Bug Fixes> section.
 
 =head1 Incompatible Changes
 
-XXX For a release on a stable branch, this section aspires to be:
+[ List each incompatible change as a =head2 entry ]
 
-    There are no changes intentionally incompatible with 5.XXX.XXX
-    If any exist, they are bugs, and we request that you submit a
-    report.  See L</Reporting Bugs> below.
+=head2 C<$ENV{foo} = undef> deletes value from environ, like C<delete $ENV{foo}>
 
-[ List each incompatible change as a =head2 entry ]
+This facilitates use of C<local()> with C<%ENV> entries.  In previous
+versions of Perl, C<undef> was converted to the empty string.
+
+=head2 Defined values stored in environment are forced to byte strings
+
+A value stored in an environment variable has always been stringified.  In
+this release, it is converted to be only a byte string.  First, it is forced
+to be a only a string.  Then if the string is utf8 and the equivalent of
+C<utf8::downgrade> works, that result is used; otherwise, the equivalent of
+C<utf8::encode> is used, and a warning is issued about wide characters
+(L</Diagnostics>).
 
 =head1 Deprecations
 
@@ -133,13 +148,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<perlfunc>, L<perlop>
 
 =over 4
 
 =item *
 
-XXX Description of the change here
+Loop control verbs (C<dump>, C<goto>, C<next>, C<last> and C<redo>) have
+always had the same precedence as assignment operators, but this was never
+documented until now.
 
 =back
 
@@ -164,6 +181,15 @@ include any changes in L<perldiag> that reconcile it to the C<C> code.
 
 XXX Newly added diagnostic messages go here
 
+=over 4
+
+=item *
+
+Attempts to put wide characters into environment variables via %ENV provoke
+the warning "Wide character in setenv".
+
+=back
+
 =head3 New Errors
 
 =over 4
@@ -331,6 +357,27 @@ C<\w> now matches the code points U+200C (ZERO WIDTH NON-JOINER) and
 U+200D (ZERO WIDTH JOINER).  C<\W> no longer matches these.  This change
 is because Unicode corrected their definition of what C<\w> should match.
 
+=item *
+
+C<dump LABEL> no longer leaks its label.
+
+=item *
+
+Constant folding no longer changes the behaviour of functions like C<stat>
+and C<truncate> that can take either filenames or handles.
+C<stat 1 ? foo : bar> nows treats its argument as a file name (since it is
+an arbitrary expression), rather than the handle "foo".
+
+=item *
+
+C<truncate FOO, $len> no longer falls back to treating "FOO" as a file name
+if the filehandle has been deleted.  This was broken in Perl 5.16.0.
+
+=item *
+
+Subroutine redefinitions after sub-to-glob and glob-to-glob assignments no
+longer cause double frees or panic messages.
+
 =back
 
 =head1 Known Problems