Rob Coops wrote:
Hang on I guess I understand what it is you are trying to do...
You want: goto &CORE::return; to work like it reads.
Now my question to you is how does this read to you because what I am
reading in the perlsub about this stuff is the following.
It reads this way:
It "reads" "please go to this function now with @_ as its @_ - local()
changes",
E.g. so that 'goto &CORE::return;' :
"
exits the current subroutine (losing any changes
set by local()) and immediately calls in its place the named
subroutine using the current value of @_.
"
- from "goto-&NAME" section at `perldoc -f goto`
Since you can't reference \&CORE::return that doesn't work like it does
with any old function, like
goto &Joe::Mama;
does
Overriding Built-in Functions
Many built-in functions may be overridden, though this should be tried only
occasionally and for good reason. Typically this might be done by a package
attempting to emulate missing built-in functionality on a non-Unix system.
Overriding may be done only by importing the name from a module at compile
time--ordinary predeclaration isn't good enough. However, the use subs
pragma lets you, in effect, predeclare subs via the import syntax, and
these
names may then override built-in ones:
use subs 'chdir', 'chroot', 'chmod', 'chown';
chdir $somewhere;
sub chdir { ... }
To unambiguously refer to the built-in form, precede the built-in name with
the special package qualifier CORE:: . For example, saying CORE::open()
always refers to the built-in open(), even if the current package has
imported some other subroutine called &open() from elsewhere. *Even though
it looks like a regular function call, it isn't: you can't take a reference
to it, such as the incorrect \&CORE::open might appear to produce.*
This leads me to think that what ever this might read to to you does not do
what you are expecting it to do
Which is why I'm trying to find another way :) Its a challenge and
likley impossible but I have to try, like popcorn in your gums ;p
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>