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