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 | 806 | use strict; | |||
1 | 2 | ||||||
1 | 50 | ||||||
4 | 1 | 1 | 7 | use warnings; | |||
1 | 1 | ||||||
1 | 131 | ||||||
5 | |||||||
6 | our $VERSION = '0.20'; | ||||||
7 | |||||||
8 | sub import { | ||||||
9 | 1 | 1 | 14 | require Math::Int128; | |||
10 | 1 | 4 | Math::Int128::_set_may_die_on_overflow(1); | ||||
11 | 1 | 1914 | $^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__ |