AUTOLOAD

Dirk Koopman djk at tobit.co.uk
Wed Jan 17 12:22:08 GMT 2007


chromatic wrote:
> On Tuesday 16 January 2007 08:10, Dirk Koopman wrote:
> 
>> When messing with AUTOLOAD, the only thing that can() and its friends can
>> tell you, reliably, about is any static method - such as
>> $foo->can('AUTOLOAD').
> 
> I don't know why people continue saying this.  It's completely wrong.
> 
> What kind of systems are you writing that there is absolutely no sort of 
> reliable reasoning about what will invoke AUTOLOAD() and how does it possibly 
> pass the Perl core test suite?
> 
> Alternately, what sort of places do you work that consider it acceptable to 
> break Perl objects so spectacularly?

Ok, I am willing to learn.

Could you please specify exactly what is wrong with the above statement?

Note the use of the word "reliably", which I choose to interpret as "at 
*all* moments during the running of a program". The fact that (what I 
choose to call) non-static methods can be created during the running of 
a program, either through the use of AUTOLOAD or by other means, does 
not equate to "reliable" in the context of the above statement + example.

Note also the use of a degree of irony in the choice of example.

Dirk


More information about the london.pm mailing list