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

belg4mit,
I had considered AUTOLOAD for the trivial subs. I had also considered one of the modules that dynamically create your subs for you at compile time. I avoided both for the reason that if I decide to expand a single sub to do something unique, the dynamic code would get even more complicated.

L~R

Replies are listed 'Best First'.
Re: Re: Re: RFC: Seconds2English
by belg4mit (Prior) on Jul 18, 2003 at 20:07 UTC
    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.

      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