File Coverage

lib/Path/IsDev/Heuristic/Tool/MakeMaker.pm
Criterion Covered Total %
statement 21 21 100.0
branch 2 2 100.0
condition n/a
subroutine 7 7 100.0
pod 2 2 100.0
total 32 32 100.0


line stmt bran cond sub pod time code
1 11     11   17839 use 5.008; # utf8
  11         43  
  11         491  
2 11     11   64 use strict;
  11         41  
  11         703  
3 11     11   59 use warnings;
  11         25  
  11         347  
4 11     11   2304 use utf8;
  11         33  
  11         72  
5              
6             package Path::IsDev::Heuristic::Tool::MakeMaker;
7              
8             our $VERSION = '1.001002';
9              
10              
11              
12              
13              
14              
15              
16              
17              
18              
19              
20              
21              
22              
23              
24              
25             # ABSTRACT: Determine if a path is an ExtUtils::MakeMaker Tooled source directory
26              
27             our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
28              
29 11     11   2583 use Role::Tiny::With qw( with );
  11         11441  
  11         2474  
30             with 'Path::IsDev::Role::Heuristic', 'Path::IsDev::Role::Matcher::Child::Exists::Any::File';
31              
32              
33              
34              
35              
36              
37              
38              
39              
40 12     12 1 67 sub files { return qw( Makefile.PL ) }
41              
42              
43              
44              
45              
46              
47              
48             sub matches {
49 12     12 1 31 my ( $self, $result_object ) = @_;
50 12 100       44 if ( $self->child_exists_any_file( $result_object, $self->files ) ) {
51 1         25 $result_object->result(1);
52 1         9 return 1;
53             }
54 11         57 return;
55             }
56              
57             1;
58              
59             __END__
60              
61             =pod
62              
63             =encoding UTF-8
64              
65             =head1 NAME
66              
67             Path::IsDev::Heuristic::Tool::MakeMaker - Determine if a path is an ExtUtils::MakeMaker Tooled source directory
68              
69             =head1 VERSION
70              
71             version 1.001002
72              
73             =head1 METHODS
74              
75             =head2 C<files>
76              
77             Files relevant to this heuristic:
78              
79             Makefile.PL
80              
81             =head2 C<matches>
82              
83             Matches if any of the files in C<files> exist as children of the C<path>
84              
85             =begin MetaPOD::JSON v1.1.0
86              
87             {
88             "namespace":"Path::IsDev::Heuristic::Tool::MakeMaker",
89             "interface":"single_class",
90             "does":[
91             "Path::IsDev::Role::Heuristic",
92             "Path::IsDev::Role::Matcher::Child::Exists::Any::File"
93             ]
94             }
95              
96              
97             =end MetaPOD::JSON
98              
99             =head1 AUTHOR
100              
101             Kent Fredric <kentfredric@gmail.com>
102              
103             =head1 COPYRIGHT AND LICENSE
104              
105             This software is copyright (c) 2014 by Kent Fredric <kentfredric@gmail.com>.
106              
107             This is free software; you can redistribute it and/or modify it under
108             the same terms as the Perl 5 programming language system itself.
109              
110             =cut