This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make $$ writable, but still magical
[perl5.git] / pod / perldelta.pod
index 9f718c3..8684157 100644 (file)
@@ -42,6 +42,14 @@ here, but most should go in the L</Performance Enhancements> section.
 The C<CORE::> prefix can now be used on keywords enabled by
 L<feature.pm|feature>, even outside the scope of C<use feature>.
 
+=head2 C<$$> can be assigned to
+
+C<$$> was made read-only in Perl 5.8.0.  But only sometimes: C<local $$>
+would make it writable again.  Some CPAN modules were using C<local $$> or
+XS code to bypass the read-only check, so there is no reason to keep C<$$>
+read-only.  (This change also allowed a bug to be fixed while maintaining
+backward compatibility.)
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -54,13 +62,6 @@ L</Selected Bug Fixes> section.
 
 [ List each incompatible change as a =head2 entry ]
 
-=head2 C<$$> no longer caches PID
-
-Previously, if one embeds Perl or uses XS and calls fork(3) from C, Perls
-notion of C<$$> could go out of sync with what getpid() returns. By always
-fetching the value of C<$$> via getpid(), this potential bug is eliminated.
-Code that depends on the caching behavior will break.
-
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -987,6 +988,12 @@ fixed [RT #85026].
 
 =item *
 
+Previously, if one embeds Perl or uses XS and calls fork(3) from C, Perl's
+notion of C<$$> could go out of sync with what getpid() returns.  By always
+fetching the value of C<$$> via getpid(), this potential bug is eliminated.
+
+=item *
+
 Passing the same constant subroutine to both C<index> and C<formline> no
 longer causes one or the other to fail [RT #89218].