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 | 590 | use strict; | |||
1 | 2 | ||||||
1 | 38 | ||||||
4 | 1 | 1 | 3 | use warnings; | |||
1 | 1 | ||||||
1 | 76 | ||||||
5 | |||||||
6 | our $VERSION = '0.21'; | ||||||
7 | |||||||
8 | sub import { | ||||||
9 | 1 | 1 | 7 | require Math::Int128; | |||
10 | 1 | 2 | Math::Int128::_set_may_die_on_overflow(1); | ||||
11 | 1 | 1538 | $^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__ |