Error-Show
view release on metacpan or search on metacpan
lib/Error/Show.pm view on Meta::CPAN
if($opts{splain}){
$total=splain($total);
}
$total;
}
#Take an error string and attempt to contextualize it
# context options_pairs, error string
sub _context{
#use feature ":all";
DEBUG and say STDERR "IN context call";
#my ($package, $file, $caller_line)=caller;
#
# Error is set by single argument, key/value pair, or if no
# argument $@ is used
#
my %opts=@_;
my $error= $opts{error};
t/advanced_eval.t view on Meta::CPAN
use strict;
use warnings;
use feature ":all";
use Test::More;
use Error::Show;
# Test the eval line offsetting works
my $program=
'# line before 1
# line before 2
# line before 3
use strict;
use warnings;
use feature ":all";
use Test::More;
use Error::Show;
use File::Basename qw<dirname>;
my $file=__FILE__;
$@=undef;
my $dir=dirname $file;
my $context;
t/cli-check.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use feature ':all';
use File::Basename qw<dirname>;
my $file=__FILE__;
my $dir=dirname $file;
{
#Perform a check only . Redirect stderr to stdout
my $cmd="$^X -I $dir/../lib -MError::Show -c $dir/syntax-ok.pl";
my $result=`$cmd 2>&1`;
use strict;
use warnings;
use feature ":all";
use Test::More;
use Error::Show;
use File::Basename qw<dirname>;
my $file=__FILE__;
$@=undef;
my $dir=dirname $file;
my $context;
t/reverse.t view on Meta::CPAN
# Test if a frame stack is reversed when asked.
#
use strict;
use warnings;
use feature ":all";
use Test::More;
use Error::Show;
sub top {
my @frames;
my $i=0;
push @frames, [caller $i++] while caller $i;
my $normal=Error::Show::context frames=>\@frames;
my @nlines=$normal=~/(\d+)=>/gms;
( run in 0.421 second using v1.01-cache-2.11-cpan-cba739cd03b )