blib/lib/CatalystX/RequestModel/Utils/InvalidJSON.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 6 | 6 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 0 | 2 | 0.0 |
total | 9 | 11 | 81.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package CatalystX::RequestModel::Utils::InvalidJSON; | ||||||
2 | |||||||
3 | 6 | 6 | 48 | use Moose; | |||
6 | 18 | ||||||
6 | 49 | ||||||
4 | with 'CatalystX::Utils::DoesHttpException'; | ||||||
5 | |||||||
6 | has 'parsing_error' => (is=>'ro', required=>1); | ||||||
7 | |||||||
8 | 1 | 1 | 0 | 1374 | sub status_code { 400 } | ||
9 | 2 | 2 | 0 | 319 | sub error { "JSON decode error ': @{[ $_[0]->parsing_error]}" } | ||
2 | 79 | ||||||
10 | |||||||
11 | __PACKAGE__->meta->make_immutable; |