It usually doesn't take long to verify that the program had no way of succeeding in that particular operation. The question then becomes why it thought it might. Which means that I need to figure out what it was doing, and the line number is useful. In fact it is so useful that I prefer to use Carp's confess to get even more context at my finger tips.
Furthermore I find automatic line numbers useful when a program has coding problems which I need to sort through to figure out the error. Coding problems like a program that did a chdir somewhere then died in the middle of a run (OK, I have the file name, where is that?) or ones that didn't bother including the name of the file that they were trying to open.
And finally often after a batch script has terminated abnormally it is necesssary to decide what to do about the mess it left behind. The line number is useful for that because it gives me information about where the program was and therefore (if I know it) knowledge about what it was doing, what it had done, and what should be done about. (Yes, a well-designed program will clean up any mess before it does anything. I have not always had the luxury of using well-designed programs...)
Now if the information is not useful for you, then you can readily ignore it. But it has been very useful for me, and I appreciate Perl automatically including it.
In reply to Re: Re: How to get die() to stop printing a line number?
by tilly
in thread How to get die() to stop printing a line number?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |