Compare/THRESHOLD.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 3 / 3 totaltotal 100% 32 / 32 CC 2 SCAR 2.5
CC
2
Cov
100%
accumulate
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Compare/EXACT.pm ↑ Summary
1 package Image::Compare::THRESHOLD;
2  
3 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 8 ▶use base qw/Image::Compare::Comparator/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 ▶sub setup {
Subroutine setup: called CC=1 SCAR=0.0
Pod documented
9 5 my $self = shift;
10 5 $self->SUPER::setup(@_);
11 # Default to true, we will return 0 if we run into trouble later.
12 5 $self->{result} = 1;
13 }
14  
15 24 ▶sub accumulate {
Subroutine accumulate: called CC=2 SCAR=6.9
Pod documented
16 24 my $self = shift;
17 24 my $diff = $self->color_distance(@_);
18 24 ▶ if ($diff > $self->{args}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($diff > $self->{"args"}) 6 18 24
19 6 $self->{result} = 0;
20 6 return 1;
21 }
22 18 return undef;
23 }
24  
25 5 ▶sub get_result {
Subroutine get_result: called CC=1 SCAR=0.0
Pod documented
26 5 my $self = shift;
27 5 return $self->{result};
28 }
29  
30 8 1;
31  
32 __END__
« Compare/EXACT.pm ↑ Summary