| blib/lib/JSON/Schema/Generator/Handler/Atom.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 8 | 8 | 100.0 |
| branch | 1 | 2 | 50.0 |
| condition | n/a | ||
| subroutine | 3 | 3 | 100.0 |
| pod | 0 | 1 | 0.0 |
| total | 12 | 14 | 85.7 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package JSON::Schema::Generator::Handler::Atom; | ||||||
| 2 | |||||||
| 3 | 2 | 2 | 9 | use strict; | |||
| 2 | 3 | ||||||
| 2 | 45 | ||||||
| 4 | 2 | 2 | 10 | use warnings; | |||
| 2 | 2 | ||||||
| 2 | 151 | ||||||
| 5 | |||||||
| 6 | sub process { | ||||||
| 7 | 4 | 4 | 0 | 8 | my ($class, $atom_type, $examples, $dispatch) = @_; | ||
| 8 | return +{ | ||||||
| 9 | 4 | 50 | 11 | type => $atom_type->name, | |||
| 10 | ($atom_type->isa('JSON::TypeInference::Type::Unknown') ? () : (example => $examples->[0])), | ||||||
| 11 | }; | ||||||
| 12 | } | ||||||
| 13 | |||||||
| 14 | 1; | ||||||
| 15 |