line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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
|
6
|
|
|
6
|
|
37
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
186
|
|
14
|
6
|
|
|
6
|
|
28
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
152
|
|
15
|
6
|
|
|
6
|
|
29
|
use parent 'App::Ack::Filter'; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
30
|
|
16
|
|
|
|
|
|
|
|
17
|
6
|
|
|
6
|
|
2806
|
use App::Ack::Filter::IsPathGroup (); |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
990
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
0
|
|
|
0
|
0
|
|
my ( $class, $filename ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
return bless { |
23
|
|
|
|
|
|
|
filename => $filename, |
24
|
|
|
|
|
|
|
groupname => 'IsPathGroup', |
25
|
|
|
|
|
|
|
}, $class; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub create_group { |
29
|
0
|
|
|
0
|
0
|
|
return App::Ack::Filter::IsPathGroup->new(); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub filter { |
33
|
0
|
|
|
0
|
1
|
|
my ( $self, $file ) = @_; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return $file->name eq $self->{filename}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub inspect { |
39
|
0
|
|
|
0
|
1
|
|
my ( $self ) = @_; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
return ref($self) . ' - ' . $self->{filename}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub to_string { |
45
|
0
|
|
|
0
|
1
|
|
my ( $self ) = @_; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return $self->{filename}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |