line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Ack::Filter::IsPathGroup; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
App::Ack::Filter::IsPathGroup |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
The App::Ack::Filter::IsPathGroup class optimizes multiple ::IsPath |
10
|
|
|
|
|
|
|
calls into one container. See App::Ack::Filter::IsGroup for details. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
56
|
|
15
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
82
|
|
16
|
2
|
|
|
2
|
|
15
|
use parent 'App::Ack::Filter'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
17
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
0
|
|
|
0
|
0
|
|
my ( $class ) = @_; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return bless { |
22
|
|
|
|
|
|
|
data => {}, |
23
|
|
|
|
|
|
|
}, $class; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub add { |
27
|
0
|
|
|
0
|
0
|
|
my ( $self, $filter ) = @_; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
$self->{data}->{ $filter->{filename} } = 1; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
return; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub filter { |
35
|
0
|
|
|
0
|
1
|
|
my ( $self, $file ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return exists $self->{data}->{$file->name}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub inspect { |
41
|
0
|
|
|
0
|
1
|
|
my ( $self ) = @_; |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
return ref($self) . " - $self"; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub to_string { |
47
|
0
|
|
|
0
|
1
|
|
my ( $self ) = @_; |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
return join(' ', keys %{$self->{data}}); |
|
0
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |