This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for 67a057d6d8 (charnames crash)
[perl5.git] / pod / perldelta.pod
index 4bff44a..c71c5f6 100644 (file)
@@ -66,6 +66,42 @@ an updated module in the L</Modules and Pragmata> section.
 
 [ List each deprecation as a =head2 entry ]
 
+=head2 Lexical $_ is now deprecated
+
+Since it was introduced in Perl 5.10, it has caused much confusion with no
+obvious solution:
+
+=over
+
+=item *
+
+Various modules (e.g., List::Util) expect callback routines to use the
+global $_.  C<use List::Util 'first'; my $_; first { $_ == 1 } @list> does
+not work as one would expect.
+
+=item *
+
+A C<my $_> declaration earlier in the same file can cause confusing closure
+warnings.
+
+=item *
+
+The "_" subroutine prototype character allows called subroutines to access
+your lexical $_, so it is not really private after all.
+
+=item *
+
+Nevertheless, subroutines with a "(@)" prototype and methods cannot access
+the caller's lexical $_, unless they are written in XS.
+
+=item *
+
+But even XS routines cannot access a lexical $_ declared, not in the
+calling subroutine, but in an outer scope, iff that subroutine happened not
+to mention $_ or use any operators that default to $_.
+
+=back
+
 =head2 Various XS-callable functions are now deprecated
 
 The following functions will be removed from a future version of Perl,
@@ -460,7 +496,7 @@ C<eval '$&'>.  The same applies to C<$'> and C<$`> [perl #4289].
 
 =item *
 
-Two minor bugs involving C<local *ISA> and C<local *Foo::> causing stale
+Several bugs involving C<local *ISA> and C<local *Foo::> causing stale
 MRO caches have been fixed.  
 
 =item *
@@ -474,6 +510,32 @@ Localising a typeglob containing a subroutine when the typeglob's package
 has been deleted from its parent stash no longer produces an error.  This
 bug was introduced in Perl 5.14.
 
+=item *
+
+Under some circumstances, C<local *method=...> would fail to reset method
+caches upon scope exit.
+
+=item *
+
+C</[.foo.]/> is no longer an error, but produces a warning (as before) and
+is treated as C</[.fo]/> [perl #115818].
+
+=item *
+
+C<goto $tied_var> now calls FETCH before deciding what type of goto
+(subroutine or label) this is.
+
+=item *
+
+Renaming packages through glob assignment
+(C<*Foo:: = *Bar::; *Bar:: = *Baz::>) in combination with C<m?...?> and
+C<reset> no longer makes threaded builds crash.
+
+=item *
+
+An earlier release in the 5.17.x series could crash if user code prevented
+_charnames from loading via C<$INC{'_charnames.pm'}++>.
+
 =back
 
 =head1 Known Problems