blib/lib/Test/Alien/CanCompile.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 93.5% 29 / 31 CC 3 SCAR 4.1
CC
3
Cov
96%
import
2.0
skip
2.0
BEGIN
1.0
CRAP 1.5
« blib/lib/Alien/Build/Plugin/Extract/Directory.pm ↑ Summary example/bzip2.alienfile »
1 package Test::Alien::CanCompile;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use 5.008004;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Test2::API qw( context );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # ABSTRACT: Skip a test file unless a C compiler is available
9 2 our $VERSION = '2.88'; # VERSION
10  
11  
12 sub skip
13 5 ▶{
Subroutine skip: called CC=2 SCAR=6.9
Pod undocumented
14 5 require ExtUtils::CBuilder;
15 5 ▶ ExtUtils::CBuilder->new->have_compiler ? undef : 'This test requires a compiler.';
Branch: 1 branch
BranchTrueFalseTotal
'ExtUtils::CBuilder'->new->have_compiler ? : 3 2 5
16 }
17  
18 sub import
19 2 ▶{
Subroutine import: called CC=2 SCAR=7.0
20 2 my $skip = __PACKAGE__->skip;
21 2 ▶ return unless defined $skip;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $skip 1 1 2
22  
23 1 my $ctx = context();
24 1 $ctx->plan(0, SKIP => $skip);
25 0 $ctx->release;
26 }
27  
28 2 1;
29  
30 __END__
« blib/lib/Alien/Build/Plugin/Extract/Directory.pm ↑ Summary example/bzip2.alienfile »