Aion-Carp
view release on metacpan or search on metacpan
$exception->{STACKTRACE} # -> 123
$exception = [];
eval { die $exception };
$@ # --> []
# DESCRIPTION
This module replace `$SIG{__DIE__}` to function, who added to exception stacktrace.
If exeption is string, then stacktrace added to message. And if exeption is hash (`{}`), or object on base hash (`bless {}, "..."`), then added to it key `STACKTRACE` with stacktrace.
Where use propagation, stacktrace do'nt added.
# SUBROUTINES
## handler ($message)
It added to `$message` stacktrace.
eval { Aion::Carp::handler("hi!") }; $@ # ~> ^hi!\n\tdie
lib/Aion/Carp.md view on Meta::CPAN
$exception = [];
eval { die $exception };
$@ # --> []
```
# DESCRIPTION
This module replace `$SIG{__DIE__}` to function, who added to exception stacktrace.
If exeption is string, then stacktrace added to message. And if exeption is hash (`{}`), or object on base hash (`bless {}, "..."`), then added to it key `STACKTRACE` with stacktrace.
Where use propagation, stacktrace do'nt added.
# SUBROUTINES
## handler ($message)
It added to `$message` stacktrace.
```perl
lib/Aion/Carp.pm view on Meta::CPAN
$exception->{STACKTRACE} # -> 123
$exception = [];
eval { die $exception };
$@ # --> []
=head1 DESCRIPTION
This module replace C<$SIG{__DIE__}> to function, who added to exception stacktrace.
If exeption is string, then stacktrace added to message. And if exeption is hash (C<{}>), or object on base hash (C<bless {}, "...">), then added to it key C<STACKTRACE> with stacktrace.
Where use propagation, stacktrace do'nt added.
=head1 SUBROUTINES
=head2 handler ($message)
It added to C<$message> stacktrace.
eval { Aion::Carp::handler("hi!") }; $@ # ~> ^hi!\n\tdie
t/aion/carp.t view on Meta::CPAN
$exception = [];
eval { die $exception };
::is_deeply scalar do {$@}, scalar do {[]}, '$@ # --> []';
#
# # DESCRIPTION
#
# This module replace `$SIG{__DIE__}` to function, who added to exception stacktrace.
#
# If exeption is string, then stacktrace added to message. And if exeption is hash (`{}`), or object on base hash (`bless {}, "..."`), then added to it key `STACKTRACE` with stacktrace.
#
# Where use propagation, stacktrace do'nt added.
#
# # SUBROUTINES
#
# ## handler ($message)
#
# It added to `$message` stacktrace.
#
done_testing; }; subtest 'handler ($message)' => sub {
( run in 1.055 second using v1.01-cache-2.11-cpan-de7293f3b23 )