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 | 736 | use strict; | |||
1 | 2 | ||||||
1 | 23 | ||||||
3 | 1 | 1 | 4 | use warnings; | |||
1 | 2 | ||||||
1 | 28 | ||||||
4 | 1 | 1 | 686 | use parent qw(Mojolicious::Plugin); | |||
1 | 288 | ||||||
1 | 6 | ||||||
5 | |||||||
6 | 1 | 1 | 548 | use MojoX::Renderer::JSON::XS; | |||
1 | 2 | ||||||
1 | 63 | ||||||
7 | |||||||
8 | sub register { | ||||||
9 | 1 | 1 | 1 | 40 | my ($self, $app, $args) = @_; | ||
10 | 1 | 6 | $app->renderer->add_handler( | ||||
11 | json => MojoX::Renderer::JSON::XS->build, | ||||||
12 | ); | ||||||
13 | } | ||||||
14 | |||||||
15 | 1; | ||||||
16 | |||||||
17 | __END__ |