IsDev/Heuristic/Changelog.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 2 / 2 totaltotal 100% 35 / 35 CC 2 SCAR 2.2
CC
2
Cov
100%
matches
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« IsDev/NegativeHeuristic/IsDev/IgnoreFile.pm ↑ Summary IsDev/Heuristic/DevDirMarker.pm »
1 8 ▶use 5.008; # utf8
Subroutine BEGIN: called CC=1 SCAR=0.0
2 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 package Path::IsDev::Heuristic::Changelog;
7  
8 8 our $VERSION = '1.001003';
9  
10 # ABSTRACT: Determine if a path contains a Changelog (or similar)
11  
12 8 our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26 8 ▶use Role::Tiny::With qw( with );
Subroutine BEGIN: called CC=1 SCAR=0.0
27 8 with 'Path::IsDev::Role::Heuristic', 'Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File';
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40 9 ▶sub basename_regexp {
Subroutine basename_regexp: called CC=1 SCAR=0.0
Pod documented
41 ## no critic (RegularExpressions::RequireLineBoundaryMatching)
42 9 return qr/\AChange(s|log)(|[.][^.\s]+)\z/isx;
43 }
44  
45  
46  
47  
48  
49  
50  
51 9 ▶sub matches {
Subroutine matches: called CC=2 SCAR=6.9
Pod documented
52 9 my ( $self, $result_object ) = @_;
53 9 ▶ if ( $self->child_basename_matchregexp_file( $result_object, $self->basename_regexp ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->child_basename_matchregexp_file($result_object, $self->basename_regexp)) 3 6 9
54 3 $result_object->result(1);
55 3 return 1;
56 }
57 6 return;
58 }
59  
60 8 1;
61  
62 __END__
« IsDev/NegativeHeuristic/IsDev/IgnoreFile.pm ↑ Summary IsDev/Heuristic/DevDirMarker.pm »