in reply to Re: Re: RFC: Seconds2English
in thread RFC: Seconds2English

If you expand the sub to do anything other than return a key you implement it as a named sub. FIN.

--
I'm not belgian but I play one on TV.

Replies are listed 'Best First'.
Re: Re: Re: Re: RFC: Seconds2English
by Limbic~Region (Chancellor) on Jul 18, 2003 at 20:15 UTC
    belg4mit,
    Thanks for the distinction on when it is ok/not ok to use AUTOLOAD. I am sure some people would disagree - those people probably know what they are doing - I don't. I would assume that you would say it is ok to:
    no strict 'refs'; *{$AUTOLOAD} = sub { return $_[0]->{foobar} }; return $_[0]->{foobar};
    as a way to speed things up for subesequent calls as long as you know what you are doing.

    Cheers - L~R