blib/lib/MooX/TO_JSON.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 23 | 28 | 82.1 |
line | true | false | branch |
---|---|---|---|
21 | 1 | 3 | if ($rule->{'omit_if_empty'}) |
22 | 1 | 0 | unless $self->${\$rule->{'predicate'};} |
26 | 2 | 1 | if (my $type = $rule->{'type'}) |
27 | 0 | 2 | if $type == 1 |
28 | 1 | 1 | if $type == 2 |
29 | 1 | 0 | $value ? : |
1 | 1 | if $type == 3 | |
36 | 1 | 0 | if $self->can('modify_json') |
50 | 1 | 4 | unless $json |
55 | 4 | 0 | unless (ref $json) |
56 | 1 | 3 | $json eq '1' ? : |
60 | 2 | 2 | if (my $found_type = $types{$extra1 or ''}) |
66 | 1 | 3 | if ($extra1 || '') eq 'omit_if_empty' or ($extra2 || '') eq 'omit_if_empty' |
68 | 1 | 3 | $mapped_field ? : |