logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: AUTLOAD and $_: msg#00349

Subject: Re: AUTLOAD and $_
On Mon, 2005-06-20 at 16:37 -0600, Luke Palmer wrote:

> On 6/20/05, chromatic <chromatic@xxxxxxx> wrote:

> > Who says AUTOLOAD will always either call a loaded sub or fail?

> Uh, what else can it do?  It doesn't have to load a sub to return a
> code reference.

I think:

class NullObject
{
        sub AUTOLOAD {}
}

is better than:

class NullObject
{
        sub AUTOLOAD { return sub {} }
}

Or have I misunderstood the proposal and the purpose of AUTOLOAD?

-- c




<Prev in Thread] Current Thread [Next in Thread>