diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-14 13:42:27 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-14 13:42:27 -0700 |
commit | 0afed34d529b803badb410b5b71e9fb2b1d479ca (patch) | |
tree | 099562fb89cb69e3dafadda94e1db79e2346bab5 | |
parent | a051f6c4b8aae71e5158c70dcff267f262d2f4c4 (diff) | |
download | perl-0afed34d529b803badb410b5b71e9fb2b1d479ca.tar.gz |
perldelta for &CORE::foo
-rw-r--r-- | pod/perldelta.pod | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 6118cd49f9..0d87c3aea0 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -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 |