Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: A Quesiton of Numbers

by RMGir (Prior)
on Jul 10, 2002 at 13:19 UTC ( [id://180740]=note: print w/replies, xml ) Need Help??


in reply to A Quesiton of Numbers

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...
--
Mike

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found