Branch Coverage

blib/lib/URI/PackageURL/CLI.pm
Criterion Covered Total %
branch 13 50 26.0


line true false branch
29 0 1 unless &GetOptionsFromArray(\@args, \%options, ("help|h", "man", "version", "download-url", "repository-url", "null|0", "format=s", "json", "yaml", "dumper", "env"))
48 0 1 if defined $options{'man'}
49 0 1 if defined $options{'help'}
51 0 1 if (defined $options{'version'})
58 0 1 unless $purl_string
60 1 0 if defined $options{'json'}
61 0 1 if defined $options{'yaml'}
62 0 1 if defined $options{'dumper'}
63 0 1 if defined $options{'env'}
67 0 1 if ($@)
74 0 1 if ($options{'download-url'})
76 0 0 unless defined $purl_urls->{'download'}
78 0 0 defined $options{'null'} ? :
83 0 1 if ($options{'repository-url'})
85 0 0 unless defined $purl_urls->{'repository'}
87 0 0 $options{'null'} ? :
91 1 0 if ($options{'format'} eq "json")
96 0 0 if ($options{'format'} eq "dumper")
101 0 0 if ($options{'format'} eq "yaml")
103 0 0 if (eval { do { require YAML::XS } })
107 0 0 if (eval { do { require YAML } })
117 0 0 if ($options{'format'} eq "env")
140 0 0 if ($purl_urls)
141 0 0 if (defined $purl_urls->{'download'})
145 0 0 if (defined $purl_urls->{'repository'})