On Wed, Aug 02, 2000 at 12:10:38PM +0100, Leon Brocard wrote:
> The AUTOLOAD subroutine should be able to decline a request
Given that I just whinged about this on p5p, YES.
> =head2 $AUTOLOAD
>
> While we're at it, it may be a good idea to remove the global
> $AUTOLOAD variable and instead pass it as the first parameter of the
> AUTOLOAD subroutine call.
Why, other than generic global drought? I'd prefer not to have to
fiddle with the args when despatching a subroutine call. Contrast:
sub AUTOLOAD {
my $sub = shift;
# Make sub exist;
goto &$sub;
}
and
sub AUTOLOAD {
# Make sub exist
goto &$AUTOLOAD;
}
Also, you're breaking the "subroutine parameters end up as @_" paradigm,
and AUTOLOAD suddenly because more "special" than it currently is. In
fact, it starts to look like a method call. And what if you have autoloaded
methods:
sub AUTOLOAD {
my ($sub, $object) = (shift, shift);
...
}
Blegh.
--
"So i get the chance to reread my postings to asr at times, with a
corresponding conservation of the almighty leviam00se, Kai Henningsen."
-- Megahal (trained on asr), 1998-11-06