Aion-Carp
view release on metacpan or search on metacpan
lib/Aion/Carp.pm view on Meta::CPAN
456789101112131415161718192021222324our
$VERSION
=
"1.5"
;
sub
handler {
my
(
$x
) =
@_
;
if
(!
ref
$x
) {
if
(
$x
=~ s/\n[ \t]+\.\.\.propagated at .* line \d+\.\n\z/\n/a) {}
else
{
$x
=~ s/ at .*? line \d+\.\n\z//a;
my
$c
= Carp::longmess(
''
);
$c
=~ s/^( at .*? line \d+)\.\n/
$x
\n\tdie(...) called$1\n/;
$x
=
$c
;
}
}
elsif
(Scalar::Util::reftype(
$x
) eq
"HASH"
&& !
exists
$x
->{STACKTRACE}) {
my
$c
= Carp::longmess(
"die(...) called"
);
t/aion/carp.t view on Meta::CPAN
1234567891011use
common::sense;
use
open
qw/:std :utf8/
;
use
Test::More 0.98;
use
Carp::Always::Color;
sub
_mkpath_ {
my
(
$p
) =
@_
;
length
($`) && !-e $`?
mkdir
($`, 0755) ||
die
"mkdir $`: $!"
: ()
while
$p
=~ m!/!g;
$p
} BEGIN {
my
$t
= `pwd`;
chop
$t
;
$t
.=
'/'
....
#
# Aion::Carp - added stacktrace to exceptions
#
# # VERSION
#
# 1.5
#
# # SYNOPSIS
#
subtest
'SYNOPSIS'
=>
sub
{
( run in 1.100 second using v1.01-cache-2.11-cpan-49f99fa48dc )