blib/lib/Math/Int64/die_on_overflow.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 10 | 10 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | n/a | ||
total | 14 | 14 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Math::Int64::die_on_overflow; | ||||||
2 | |||||||
3 | 1 | 1 | 314 | use strict; | |||
1 | 1 | ||||||
1 | 30 | ||||||
4 | 1 | 1 | 3 | use warnings; | |||
1 | 1 | ||||||
1 | 66 | ||||||
5 | |||||||
6 | sub import { | ||||||
7 | 1 | 1 | 8 | require Math::Int64; | |||
8 | 1 | 2 | Math::Int64::_set_may_die_on_overflow(1); | ||||
9 | 1 | 1127 | $^H{'Math::Int64::die_on_overflow'} = 1 | ||||
10 | } | ||||||
11 | |||||||
12 | |||||||
13 | sub unimport { | ||||||
14 | 1 | 1 | 2065 | undef $^H{'Math::Int64::die_on_overflow'} | |||
15 | } | ||||||
16 | |||||||
17 | 1; | ||||||
18 | |||||||
19 | # ABSTRACT: catch overflows when using Math::Int64 | ||||||
20 | |||||||
21 | __END__ |