| blib/lib/Rope/Handles/Bool.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 18 | 18 | 100.0 |
| branch | 2 | 2 | 100.0 |
| condition | n/a | ||
| subroutine | 8 | 8 | 100.0 |
| pod | 5 | 6 | 83.3 |
| total | 33 | 34 | 97.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Rope::Handles::Bool; | ||||||
| 2 | |||||||
| 3 | 2 | 2 | 159608 | use strict; | |||
| 2 | 3 | ||||||
| 2 | 58 | ||||||
| 4 | 2 | 2 | 26 | use warnings; | |||
| 2 | 3 | ||||||
| 2 | 317 | ||||||
| 5 | |||||||
| 6 | sub new { | ||||||
| 7 | 3 | 3 | 0 | 306741 | my ($class, $str) = @_; | ||
| 8 | 3 | 14 | bless \$str, __PACKAGE__; | ||||
| 9 | } | ||||||
| 10 | |||||||
| 11 | 1 | 1 | 1 | 4 | sub set { ${$_[0]} = 1 } | ||
| 1 | 8 | ||||||
| 12 | |||||||
| 13 | 3 | 3 | 1 | 6 | sub unset { ${$_[0]} = 0 } | ||
| 3 | 19 | ||||||
| 14 | |||||||
| 15 | 3 | 100 | 3 | 1 | 6 | sub toggle { ${$_[0]} = ${$_[0]} ? 0 : 1; } | |
| 3 | 14 | ||||||
| 3 | 10 | ||||||
| 16 | |||||||
| 17 | 2 | 2 | 1 | 3 | sub not { !${$_[0]} } | ||
| 2 | 7 | ||||||
| 18 | |||||||
| 19 | 1 | 1 | 1 | 9 | sub clear { $_[0]->unset } | ||
| 20 | |||||||
| 21 | 1; | ||||||
| 22 | |||||||
| 23 | __END__ |