Conformance/Source/Directory.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 100% 3 / 3 totaltotal 58.9% 23 / 39 CC 4 SCAR 13.2
CC
4
Cov
54%
new
6.0
root
6.0
describe
6.0
CRAP 3.7
« Conformance/Source.pm ↑ Summary Conformance/Check/DistFiles.pm »
1 package Dist::Conformance::Source::Directory 0.005;
2  
3 # ABSTRACT: Standards read from a directory on this machine
4  
5 2 ▶use 5.040;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use re '/aasx';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Mojo::Base 'Dist::Conformance::Source', -signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶use Mojo::File();
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13 2 has 'directory';
14  
15  
16 0 ▶sub new ( $class, @args ) {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
17 0 my $self = $class->SUPER::new(@args);
18 0 ▶ die "directory is required\n" if !defined $self->directory;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->directory 0 0 0
19 0 return $self;
20 }
21  
22  
23 0 ▶sub root ($self) {
Subroutine root: not called CC=2 SCAR=17.9
Pod documented
24 0 my $root = Mojo::File->new( $self->directory );
25 0 ▶ die "The standards directory $root does not exist\n" if !-d $root;
Branch: 1 branch
BranchTrueFalseTotal
unless -d $root 0 0 0
26 0 return $root;
27 }
28  
29  
30 0 ▶sub describe ($self) {
Subroutine describe: not called CC=2 SCAR=17.9
Pod documented
31 0 ▶ return $self->directory . ( $self->path ne q{} ? ' (path ' . $self->path . ')' : q{} );
Branch: 1 branch
BranchTrueFalseTotal
$self->path ne '' ? : 0 0 0
32 }
33  
34 __END__
« Conformance/Source.pm ↑ Summary Conformance/Check/DistFiles.pm »