| 1 | package Image::Compare::THRESHOLD_COUNT; | ||||||||||||
| 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::THRESHOLD/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 3 | ▶ | sub setup { | ||||||||||
|
Subroutine
setup: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 9 | 3 | my $self = shift; | |||||||||||
| 10 | 3 | $self->{count} = 0; | |||||||||||
| 11 | } | ||||||||||||
| 12 | |||||||||||||
| 13 | 11 | ▶ | sub accumulate { | ||||||||||
|
Subroutine
accumulate: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 14 | 11 | my $self = shift; | |||||||||||
| 15 | # The superclass returns 0 if it's over the threshold and undef otherwise. | ||||||||||||
| 16 | # Not really optimal return values, but we're kind of cheating by looking | ||||||||||||
| 17 | # at it in this context, so hey. | ||||||||||||
| 18 | 11 | ▶ | if (defined($self->SUPER::accumulate(@_))) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 19 | 4 | $self->{count}++; | |||||||||||
| 20 | } | ||||||||||||
| 21 | # Always continue. | ||||||||||||
| 22 | 11 | return undef; | |||||||||||
| 23 | } | ||||||||||||
| 24 | |||||||||||||
| 25 | 3 | ▶ | sub get_result { | ||||||||||
|
Subroutine
get_result: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 26 | 3 | my $self = shift; | |||||||||||
| 27 | 3 | ▶ | return $self->{count} || 0; | ||||||||||
|
Condition100%2/2
$self->{'count'} || 0
MC/DC100%1/1
$self->{'count'} || 0
$self->{'count'}
Truth table100%2/2
A
A= $self->{'count'}
| |||||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | 8 | 1; | |||||||||||
| 31 | |||||||||||||
| 32 | __END__ | ||||||||||||