blib/lib/Mojolicious/Plugin/JSON/XS.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 14 | 14 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 20 | 20 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Mojolicious::Plugin::JSON::XS; | ||||||
2 | 1 | 1 | 1110 | use strict; | |||
1 | 2 | ||||||
1 | 39 | ||||||
3 | 1 | 1 | 5 | use warnings; | |||
1 | 2 | ||||||
1 | 34 | ||||||
4 | 1 | 1 | 853 | use parent qw(Mojolicious::Plugin); | |||
1 | 342 | ||||||
1 | 7 | ||||||
5 | |||||||
6 | 1 | 1 | 695 | use MojoX::Renderer::JSON::XS; | |||
1 | 3 | ||||||
1 | 79 | ||||||
7 | |||||||
8 | sub register { | ||||||
9 | 1 | 1 | 1 | 45 | my ($self, $app, $args) = @_; | ||
10 | 1 | 27 | $app->renderer->add_handler( | ||||
11 | json => MojoX::Renderer::JSON::XS->build, | ||||||
12 | ); | ||||||
13 | } | ||||||
14 | |||||||
15 | 1; | ||||||
16 | |||||||
17 | __END__ |