| blib/lib/Image/Caa/DitherRandom.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 12 | 12 | 100.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 6 | 6 | 100.0 |
| pod | 0 | 4 | 0.0 |
| total | 18 | 22 | 81.8 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Image::Caa::DitherRandom; | ||||||
| 2 | |||||||
| 3 | 2 | 2 | 13 | use strict; | |||
| 2 | 3 | ||||||
| 2 | 82 | ||||||
| 4 | 2 | 2 | 13 | use warnings; | |||
| 2 | 4 | ||||||
| 2 | 412 | ||||||
| 5 | |||||||
| 6 | sub new { | ||||||
| 7 | 2 | 2 | 0 | 6 | my ($class, $args) = @_; | ||
| 8 | |||||||
| 9 | 2 | 7 | my $self = bless {}, $class; | ||||
| 10 | |||||||
| 11 | 2 | 16 | return $self; | ||||
| 12 | } | ||||||
| 13 | |||||||
| 14 | sub init { | ||||||
| 15 | 2 | 2 | 0 | 17 | srand(time() ^ ($$ + ($$ << 15))); | ||
| 16 | } | ||||||
| 17 | |||||||
| 18 | sub get { | ||||||
| 19 | 16 | 16 | 0 | 53 | return int(rand(0xff)); | ||
| 20 | } | ||||||
| 21 | |||||||
| 22 | 4 | 4 | 0 | 18 | sub increment { | ||
| 23 | } | ||||||
| 24 | |||||||
| 25 | |||||||
| 26 | 1; |