File Coverage

blib/lib/CBOR/Free/X/NegativeIntTooLow.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package CBOR::Free::X::NegativeIntTooLow;
2              
3 1     1   688 use strict;
  1         3  
  1         34  
4 1     1   5 use warnings;
  1         1  
  1         34  
5              
6 1     1   5 use parent qw( CBOR::Free::X::Base );
  1         2  
  1         9  
7              
8 1     1   499 use CBOR::Free::AddOne;
  1         3  
  1         87  
9              
10             sub _new {
11 1     1   262 my ($class, $abs, $offset) = @_;
12              
13 1         3 $abs = CBOR::Free::AddOne::to_nonnegative_integer($abs);
14              
15 1         11 return $class->SUPER::_new( sprintf('The CBOR buffer contains a negative number (-%s) at offset %u that is too low for this build of Perl to understand.', $abs, $offset) )
16             }
17              
18             1;