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