line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Ack::Filter::Is; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
App::Ack::Filter::Is |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Filters based on exact filename match. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
1759
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
56
|
|
14
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
55
|
|
15
|
2
|
|
|
2
|
|
10
|
use parent 'App::Ack::Filter'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
9
|
|
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
|
149
|
use File::Spec 3.00 (); |
|
2
|
|
|
|
|
38
|
|
|
2
|
|
|
|
|
39
|
|
18
|
2
|
|
|
2
|
|
26
|
use App::Ack::Filter::IsGroup (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
515
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
0
|
|
|
0
|
0
|
|
my ( $class, $filename ) = @_; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return bless { |
24
|
|
|
|
|
|
|
filename => $filename, |
25
|
|
|
|
|
|
|
groupname => 'IsGroup', |
26
|
|
|
|
|
|
|
}, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub create_group { |
30
|
0
|
|
|
0
|
0
|
|
return App::Ack::Filter::IsGroup->new(); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub filter { |
34
|
0
|
|
|
0
|
1
|
|
my ( $self, $file ) = @_; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return (File::Spec->splitpath($file->name))[2] eq $self->{filename}; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub inspect { |
40
|
0
|
|
|
0
|
1
|
|
my ( $self ) = @_; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
return ref($self) . ' - ' . $self->{filename}; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub to_string { |
46
|
0
|
|
|
0
|
1
|
|
my ( $self ) = @_; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $self->{filename}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
BEGIN { |
52
|
2
|
|
|
2
|
|
13
|
App::Ack::Filter->register_filter(is => __PACKAGE__); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |