| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Image::Compare::THRESHOLD_COUNT; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 8 |  |  | 8 |  | 23 | use warnings; | 
|  | 8 |  |  |  |  | 7 |  | 
|  | 8 |  |  |  |  | 196 |  | 
| 4 | 8 |  |  | 8 |  | 24 | use strict; | 
|  | 8 |  |  |  |  | 9 |  | 
|  | 8 |  |  |  |  | 127 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 8 |  |  | 8 |  | 22 | use base qw/Image::Compare::THRESHOLD/; | 
|  | 8 |  |  |  |  | 8 |  | 
|  | 8 |  |  |  |  | 1106 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | sub setup { | 
| 9 | 3 |  |  | 3 | 1 | 6 | my $self = shift; | 
| 10 | 3 |  |  |  |  | 7 | $self->{count} = 0; | 
| 11 |  |  |  |  |  |  | } | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | sub accumulate { | 
| 14 | 11 |  |  | 11 | 1 | 8 | 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 | 100 |  |  |  | 29 | if (defined($self->SUPER::accumulate(@_))) { | 
| 19 | 4 |  |  |  |  | 3 | $self->{count}++; | 
| 20 |  |  |  |  |  |  | } | 
| 21 |  |  |  |  |  |  | # Always continue. | 
| 22 | 11 |  |  |  |  | 28 | return undef; | 
| 23 |  |  |  |  |  |  | } | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | sub get_result { | 
| 26 | 3 |  |  | 3 | 1 | 2 | my $self = shift; | 
| 27 | 3 |  | 100 |  |  | 19 | return $self->{count} || 0; | 
| 28 |  |  |  |  |  |  | } | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | 1; | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | __END__ |