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
|
|
1385
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
55
|
|
14
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
45
|
|
15
|
2
|
|
|
2
|
|
7
|
use parent 'App::Ack::Filter'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
11
|
|
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
|
125
|
use File::Spec 3.00 (); |
|
2
|
|
|
|
|
26
|
|
|
2
|
|
|
|
|
32
|
|
18
|
2
|
|
|
2
|
|
8
|
use App::Ack::Filter::IsGroup (); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
378
|
|
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
|
|
8
|
App::Ack::Filter->register_filter(is => __PACKAGE__); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |