develooper Front page | perl.perl5.porters | Postings from May 2008

Re: thoughts about overloading method calls

Thread Previous | Thread Next
Ricardo SIGNES
May 7, 2008 04:50
Re: thoughts about overloading method calls
Message ID:
* Reini Urban <> [2008-05-07T06:19:20]
> 2008/5/6 Ricardo SIGNES <>:
> >  A truly anemic start would be to write classes with no methods save for
> >  AUTOLOAD.  Unfortunately, AUTOLOAD does not catch universal methods.  This
> >  is worse than just having to write a "can" and "isa."  If anything in your
> >  process loads UNIVERSAL::{moniker,require} or Sub::Install, or any of a
> >  number of other things that muck with UNIVERSAL, your code will change in
> >  bizarre ways.
> I would just write something along "no autoload"
> Autovification of method calls should be pragmatized, being able to turn it
> off.

One of us is confused.

What I meant was "I can't use AUTOLOAD to autovivify /all/ methods, because it
will never be able to autovivify methods found in UNIVERSAL."

It seems like you're suggesting a solution to the opposite problem.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About