blib/lib/MojoX/Renderer/JSON/XS.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 6 | 6 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 22 | 22 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MojoX::Renderer::JSON::XS; | ||||||
2 | 4 | 4 | 1164572 | use 5.010; | |||
4 | 15 | ||||||
4 | 149 | ||||||
3 | 4 | 4 | 22 | use strict; | |||
4 | 6 | ||||||
4 | 116 | ||||||
4 | 4 | 4 | 30 | use warnings; | |||
4 | 7 | ||||||
4 | 384 | ||||||
5 | our $VERSION = "0.03"; | ||||||
6 | |||||||
7 | 4 | 4 | 1072 | use JSON::XS; | |||
4 | 6357 | ||||||
4 | 776 | ||||||
8 | |||||||
9 | our $JSON = JSON::XS->new->utf8->convert_blessed; | ||||||
10 | |||||||
11 | sub build { | ||||||
12 | 3 | 3 | 1 | 130119 | sub { ${$_[2]} = $JSON->encode($_[3]{json}); }; | ||
3 | 3 | 46 | |||||
3 | 249 | ||||||
13 | } | ||||||
14 | |||||||
15 | 1; | ||||||
16 | |||||||
17 | __END__ |