blib/lib/JSON/PP/Boolean.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 3 | 9 | 33.3 |
branch | n/a | ||
condition | n/a | ||
subroutine | 1 | 4 | 25.0 |
pod | n/a | ||
total | 4 | 13 | 30.7 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package JSON::PP::Boolean; | ||||||
2 | |||||||
3 | 64 | 64 | 447 | use strict; | |||
64 | 122 | ||||||
64 | 10313 | ||||||
4 | require overload; | ||||||
5 | local $^W; | ||||||
6 | overload::unimport('overload', qw(0+ ++ -- fallback)); | ||||||
7 | overload::import('overload', | ||||||
8 | 0 | 0 | "0+" => sub { ${$_[0]} }, | ||||
0 | |||||||
9 | 0 | 0 | "++" => sub { $_[0] = ${$_[0]} + 1 }, | ||||
0 | |||||||
10 | 0 | 0 | "--" => sub { $_[0] = ${$_[0]} - 1 }, | ||||
0 | |||||||
11 | fallback => 1, | ||||||
12 | ); | ||||||
13 | |||||||
14 | $JSON::PP::Boolean::VERSION = '4.15'; | ||||||
15 | |||||||
16 | 1; | ||||||
17 | |||||||
18 | __END__ |