Carp-Source
view release on metacpan or search on metacpan
"abstract" : "Warn of errors with stack backtrace and source context",
"author" : [
"Marcel Gruenauer <marcel@cpan.org>"
],
"build_requires" : {
"Carp" : "0",
"English" : "0",
"File::Find" : "0",
"File::Temp" : "0",
"Scalar::Util" : "0",
"Test::Differences" : "0",
"Test::More" : "0.94"
},
"configure_requires" : {
"ExtUtils::MakeMaker" : "6.31"
},
"generated_by" : "Dist::Zilla version 2.100960",
"license" : "perl",
"meta-spec" : {
"url" : "http://module-build.sourceforge.net/META-spec-v1.4.html",
"version" : 1.4
---
abstract: 'Warn of errors with stack backtrace and source context'
author:
- 'Marcel Gruenauer <marcel@cpan.org>'
build_requires:
Carp: 0
English: 0
File::Find: 0
File::Temp: 0
Scalar::Util: 0
Test::Differences: 0
Test::More: 0.94
configure_requires:
ExtUtils::MakeMaker: 6.31
generated_by: 'Dist::Zilla version 2.100960'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: Carp-Source
provides:
Makefile.PL view on Meta::CPAN
},
'NAME' => 'Carp::Source',
'DISTNAME' => 'Carp-Source',
'CONFIGURE_REQUIRES' => {
'ExtUtils::MakeMaker' => '6.31'
},
'AUTHOR' => 'Marcel Gruenauer <marcel@cpan.org>',
'BUILD_REQUIRES' => {
'Test::More' => '0.94',
'Scalar::Util' => '0',
'Test::Differences' => '0',
'English' => '0',
'File::Find' => '0',
'File::Temp' => '0',
'Carp' => '0'
},
'ABSTRACT' => 'Warn of errors with stack backtrace and source context',
'EXE_FILES' => [],
'VERSION' => '1.101420',
'PREREQ_PM' => {
'Term::ANSIColor' => '0',
t/01_context.t view on Meta::CPAN
#!/usr/bin/env perl
use warnings;
use strict;
use Carp::Source;
use Test::More tests => 1;
use Test::Differences;
my $context = Carp::Source::get_context(__FILE__, __LINE__);
# Some comments to
# avoid getting the expected
# context into the tested context
# which would make for recursive weirdness
my $expected = <<EOCONTEXT;
context for t/01_context.t line 7:
4: use Carp::Source;
5: use Test::More tests => 1;
6: use Test::Differences;
7: \e[30;43mmy \$context = Carp::Source::get_context(__FILE__, __LINE__);\e[0m
8:
9: # Some comments to
10: # avoid getting the expected
===========================================================================
EOCONTEXT
eq_or_diff $context, $expected, 'context';
t/02_with_options.t view on Meta::CPAN
#!/usr/bin/env perl
use warnings;
use strict;
use Carp::Source;
use Test::More tests => 1;
use Test::Differences;
my $context = Carp::Source::get_context(__FILE__, __LINE__,
lines => 5,
number => 0
);
# Some comments to
# avoid getting the expected
# context into the tested context
# which would make for recursive weirdness
my $expected = <<EOCONTEXT;
context for t/02_with_options.t line 7:
use warnings;
use strict;
use Carp::Source;
use Test::More tests => 1;
use Test::Differences;
\e[30;43mmy \$context = Carp::Source::get_context(__FILE__, __LINE__,\e[0m
lines => 5,
number => 0
);
# Some comments to
===========================================================================
EOCONTEXT
eq_or_diff $context, $expected, 'context';
( run in 1.778 second using v1.01-cache-2.11-cpan-df04353d9ac )