Binary.pm

filter: Statementstmt 88.4% 23 / 26 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 1 totaltotal 81.5% 31 / 38 CC 3 SCAR 5.9
CC
3
Cov
83%
_init
3.1
_mkdir_for
2.0
BEGIN
1.0
CRAP 1.8
« Linker.pm ↑ Summary ArgumentCollector.pm »
1 package ExtUtils::Builder::Binary;
2 4 $ExtUtils::Builder::Binary::VERSION = '0.038';
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 ▶use Carp qw//;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 ▶use ExtUtils::Builder::Util qw/function/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 4 my %allowed_types = map { ($_ => 1) } qw/shared-library static-library loadable-object executable/;
10  
11 15 ▶sub _init {
Subroutine _init: called CC=3 SCAR=11.3
12 15 my ($self, %args) = @_;
13 15 ▶ my $type = $args{type} or Carp::croak('No type given');
Branch: 1 branch
BranchTrueFalseTotal
my $type = $args{"type"} or Carp::croak("No type given") 15 0 15
14 15 ▶ $allowed_types{$type} or Carp::croak("$type is not an allowed linkage type");
Branch: 1 branch
BranchTrueFalseTotal
$allowed_types{$type} or Carp::croak("$type is not an allowed linkage type") 15 0 15
15 15 $self->{type} = $type;
16 15 return;
17 }
18  
19 29 ▶sub type {
Subroutine type: called CC=1 SCAR=0.0
Pod undocumented
20 29 my $self = shift;
21 29 return $self->{type};
22 }
23  
24 0 ▶sub _mkdir_for {
Subroutine _mkdir_for: not called CC=1 SCAR=6.9
25 0 my ($self, $file) = @_;
26 0 my $dirname = File::Basename::dirname($file);
27 0 return function(
28 module => 'File::Path',
29 function => 'make_path',
30 exports => 'explicit',
31 arguments => [ $dirname ],
32 message => "mkdir $dirname",
33 );
34 }
35 4 1;
36  
37 # ABSTRACT: Helper role for classes producing binary objects
38  
39 __END__
« Linker.pm ↑ Summary ArgumentCollector.pm »