Welcome to the Monastery | |
PerlMonks |
Re: A Quesiton of Numbersby RMGir (Prior) |
on Jul 10, 2002 at 13:19 UTC ( [id://180740]=note: print w/replies, xml ) | Need Help?? |
You're right, line numbers have a limited utility.
In fact, they're even more limited than you'd think in perl, since in some cases, the error message points to the wrong line. But they're still a very good way to know where the bug was, as long as you still have the exact version of the script that was running by the time you see the error in your logs. (That's one of the reasons version control is so important...)
For more useful, but more verbose error messages, you might want to use the cluck and confess calls from the Carp module. They give you a full backtrace for where you warned/died, which might be more robust than just the line number...
In Section
Meditations
|
|