No such thing as a small change | |
PerlMonks |
Re: Undefined Subroutine errorsby blahblahblah (Priest) |
on Jul 17, 2006 at 23:52 UTC ( [id://561892]=note: print w/replies, xml ) | Need Help?? |
quick update: I just re-read your question and realized that you're not looking for run-time catching; you want something earlier. So my post doesn't answer your question. However, you still might find it an interesting way to deal with the run-time problem.
We have a universal AUTOLOAD function in our app which catches these errors and prints a nice message. I'm at home, so I don't have the code in front of me, but I remember that I got the idea from the perl cookbook. I just found the table of contents on O'Reilly's site: it looks like chapter 10.15 is what I'm thinking of. We've had our AUTOLOAD for several years, and it does a few nice things besides catching our sloppy mistakes. However, it has a lot of disadvantages, like killing inheritance (which never used to bother us because none of our code was OO), and encouraging sloppy programming, so it's a mixed blessing. -Joe
In Section
Seekers of Perl Wisdom
|
|