| 1 | package CBOR::Free::X::NegativeIntTooLow; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | ▶ | use parent qw( CBOR::Free::X::Base ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | ▶ | use CBOR::Free::AddOne; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | ▶ | sub _new { |
|
Subroutine
_new: called CC=1 SCAR=0.0
| |||
| 11 | 1 | my ($class, $abs, $offset) = @_; | |
| 12 | |||
| 13 | 1 | $abs = CBOR::Free::AddOne::to_nonnegative_integer($abs); | |
| 14 | |||
| 15 | 1 | 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 | 1; | |