develooper Front page | perl.module-authors | Postings from May 2007

Re: LISP module from CPAN

Thread Previous | Thread Next
From:
Eric Wilhelm
Date:
May 9, 2007 11:35
Subject:
Re: LISP module from CPAN
Message ID:
200705091134.43502.ewilhelm@cpan.org
# from Vadim
# on Wednesday 09 May 2007 10:53 am:

>Why didn't you placed functions in AUTOLOAD, and creating them only
> when needed?

Because then you must override can() or your code is broken.

It is usually a lot simpler (and gives better diagnostics) to just 
generate and install everything in advance.  Particularly if you're 
only doing it to save typing.  If you *actually* want to delay the 
decision of whether $foo->can("bar") until run-time, then yes autoload 
is the way to go.

--Eric
-- 
"Time flies like an arrow, but fruit flies like a banana."
--Groucho Marx
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About