blib/lib/App/Ack/Filter/IsPath.pm

filter: Statementstmt 72.7% 16 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 60.0% 3 / 5 totaltotal 69.4% 25 / 36 CC 1 SCAR 2.9
CC
1
Cov
73%
filter
2.0
inspect
2.0
to_string
2.0
CRAP 1.3
« blib/lib/App/Ack/Filter.pm ↑ Summary blib/lib/App/Ack/ConfigDefault.pm »
1 package App::Ack::Filter::IsPath;
2  
3 =head1 NAME
4  
5 App::Ack::Filter::IsPath
6  
7 =head1 DESCRIPTION
8  
9 Filters based on path.
10  
11 =cut
12  
13 582 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 582 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 582 ▶use parent 'App::Ack::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 582 ▶use App::Ack::Filter::IsPathGroup ();
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 10892 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
20 10892 my ( $class, $filename ) = @_;
21  
22 10892 return bless {
23 filename => $filename,
24 groupname => 'IsPathGroup',
25 }, $class;
26 }
27  
28 404 ▶sub create_group {
Subroutine create_group: called CC=1 SCAR=0.0
Pod undocumented
29 404 return App::Ack::Filter::IsPathGroup->new();
30 }
31  
32 0 ▶sub filter {
Subroutine filter: not called CC=1 SCAR=6.9
Pod documented
33 0 my ( $self, $file ) = @_;
34  
35 0 return $file->name eq $self->{filename};
36 }
37  
38 0 ▶sub inspect {
Subroutine inspect: not called CC=1 SCAR=6.9
Pod documented
39 0 my ( $self ) = @_;
40  
41 0 return ref($self) . ' - ' . $self->{filename};
42 }
43  
44 0 ▶sub to_string {
Subroutine to_string: not called CC=1 SCAR=6.9
Pod documented
45 0 my ( $self ) = @_;
46  
47 0 return $self->{filename};
48 }
49  
50 582 1;
« blib/lib/App/Ack/Filter.pm ↑ Summary blib/lib/App/Ack/ConfigDefault.pm »