| 1 | package Dist::Conformance::Source 0.004; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | # ABSTRACT: Where the standards come from: the flavor files and the templates | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 4 | ▶ | use 5.040; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 4 | ▶ | use warnings FATAL => 'all'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 4 | ▶ | use re '/aasx'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 4 | ▶ | use Mojo::Base -base, -signatures; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 4 | ▶ | use Dist::Conformance::Schema(); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 4 | has path => q{}; | |||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 0 | ▶ | sub root ($self) { die( ref($self) . " does not implement root\n" ) } | ||||||||||||||||||||||||||
|
Subroutine
root: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 0 | ▶ | sub describe ($self) { die( ref($self) . " does not implement describe\n" ) } | ||||||||||||||||||||||||||
|
Subroutine
describe: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | sub base ($self) { | ||||||||||||||||||||||||||
|
Subroutine
base: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||
| 23 | 0 | my $root = $self->root; | |||||||||||||||||||||||||||
| 24 | 0 | ▶ | return $self->path ne q{} ? $root->child( split m{/}, $self->path ) : $root; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 0 | ▶ | sub file ( $self, $relative ) { | ||||||||||||||||||||||||||
|
Subroutine
file: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 29 | 0 | Dist::Conformance::Schema::relative_path( $relative, 'the standards' ); | |||||||||||||||||||||||||||
| 30 | 0 | my $file = $self->base->child( split m{/}, $relative ); | |||||||||||||||||||||||||||
| 31 | 0 | ▶ | die( "The standards at " . $self->describe . " have no $relative\n" ) if !-e $file || -d _; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
not -e $file or -d _
MC/DC0%0/2
not -e $file or -d _
not -e $file
-d _
Truth table0%0/3
not(A) or B
A= not -e $fileB= -d _
| |||||||||||||||||||||||||||||
| 32 | 0 | return $file->slurp; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 0 | ▶ | sub exists_file ( $self, $relative ) { | ||||||||||||||||||||||||||
|
Subroutine
exists_file: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||
| 37 | 0 | my $file = $self->base->child( split m{/}, $relative ); | |||||||||||||||||||||||||||
| 38 | 0 | ▶ | return -e $file && !-d _; | ||||||||||||||||||||||||||
|
Condition0%0/3
-e $file && !-d(_)
MC/DC0%0/2
-e $file && !-d(_)
-e $file
!-d(_)
Truth table0%0/3
A && not(B)
A= -e $fileB= !-d(_)
| |||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | __END__ | ||||||||||||||||||||||||||||