| 1 | package CBOR::Free::X::CannotDecode64Bit; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use parent qw( CBOR::Free::X::Base ); | ||
| 7 | |||
| 8 | sub _new { | ||
| 9 | my ($class, $numbin, $offset) = @_; | ||
| 10 | |||
| 11 | my $numhex = sprintf( | ||
| 12 | '%02x%02x_%02x%02x_%02x%02x_%02x%02x', | ||
| 13 | unpack( 'C*', $numbin ), | ||
| 14 | ); | ||
| 15 | |||
| 16 | return $class->SUPER::_new( sprintf('The CBOR buffer contains a 64-bit number (0x%s) at offset %d that this system cannot decode.', $numhex, $offset) ) | ||
| 17 | } | ||
| 18 | |||
| 19 | 1; |