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

Re: thoughts about overloading method calls

Thread Previous | Thread Next
From:
Ricardo SIGNES
Date:
May 7, 2008 04:50
Subject:
Re: thoughts about overloading method calls
Message ID:
20080507115022.GB7254@knight.local
* Reini Urban <rurban@x-ray.at> [2008-05-07T06:19:20]
> 2008/5/6 Ricardo SIGNES <perl.p5p@rjbs.manxome.org>:
> >  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.

-- 
rjbs

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