IsDev/Heuristic/VCS/Git.pm

filter: Statementstmt 91.6% 22 / 24 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 2 / 2 totaltotal 91.4% 32 / 35 CC 2 SCAR 2.8
CC
2
Cov
88%
matches
2.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« IsDev/Heuristic/Makefile.pm ↑ Summary IsDev/NegativeHeuristic/IsDev/IgnoreFile.pm »
1 4 ▶use 5.008; # utf8
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 package Path::IsDev::Heuristic::VCS::Git;
7  
8 4 our $VERSION = '1.001003';
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25 # ABSTRACT: Determine if a path contains a .git repository
26  
27 4 our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
28  
29 4 ▶use Role::Tiny::With qw( with );
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 4 with 'Path::IsDev::Role::Heuristic', 'Path::IsDev::Role::Matcher::Child::Exists::Any::Dir';
32  
33  
34  
35  
36  
37  
38  
39  
40  
41 3 ▶sub dirs { return qw( .git ) }
Subroutine dirs: called CC=1 SCAR=0.0
Pod documented
42  
43  
44  
45  
46  
47  
48  
49 3 ▶sub matches {
Subroutine matches: called CC=2 SCAR=8.4
Pod documented
50 3 my ( $self, $result_object ) = @_;
51 3 ▶ if ( $self->child_exists_any_dir( $result_object, $self->dirs ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->child_exists_any_dir($result_object, $self->dirs)) 0 3 3
52 0 $result_object->result(1);
53 0 return 1;
54 }
55 3 return;
56 }
57  
58 4 1;
59  
60 __END__
« IsDev/Heuristic/Makefile.pm ↑ Summary IsDev/NegativeHeuristic/IsDev/IgnoreFile.pm »