in reply to Re: How many ways are there to use AUTOLOAD? (huh?)
in thread How many ways are there to use AUTOLOAD?

This morning's problem was that I was calling $document->gDbh when I should have been calling $document->_gDbh. As a result I was getting the error that method "do" was being called on an undefined object, that is, the undefined value coming back from my bad method call.

For situations where I just called a method but didn't use the return value, I wanted to be sure to catch the typo.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^3: How many ways are there to use AUTOLOAD? (huh?)
by tye (Sage) on Sep 03, 2004 at 16:43 UTC

    So how does $document->gDbh not produce the fatal error:

    Can't locate object method "gDbh" via package "...

    ? That is what I don't understand and what seems simply broken to me. That is the error I get when I call the wrong method and I don't have to play strange games with AUTOLOAD.

    - tye