Branch Coverage

blib/lib/Parse/CPAN/Meta.pm
Criterion Covered Total %
branch 28 52 53.8


line true false branch
19 1 6 if ($filename =~ /\.ya?ml$/) { }
2 4 elsif ($filename =~ /\.json$/) { }
32 1 3 if ($string =~ /^---/) { }
2 1 elsif ($string =~ /^\s*\{/) { }
47 1 4 if $@
56 0 8 if $@
61 11 0 if (not defined $ENV{'PERL_YAML_BACKEND'}) { }
62 0 11 unless _can_load('CPAN::Meta::YAML', 0.011)
68 0 0 unless _can_load($backend)
70 0 0 unless $backend->can('Load')
77 2 7 if (my $decoder = $ENV{'CPAN_META_JSON_DECODER'})
78 0 2 unless _can_load($decoder)
80 0 2 unless $decoder->can('decode_json')
88 0 14 if (my $backend = $ENV{'CPAN_META_JSON_BACKEND'})
89 0 0 unless _can_load($backend)
91 0 0 unless $backend->can('new')
95 14 0 if (not $ENV{'PERL_JSON_BACKEND'} or $ENV{'PERL_JSON_BACKEND'} eq 'JSON::PP') { }
96 0 14 unless _can_load('JSON::PP', 2.273)
101 0 0 unless _can_load('JSON', 2.5)
110 0 8 unless open my $fh, '<:raw', "$_[0]"
121 25 2 if $INC{$file}
122 0 2 if exists $INC{$file}
123 0 2 unless eval { do { require $file; 1 } }
125 2 0 if (defined $version)
126 0 2 unless eval { do { $module->VERSION($version); 1 } }
142 0 3 if $@