blib/lib/CBOR/Free/X/InvalidUTF8.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::InvalidUTF8; | ||||||
2 | |||||||
3 | 2 | 2 | 1417 | use strict; | |||
2 | 4 | ||||||
2 | 79 | ||||||
4 | 2 | 2 | 11 | use warnings; | |||
2 | 3 | ||||||
2 | 81 | ||||||
5 | |||||||
6 | 2 | 2 | 18 | use parent qw( CBOR::Free::X::Base ); | |||
2 | 5 | ||||||
2 | 14 | ||||||
7 | |||||||
8 | 2 | 2 | 655 | use Text::Control (); | |||
2 | 338 | ||||||
2 | 201 | ||||||
9 | |||||||
10 | sub _new { | ||||||
11 | 2 | 2 | 412 | my ($class, $bin) = @_; | |||
12 | |||||||
13 | 2 | 6 | $bin = Text::Control::to_hex($bin); | ||||
14 | |||||||
15 | 2 | 95 | return $class->SUPER::_new("Received an invalid UTF-8 string: “$bin”"); | ||||
16 | } | ||||||
17 | |||||||
18 | 1; |