Branch Coverage

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


line true false branch
19 103 46 if ($filename =~ /\.ya?ml$/) { }
39 7 elsif ($filename =~ /\.json$/) { }
32 1 7 if ($string =~ /^---/) { }
6 1 elsif ($string =~ /^\s*\{/) { }
47 1 120 if $@
57 0 54 if $@
62 129 0 if (not defined $ENV{'PERL_YAML_BACKEND'}) { }
63 0 129 unless _can_load('CPAN::Meta::YAML', 0.011)
69 0 0 unless _can_load($backend)
71 0 0 unless $backend->can('Load')
78 2 53 if (my $decoder = $ENV{'CPAN_META_JSON_DECODER'})
79 0 2 unless _can_load($decoder)
81 0 2 unless $decoder->can('decode_json')
89 0 61 if (my $backend = $ENV{'CPAN_META_JSON_BACKEND'})
90 0 0 unless _can_load($backend)
92 0 0 unless $backend->can('new')
96 61 0 if (not $ENV{'PERL_JSON_BACKEND'} or $ENV{'PERL_JSON_BACKEND'} eq 'JSON::PP') { }
97 0 61 unless _can_load('JSON::PP', 2.273)
102 0 0 unless _can_load('JSON', 2.5)
111 0 150 unless open my $fh, '<:raw', "$_[0]"
122 183 9 if $INC{$file}
123 0 9 if exists $INC{$file}
124 0 9 unless eval { do { require $file; 1 } }
126 9 0 if (defined $version)
127 0 9 unless eval { do { $module->VERSION($version); 1 } }
143 0 3 if $@