[cgiapp] can AUTOLOAD sub be named AUTOLOAD?

Ron Savage ron at savage.net.au
Fri Apr 18 04:41:27 EDT 2008


Hi

>   return $self->{__FALLBACK_MODE} || {$self->run_modes()}{AUTOLOAD};
> 
> Just to get it running, I changed it to this (though I'm guessing there's a
> slicker way):
> 
>   if ($self->{__FALLBACK_MODE}) {
>     return $self->{__FALLBACK_MODE};
>   }
>   else {
>     my %rmodes = ($self->run_modes());
>     return $rmodes{AUTOLOAD};
>   }

Will this work, even though it looks tacky to me:

return $self->{__FALLBACK_MODE} || 
do {
    my %rmodes = ($self->run_modes());
    return $rmodes{AUTOLOAD};
}
-- 
Ron Savage
ron at savage.net.au
http://savage.net.au/index.html




More information about the cgiapp mailing list