perldelta for &CORE::foo
authorFather Chrysostomos <sprout@cpan.org>
Sun, 14 Aug 2011 20:42:27 +0000 (13:42 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 14 Aug 2011 20:42:27 +0000 (13:42 -0700)
pod/perldelta.pod

index 6118cd4..0d87c3a 100644 (file)
@@ -28,6 +28,21 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
+=head2 Subroutines in the CORE namespace
+
+Many Perl keywords are now available as subroutines in the CORE namespace.
+These cannot be called through references or via C<&foo> syntax yet, but
+must be called as barewords.  In other words, you can now do this:
+
+    BEGIN { *entangle = \&CORE::tie }
+    entangle $variable, $package, @args;
+
+This currently works for overridable keywords other than C<not>, C<dump>,
+C<getprotobynumber> and the infix operators.
+
+Work is under way to allow these subroutines to be called through
+references.
+
 =head2 C<__FILE__()> Syntax
 
 The C<__FILE__>, C<__LINE__> and C<__PACKAGE__> tokens can now be written
@@ -279,7 +294,15 @@ XXX Newly added diagnostic messages go here
 
 =item *
 
-XXX L<message|perldiag/"message">
+L<&CORE::%s cannot be called directly|perldiag/"&CORE::%s cannot be called directly">
+
+(F) You tried to call a subroutine in the C<CORE::> namespace
+with C<&foo> syntax or through a reference.  The subroutines
+in this package cannot yet be called that way, but must be
+called as barewords.  Something like this will work:
+
+    BEGIN { *shove = \&CORE::push; }
+    shove @array, 1,2,3; # pushes on to @array
 
 =back