in reply to How Do I Get the Line Number In My Error Message?

This sounds like a job for Carp. From TFM
carp
warn of errors (from perspective of caller)
cluck
warn of errors with stack backtrace (not exported by default)
croak
die of errors (from perspective of caller)
confess
die of errors with stack backtrace
just another cpan module author
  • Comment on Re: How Do I Get the Line Number In My Error Message?