Branch Coverage

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


line true false branch
20 103 46 if ($filename =~ /\.ya?ml$/) { }
39 7 elsif ($filename =~ /\.json$/) { }
33 1 7 if ($string =~ /^---/) { }
6 1 elsif ($string =~ /^\s*\{/) { }
48 1 120 if $@
58 0 54 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 55 if ($ENV{'PERL_CORE'})
80 0 0 unless _can_load('JSON::PP', 2.273)
84 2 53 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 61 if ($ENV{'PERL_CORE'})
96 0 0 unless _can_load('JSON::PP', 2.273)
100 0 61 if (my $backend = $ENV{'CPAN_META_JSON_BACKEND'})
101 0 0 unless _can_load($backend)
103 0 0 unless $backend->can('new')
107 61 0 if (not $ENV{'PERL_JSON_BACKEND'} or $ENV{'PERL_JSON_BACKEND'} eq 'JSON::PP') { }
108 0 61 unless _can_load('JSON::PP', 2.273)
113 0 0 unless _can_load('JSON', 2.5)
122 0 150 unless open my $fh, '<:raw', "$_[0]"
133 183 9 if $INC{$file}
134 0 9 if exists $INC{$file}
135 0 9 unless eval { do { require $file; 1 } }
137 9 0 if (defined $version)
138 0 9 unless eval { do { $module->VERSION($version); 1 } }
154 0 3 if $@