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

filter: Statementstmt 75.0% 15 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 80.0% 4 / 5 totaltotal 75.7% 25 / 33 CC 1 SCAR 2.2
CC
1
Cov
75%
filter
2.0
inspect
2.0
BEGIN
1.0
CRAP 1.2
« blib/lib/App/Ack/Filter/IsPathGroup.pm ↑ Summary blib/lib/App/Ack/Filter/FirstLineMatch.pm »
1 package App::Ack::Filter::Inverse;
2  
3 =head1 NAME
4  
5 App::Ack::Filter::Inverse
6  
7 =head1 DESCRIPTION
8  
9 The filter class that inverts another filter.
10  
11 =cut
12  
13  
14 588 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 588 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 588 ▶use parent 'App::Ack::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 25 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
19 25 my ( $class, $filter ) = @_;
20  
21 25 return bless {
22 filter => $filter,
23 }, $class;
24 }
25  
26 0 ▶sub filter {
Subroutine filter: not called CC=1 SCAR=6.9
Pod documented
27 0 my ( $self, $file ) = @_;
28  
29 0 return !$self->{filter}->filter( $file );
30 }
31  
32 24 ▶sub invert {
Subroutine invert: called CC=1 SCAR=0.0
Pod documented
33 24 my $self = shift;
34  
35 24 return $self->{'filter'};
36 }
37  
38 66 ▶sub is_inverted {
Subroutine is_inverted: called CC=1 SCAR=0.0
Pod documented
39 66 return 1;
40 }
41  
42 0 ▶sub inspect {
Subroutine inspect: not called CC=1 SCAR=6.9
Pod documented
43 0 my ( $self ) = @_;
44  
45 0 my $filter = $self->{'filter'};
46  
47 0 return "!$filter";
48 }
49  
50 588 1;
« blib/lib/App/Ack/Filter/IsPathGroup.pm ↑ Summary blib/lib/App/Ack/Filter/FirstLineMatch.pm »