blib/lib/Math/Int128/die_on_overflow.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 10 | 90.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 4 | 75.0 |
pod | n/a | ||
total | 12 | 14 | 85.7 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Math::Int128::die_on_overflow; | ||||||
2 | |||||||
3 | 1 | 1 | 434 | use strict; | |||
1 | 2 | ||||||
1 | 35 | ||||||
4 | 1 | 1 | 4 | use warnings; | |||
1 | 1 | ||||||
1 | 67 | ||||||
5 | |||||||
6 | our $VERSION = '0.22'; | ||||||
7 | |||||||
8 | sub import { | ||||||
9 | 1 | 1 | 6 | require Math::Int128; | |||
10 | 1 | 3 | Math::Int128::_set_may_die_on_overflow(1); | ||||
11 | 1 | 1097 | $^H{'Math::Int128::die_on_overflow'} = 1 | ||||
12 | } | ||||||
13 | |||||||
14 | |||||||
15 | sub unimport { | ||||||
16 | 0 | 0 | undef $^H{'Math::Int128::die_on_overflow'} | ||||
17 | } | ||||||
18 | |||||||
19 | 1; | ||||||
20 | |||||||
21 | __END__ |