From 84b2a83ee84c08965d1a98daa5e50db873934b33 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sun, 18 Dec 2011 20:29:39 -0800 Subject: [PATCH] perldelta up to 8d0b139 --- pod/perldelta.pod | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index fa57718..229597a 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1,7 +1,7 @@ =encoding utf8 =for comment -This has been completed up to 05d4ea3f27e, 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?) 43d9ecf jpeacock Set all version object math ops to noop f300909 smueller EU::ParseXS: Silence warning (probably unnecessary) @@ -210,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 and C 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 C-level function, added in 5.15.4, now has a @@ -237,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 methods (to prevent autoloading), simply by not calling such empty methods. This release takes this optimisation a step further, by not -calling any C method that begins with an C statement. +calling any C method that begins with a C statement. This can be useful for destructors that are only used for debugging: use constant DEBUG => 1; @@ -254,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 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 modifies the original string itself. @@ -974,6 +991,42 @@ 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 when dumping data +structures. + +=item * + +Calling C 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) 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 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, no longer cause locale settings to change [perl #105784]. + =back =head1 Known Problems -- 2.7.4