AUTOLOAD { my $self = $_[0]; # Not shift, using goto. my $method = ...; if (my $code = _autoloaded($self, $method)) { goto &$code; } elsif (my $next = next_autoload($self)) { goto &$next; } elsif ($method eq 'DESTROY') { # If people do $obj->DESTROY and there's no # DESTROY available then they'll be surprised. # Just as surprised I am that they call DESTROY # explicitly. return; } else { croak(...); } }