Branch Coverage

blib/lib/Parse/CPAN/Meta.pm
Criterion Covered Total %
branch 30 60 50.0


line true false branch
20 103 68 if ($filename =~ /\.ya?ml$/) { }
61 7 elsif ($filename =~ /\.json$/) { }
33 1 7 if ($string =~ /^---/) { }
6 1 elsif ($string =~ /^\s*\{/) { }
48 1 120 if $@
58 0 76 if $@
63 129 0 if ($ENV{'PERL_CORE'} or not defined $ENV{'PERL_YAML_BACKEND'}) { }
64 0 129 unless _can_load("CPAN::Meta::YAML", "0.011")
70 0 0 unless _can_load($backend)
72 0 0 unless $backend->can("Load")
79 0 77 if ($ENV{'PERL_CORE'})
80 0 0 unless _can_load("JSON::PP", "2.273")
84 2 75 if (my $decoder = $ENV{'CPAN_META_JSON_DECODER'})
85 0 2 unless _can_load($decoder)
87 0 2 unless $decoder->can("decode_json")
95 0 83 if ($ENV{'PERL_CORE'})
96 0 0 unless _can_load("JSON::PP", "2.273")
100 0 83 if (my $backend = $ENV{'CPAN_META_JSON_BACKEND'})
101 0 0 unless _can_load($backend)
103 0 0 unless $backend->can("new")
107 83 0 if (not $ENV{'PERL_JSON_BACKEND'} or $ENV{'PERL_JSON_BACKEND'} eq 'JSON::PP') { }
108 0 83 unless _can_load("JSON::PP", "2.273")
113 0 0 unless _can_load("JSON", "2.5")
122 0 172 unless open my $fh, "<:raw", "$_[0]"
133 183 31 if $INC{$file}
134 0 31 if exists $INC{$file}
135 0 31 unless eval { do { require $file; 1 } }
137 31 0 if (defined $version)
138 0 31 unless eval { do { $module->VERSION($version); 1 } }
154 0 3 if $@