File Coverage

lib/Spreadsheet/Engine/Function/OR.pm
Criterion Covered Total %
statement 20 20 100.0
branch 2 2 100.0
condition n/a
subroutine 7 7 100.0
pod 2 2 100.0
total 31 31 100.0


line stmt bran cond sub pod time code
1             package Spreadsheet::Engine::Function::OR;
2              
3 28     28   410 use strict;
  28         55  
  28         971  
4 28     28   147 use warnings;
  28         56  
  28         785  
5              
6 28     28   155 use base 'Spreadsheet::Engine::Fn::logical';
  28         117  
  28         3914  
7 28     28   168 use List::Util 'first';
  28         88  
  28         6519  
8              
9 204     204 1 534 sub argument_count { -1 }
10              
11             sub calculate {
12 204     204 1 352 my $self = shift;
13 204         451 my @ops = map $self->next_operand, 1 .. @{ $self->foperand };
  204         552  
14 204         5317 my $type = $self->optype(propagateerror => @ops);
15 204 100       4745 die $type if $type->is_error;
16 198     227   3409 return first { $_->value } @ops;
  227         4853  
17             }
18              
19             1;
20              
21             __END__