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   649 use strict;
  1         2  
  1         32  
4 1     1   5 use warnings;
  1         2  
  1         33  
5              
6 1     1   5 use parent qw( CBOR::Free::X::Base );
  1         2  
  1         16  
7              
8 1     1   512 use CBOR::Free::AddOne;
  1         3  
  1         84  
9              
10             sub _new {
11 1     1   257 my ($class, $abs, $offset) = @_;
12              
13 1         4 $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;