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 34     34   337 use Perlmazing::Feature;
  34         87  
  34         328  
2              
3             sub main (\@$) {
4 20     20   180885 for (my $i = '00'; $i < @{$_[0]}; $i++) {
  165         329  
5 155 50       169 if (defined $_[1]) {
6 155 100       133 return $i if ${$_[0]}[$i] eq $_[1];
  155         264  
7             } else {
8 0 0       0 return $i unless defined ${$_[0]}[$i];
  0         0  
9             }
10             }
11             }