Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Undefined Subroutine errors

by blahblahblah (Priest)
on Jul 17, 2006 at 23:52 UTC ( [id://561892]=note: print w/replies, xml ) Need Help??


in reply to Undefined Subroutine errors

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://561892]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-26 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found