blib/lib/JSON/backportPP/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 # This is JSON::backportPP | ||||||
2 | JSON::PP::Boolean; | ||||||
3 | |||||||
4 | 57 | 57 | 310 | use strict; | |||
57 | 99 | ||||||
57 | 5887 | ||||||
5 | require overload; | ||||||
6 | local $^W; | ||||||
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::backportPP::Boolean::VERSION = '4.11'; | ||||||
15 | |||||||
16 | 1; | ||||||
17 | |||||||
18 | __END__ |