Branch Coverage

bin/pjstruct
Criterion Covered Total %
branch 62 92 67.3


line true false branch
47 0 12 unless &GetOptions("h|help", \$opts{'help'}, "V|version", \$opts{'version'})
49 1 11 if ($opts{'version'})
57 1 9 if ($opts{'help'} or $command eq "help" or $command eq "")
58 1 1 $command eq 'help' ? :
70 9 0 if (my $handler = $commands{$command}) { }
81 1 1 unless (defined $topic)
93 1 0 if (my $handler = $topics{$topic}) { }
202 0 7 unless &GetOptions("s|schema=s", \$opts{'schema'}, "f|format=s", \$opts{'format'}, "q|quiet", \$opts{'quiet'}, "v|verbose", \$opts{'verbose'}, "h|help", \$opts{'help'})
204 0 7 if ($opts{'help'})
209 1 6 unless ($opts{'schema'})
215 0 6 unless (@ARGV)
222 0 6 unless ($opts{'format'} =~ /^(text|json|tap)$/u)
230 0 6 unless (defined $schema)
238 0 6 unless ($schema_result->is_valid)
254 1 5 unless (defined $instance)
271 4 1 $valid ? :
277 1 4 unless $valid
283 1 4 $has_invalid ? :
1 5 $has_error ? :
300 0 2 unless &GetOptions("f|format=s", \$opts{'format'}, "q|quiet", \$opts{'quiet'}, "v|verbose", \$opts{'verbose'}, "h|help", \$opts{'help'})
302 0 2 if ($opts{'help'})
307 0 2 unless (@ARGV)
314 0 2 unless ($opts{'format'} =~ /^(text|json|tap)$/u)
329 0 2 unless (defined $schema)
346 1 1 $valid ? :
352 1 1 unless $valid
358 1 1 $has_invalid ? :
0 2 $has_error ? :
364 0 14 if ($file eq '-') { }
369 1 13 unless (-f $file)
373 0 13 unless open my $fh, "<:encoding(UTF-8)", $file
384 0 13 if ($@)
397 0 5 $location && $location->is_known ? :
2 3 defined $error->schema_path ? :
409 1 7 if $opts->{'quiet'}
413 1 6 if ($format eq 'json') { }
1 5 elsif ($format eq 'tap') { }
425 0 0 if $opts->{'quiet'}
429 0 0 if ($format eq 'json') { }
0 0 elsif ($format eq 'tap') { }
451 1 4 if ($result->{'error'}) { }
2 2 elsif ($result->{'valid'}) { }
463 0 0 if ($verbose and $error->{'line'})
476 1 0 if (@$results == 1) { }
493 0 1 if ($result->{'error'}) { }
1 0 elsif ($result->{'valid'}) { }