File Coverage

blib/lib/Math/Int64/die_on_overflow.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1             package Math::Int64::die_on_overflow;
2              
3 1     1   677 use strict;
  1         2  
  1         48  
4 1     1   6 use warnings;
  1         2  
  1         56  
5              
6 1     1   6 use Math::Int64 ();
  1         2  
  1         136  
7              
8             sub import {
9 1     1   14 require Math::Int64;
10 1         5 Math::Int64::_set_may_die_on_overflow(1);
11 1         6 $^H{'Math::Int64::die_on_overflow'} = 1;
12 1         4 goto &Math::Int64::_check_pragma_compatibility;
13             }
14              
15              
16             sub unimport {
17 1     1   4999 undef $^H{'Math::Int64::die_on_overflow'}
18             }
19              
20             1;
21              
22             # ABSTRACT: catch overflows when using Math::Int64
23              
24             __END__