Warns and dies noisily with stack backtraces

Edit Package perl-Carp-Always

This module is meant as a debugging aid. It can be used to make a script
complain loudly with stack backtraces when warn()ing or die()ing.

Here are how stack backtraces produced by this module looks:

# it works for explicit die's and warn's
$ perl -MCarp::Always -e 'sub f { die "arghh" }; sub g { f }; g'
arghh at -e line 1
main::f() called at -e line 1
main::g() called at -e line 1

# it works for interpreter-thrown failures
$ perl -MCarp::Always -w -e 'sub f { $a = shift; @a = @$a };' \
-e 'sub g { f(undef) }; g'
Use of uninitialized value in array dereference at -e line 1
main::f('undef') called at -e line 2
main::g() called at -e line 2

In the implementation, the 'Carp' module does the heavy work, through
'longmess()'. The actual implementation sets the signal hooks
'$SIG{__WARN__}' and '$SIG{__DIE__}' to emit the stack backtraces.

Oh, by the way, 'carp' and 'croak' when requiring/using the 'Carp' module
are also made verbose, behaving like 'cloak' and 'confess', respectively.

EXPORT
Nothing at all is exported.

Refresh
Refresh
Source Files
Filename Size Changed
Carp-Always-0.10.tar.gz 0000004904 4.79 KB
perl-Carp-Always.changes 0000000563 563 Bytes
perl-Carp-Always.spec 0000002960 2.89 KB
Revision 4 (latest revision is 12)
Stephan Kulow's avatar Stephan Kulow (coolo) accepted request 89436 from Lars Vogdt's avatar Lars Vogdt (lrupp) (revision 4)
update to 0.10 (forwarded request 89308 from tabraham1)
Comments 0
openSUSE Build Service is sponsored by