blib/lib/JSON/Schema/Generator/Handler/Array.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 8 | 8 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 11 | 12 | 91.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package JSON::Schema::Generator::Handler::Array; | ||||||
2 | |||||||
3 | 2 | 2 | 9 | use strict; | |||
2 | 4 | ||||||
2 | 47 | ||||||
4 | 2 | 2 | 11 | use warnings; | |||
2 | 3 | ||||||
2 | 157 | ||||||
5 | |||||||
6 | sub process { | ||||||
7 | 1 | 1 | 0 | 2 | my ($class, $array_type, $examples, $dispatch) = @_; | ||
8 | return +{ | ||||||
9 | 1 | 9 | type => $array_type->name, | ||||
10 | items => $dispatch->($array_type->element_type, $examples->[0]), | ||||||
11 | }; | ||||||
12 | } | ||||||
13 | |||||||
14 | 1; | ||||||
15 |