Aion-Carp
view release on metacpan or search on metacpan
lib/Aion/Carp.pm view on Meta::CPAN
our $VERSION = "1.5";
use Carp qw//;
use Scalar::Util qw//;
sub handler {
my ($x) = @_;
if(!ref $x) {
no utf8; use bytes;
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
use 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.748 second using v1.01-cache-2.11-cpan-49f99fa48dc )