This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta up to 8d0b139
[perl5.git] / pod / perldelta.pod
index fdfb999..229597a 100644 (file)
@@ -1,11 +1,8 @@
 =encoding utf8
 
 =for comment
-This has been completed up to 5dca8ed9d28, except for
+This has been completed up to 8d0b139, except for
 b0f2e9e nwclark     Fix two bugs related to pod files outside of pod/ (important enough?)
-9b9f19d craigb      Another vms bug
-cc5de3b craigb         "     "   "
-bdba49a shlomif     perl -d bugfixes and tests
 43d9ecf jpeacock    Set all version object math ops to noop
 f300909 smueller    EU::ParseXS: Silence warning (probably unnecessary)
 
@@ -213,6 +210,23 @@ errors [perl #80630].
 Automatically generated file handles are now named __ANONIO__ when the
 variable name cannot be determined, rather than $__ANONIO__.
 
+=head2 Last-accessed filehandle
+
+Perl has an internal variable that stores the last filehandle to be
+accessed.  It is used by C<$.> and by C<tell> and C<eof> without arguments.
+
+It used to be possible to set it to a glob copy and then modify that glob
+copy to be something other than a glob, and still have it as the
+last-accessed filehandle after assigning a glob to it again:
+
+    my $foo = *STDOUT;  # $foo is a glob copy
+    <$foo>;             # $foo is now the last-accessed handle
+    $foo = 3;           # no longer a glob
+    $foo = *STDERR;     # still the last-accessed handle
+
+Now the C<$foo = 3> assignment unset that internal variable, so there is no
+last-accessed filehandle, just as if C<< <$foo> >> had never happened.
+
 =head2 XS API tweak
 
 The C<newCONSTSUB_flags> C-level function, added in 5.15.4, now has a
@@ -240,7 +254,7 @@ may well be none in a stable release.
 Perl 5.12.0 sped up the destruction of objects whose classes define empty
 C<DESTROY> methods (to prevent autoloading), simply by not calling such
 empty methods.  This release takes this optimisation a step further, by not
-calling any C<DESTROY> method that begins with an C<return> statement.
+calling any C<DESTROY> method that begins with a C<return> statement.
 This can be useful for destructors that are only used for debugging:
 
     use constant DEBUG => 1;
@@ -257,7 +271,7 @@ copy-on-write scalar would be copied before being clobbered.
 
 =item *
 
-Assignment to a substring in void context is now more than twice its
+Assignment to C<substr> in void context is now more than twice its
 previous speed.  Instead of creating and returning a special lvalue scalar
 that is then assigned to, C<substr> modifies the original string itself.
 
@@ -374,6 +388,13 @@ or not, were being deparsed as C<&&>.
 
 =item *
 
+L<Carp> has been upgraded from version 1.23 to version 1.24.
+
+It now tacks the last-accessed filehandle and line number on to the end of
+the error message, just like C<die> [perl #96672].
+
+=item *
+
 L<Compress::Raw::Zlib> has been upgraded from version 2.042 to version 2.045.
 
 =item *
@@ -398,6 +419,13 @@ in their names.
 
 =item *
 
+L<diagnostics> has been upgraded from version 1.25 to version 1.26.
+
+It now understands the "%X" format code, which some error messages started
+using in Perl 5.14.0.
+
+=item *
+
 L<Digest::SHA> has been upgraded from version 5.63 to version 5.70.
 
 Added BITS mode to addfile method and shasum which makes partial-byte inputs
@@ -459,7 +487,7 @@ it was not, adding a note will help whoever compiles perl5160delta.
 
 =item *
 
-L<Socket> has been upgraded from version 1.94_02 to version 1.96.
+L<Socket> has been upgraded from version 1.94_02 to version 1.97.
 
 =item *
 
@@ -594,6 +622,14 @@ The 'Use of "foo" without parentheses is ambiguous' warning has been
 extended to apply also to user-defined subroutines with a (;$) prototype,
 and not just to built-in functions.
 
+=item *
+
+The error messages for using C<default> and C<when> outside of a
+topicalizer have been standardised to match the messages for C<continue>
+and loop controls.  They now read 'Can't "default" outside a topicalizer'
+and 'Can't "when" outside a topicalizer'.  They both used to be 'Can't use
+when() outside a topicalizer' [perl #91514].
+
 =back
 
 =head1 Utility Changes
@@ -715,11 +751,21 @@ L</Modules and Pragmata> section.
 
 =item *
 
-Fixed a bug that caused a link error on older versions of VMS.
+A link-time error on VMS versions without C<symlink> support was
+introduced in 5.15.1, but has now been corrected.
 
 =item *
 
-Perl no longer supports pre-7.0 VMS or pre-6.0 DEC C.
+Explicit support for VMS versions prior to v7.0 and DEC C versions prior
+to v6.0 has been removed.
+
+=item *
+
+Since Perl 5.10.1, the home-grown C<stat> wrapper has been unable to
+distinguish between a directory name containing an underscore and an
+otherwise-identical filename containing a dot in the same position
+(e.g., t/test_pl as a directory and t/test.pl as a file). This problem
+has been corrected.
 
 =back
 
@@ -927,7 +973,59 @@ C<eval(q|""!=!~//|);>
 =item *
 
 The "c [line num]" debugger command was broken by other debugger changes
-release in 5.15.3. This is now fixed.
+release in 5.15.3.  This is now fixed.
+
+=item *
+
+Breakpoints were not properly restored after a debugger restart using the
+"R" command.  This was broken in 5.15.3.  This is now fixed.
+
+=item *
+
+The debugger prompt did not display the current line in.  This was broken
+in 5.15.3.  This is now fixed.
+
+=item *
+
+Class method calls still suffered from the Unicode bug with Latin-1 package
+names.  This was missed in the Unicode package name cleanup in 5.15.4
+[perl #105922].
+
+=item *
+
+The debugger no longer tries to do C<local $_> when dumping data
+structures.
+
+=item *
+
+Calling C<readline($fh)> where $fh is a glob copy (e.g., after
+C<$fh = *STDOUT>), assigning something other than a glob to $fh, and then
+freeing $fh (e.g., by leaving the scope where it is defined) no longer
+causes the internal variable used by C<$.> (C<PL_last_in_gv>) to point to
+a freed scalar, that could be reused for some other glob, causing C<$.> to
+use some unrelated filehandle [perl #97988].
+
+=item *
+
+A regression in 5.14 caused these statements not to set the internal
+variable that holds the handle used by C<$.>:
+
+    my $fh = *STDOUT;
+    tell $fh;
+    eof  $fh;
+    seek $fh, 0,0;
+    tell     *$fh;
+    eof      *$fh;
+    seek     *$fh, 0,0;
+    readline *$fh;
+
+This is now fixed, but C<tell *{ *$fh }> still has the problem, and it is
+not clear how to fix it [perl #106536].
+
+=item *
+
+Version comparisons, such as those that happen implicitly with
+C<use v5.43>, no longer cause locale settings to change [perl #105784].
 
 =back