Conformance/Snapshot.pm

filter: Statementstmt 53.8% 14 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 41.6% 5 / 12 Podpod 100% 7 / 7 totaltotal 57.7% 26 / 45 CC 1 SCAR 4.6
CC
1
Cov
54%
paths
2.0
content
2.0
contains
2.0
CRAP 1.6
« Conformance/Config.pm ↑ Summary
1 package Dist::Conformance::Snapshot 0.005;
2  
3 # ABSTRACT: What a check can read of a repository: its paths, their blob SHAs and their contents
4  
5 6 ▶use 5.040;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 6 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 6 ▶use re '/aasx';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 6 ▶use Mojo::Base -base, -signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 6 ▶use Digest::SHA();
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13 0 ▶sub paths ($self) { die( ref($self) . " does not implement paths\n" ) }
Subroutine paths: not called CC=1 SCAR=6.9
Pod documented
14  
15  
16 0 ▶sub content ( $self, $ ) { die( ref($self) . " does not implement content\n" ) }
Subroutine content: not called CC=1 SCAR=6.9
Pod documented
17  
18  
19 0 ▶sub contains ( $self, $path ) { return exists $self->paths->{$path} }
Subroutine contains: not called CC=1 SCAR=6.9
Pod documented
20  
21  
22 0 ▶sub sha ( $self, $path ) { return $self->paths->{$path} }
Subroutine sha: not called CC=1 SCAR=6.9
Pod documented
23  
24  
25 0 ▶sub under ( $self, $directory ) {
Subroutine under: not called CC=1 SCAR=6.9
Pod documented
26 0 my $prefix = "$directory/";
27 0 my @inside = sort map { substr $_, length $prefix } grep { index( $_, $prefix ) == 0 } keys %{ $self->paths };
28 0 return @inside;
29 }
30  
31  
32 0 ▶sub writable ($) { return 0 }
Subroutine writable: not called CC=1 SCAR=6.9
Pod documented
33  
34  
35 0 ▶sub blob_sha ($bytes) {
Subroutine blob_sha: not called CC=1 SCAR=6.9
Pod documented
36 0 return Digest::SHA::sha1_hex( 'blob ' . length($bytes) . "\0" . $bytes );
37 }
38  
39 __END__
« Conformance/Config.pm ↑ Summary