in reply to Re: How to get die() to stop printing a line number?
in thread How to get die() to stop printing a line number?

Sure there are many instances when the line number is a waste of space, but there are also instances where it's useful.

For example I often use simple dies for checking for contract violations. Where the contract was violated is just as interesting as what aspect of the contract was violated.

Line numbers sometimes good, sometimes bad - which was, I guess, your point ;-)

  • Comment on Re^2: How to get die() to stop printing a line number?

Replies are listed 'Best First'.
Re: How to get die() to stop printing a line number?
by Abigail-II (Bishop) on Jul 02, 2003 at 10:36 UTC
    Yeah, but a simple die() won't tell you where the contract was violated - it would tell where you found out that the contract was violated. croak() would tell you where the contract was violated though.

    Abigail

      Okay - it would tell me where the contract violation was detected, not made :-)

      croak() might not tell me either of course due to the evils of perls lack of encapsulation.