File Coverage

blib/lib/Path/IsDev/Heuristic/Makefile.pm
Criterion Covered Total %
statement 18 20 90.0
branch 1 2 50.0
condition n/a
subroutine 7 7 100.0
pod 2 2 100.0
total 28 31 90.3


line stmt bran cond sub pod time code
1 4     4   1474 use 5.008; # utf8
  4         9  
2 4     4   14 use strict;
  4         5  
  4         68  
3 4     4   13 use warnings;
  4         4  
  4         77  
4 4     4   578 use utf8;
  4         17  
  4         15  
5              
6             package Path::IsDev::Heuristic::Makefile;
7              
8             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 Makefile
26              
27             our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
28              
29 4     4   627 use Role::Tiny::With qw( with );
  4         4668  
  4         470  
30             with 'Path::IsDev::Role::Heuristic', 'Path::IsDev::Role::Matcher::Child::Exists::Any::File';
31              
32              
33              
34              
35              
36              
37              
38              
39              
40              
41              
42             sub files {
43 3     3 1 11 return qw( GNUmakefile makefile Makefile );
44             }
45              
46              
47              
48              
49              
50              
51              
52             sub matches {
53 3     3 1 6 my ( $self, $result_object ) = @_;
54 3 50       15 if ( $self->child_exists_any_file( $result_object, $self->files ) ) {
55 0         0 $result_object->result(1);
56 0         0 return 1;
57             }
58 3         12 return;
59             }
60              
61             1;
62              
63             __END__