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   452 use strict;
  1         2  
  1         25  
4 1     1   4 use warnings;
  1         2  
  1         23  
5              
6 1     1   3 use parent qw( CBOR::Free::X::Base );
  1         2  
  1         4  
7              
8 1     1   373 use CBOR::Free::AddOne;
  1         2  
  1         72  
9              
10             sub _new {
11 1     1   204 my ($class, $abs, $offset) = @_;
12              
13 1         3 $abs = CBOR::Free::AddOne::to_nonnegative_integer($abs);
14              
15 1         9 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;