blib/lib/ExtUtils/Builder/FileSet.pm

filter: Statementstmt 87.5% 28 / 32 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 3 totaltotal 79.5% 35 / 44 CC 4 SCAR 6.4
CC
4
Cov
85%
_pass_on
3.0
add_dependent
2.0
entries
2.0
CRAP 1.9
« blib/lib/ExtUtils/Builder/Action/Code.pm ↑ Summary blib/lib/ExtUtils/Builder/Serializer.pm »
1 package ExtUtils::Builder::FileSet;
2 10 $ExtUtils::Builder::FileSet::VERSION = '0.020';
3 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 10 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
9 6 my ($class, %args) = @_;
10 my $self = bless {
11 entries => [],
12 dependents => [],
13 callback => $args{callback},
14 6 }, $class;
15 6 return $self;
16 }
17  
18 0 ▶sub entries {
Subroutine entries: not called CC=1 SCAR=6.9
Pod undocumented
19 0 my $self = shift;
20 0 return @{ $self->{entries} };
21 }
22  
23 2 ▶sub add_dependent {
Subroutine add_dependent: called CC=2 SCAR=7.0
Pod undocumented
24 2 my ($self, $dep) = @_;
25 2 push @{ $self->{dependents} }, $dep;
26 2 for my $file (@{ $self->{entries} }) {
27 0 $dep->add_input($file);
28 }
29 2 return;
30 }
31  
32 18 ▶sub _pass_on {
Subroutine _pass_on: called CC=3 SCAR=11.0
33 18 my ($self, $entry) = @_;
34 18 push @{ $self->{entries} }, $entry;
35 18 ▶ $self->{callback}->($entry) if $self->{callback};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"callback"} 0 18 18
36 18 for my $dependent (@{ $self->{dependents} }) {
37 7 $dependent->add_input($entry);
38 }
39 18 return;
40 }
41  
42 10 1;
« blib/lib/ExtUtils/Builder/Action/Code.pm ↑ Summary blib/lib/ExtUtils/Builder/Serializer.pm »