File Coverage

blib/lib/Ambassador/API/V2/Role/HasJSON.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Ambassador::API::V2::Role::HasJSON;
2              
3 3     3   1326 use Moo::Role;
  3         6  
  3         18  
4 3     3   1879 use JSON::MaybeXS;
  3         13463  
  3         283  
5              
6             our $VERSION = '0.001';
7              
8             # Configure and cache the JSON object
9             has json => (
10             is => 'ro',
11             default => sub {
12             return JSON->new->utf8(1);
13             }
14             );
15              
16             1;
17              
18             __END__