Branch Coverage

blib/lib/JSON/Slurper.pm
Criterion Covered Total %
branch 9 48 18.7


line true false branch
22 1 0 eval { do { require Cpanel::JSON::XS; 'Cpanel::JSON::XS'->VERSION('4.09'); 1 } } ? :
0 1 $ENV{'JSON_SLURPER_NO_JSON_XS'} ? :
31 1 0 if $e_class eq 'Cpanel::JSON::XS'
39 10 2 if (exists $args{'encoder'}) { }
47 1 4 if %args
55 0 0 exists $_[3]{'encoder'} ? :
60 0 0 if (defined $encoder) { }
0 0 elsif ($imported_encoder) { }
69 0 0 unless (defined wantarray)
74 0 0 if ($auto_ext and not +(File::Basename::fileparse($filename, qr/\.[^.]*/mx))[2])
80 0 0 if ($wantarray and my $ref = ref $slurped)
81 0 0 if $ref eq 'ARRAY'
82 0 0 if $ref eq 'HASH'
93 0 0 unless (defined wantarray)
98 0 0 if ($self->[1] and not +(File::Basename::fileparse($filename, qr/\.[^.]*/mx))[2])
103 0 0 if ($wantarray and my $ref = ref $slurped)
104 0 0 if $ref eq 'ARRAY'
105 0 0 if $ref eq 'HASH'
114 0 0 exists $_[3]{'encoder'} ? :
119 0 0 if (defined $encoder) { }
0 0 elsif ($imported_encoder) { }
127 0 0 if ($auto_ext and not +(File::Basename::fileparse($filename, qr/\.[^.]*/mx))[2])
138 0 0 if ($self->[1] and not +(File::Basename::fileparse($filename, qr/\.[^.]*/mx))[2])
148 2 3 unless &Scalar::Util::blessed($encoder) and $encoder->can('encode') and $encoder->can('decode')