File Coverage

lib/Perlmazing/Perlmazing/Precompile/in_array.pm
Criterion Covered Total %
statement 8 10 80.0
branch 3 6 50.0
condition n/a
subroutine 2 2 100.0
pod n/a
total 13 18 72.2


line stmt bran cond sub pod time code
1 50     50   436 use Perlmazing::Feature;
  50         119  
  50         336  
2            
3             sub main (\@$) {
4 20     20   20321 for (my $i = '00'; $i < @{$_[0]}; $i++) {
  165         424  
5 155 50       244 if (defined $_[1]) {
6 155 100       208 return $i if ${$_[0]}[$i] eq $_[1];
  155         372  
7             } else {
8 0 0       0 return $i unless defined ${$_[0]}[$i];
  0         0  
9             }
10             }
11             }