File Coverage

lib/Spreadsheet/Engine/Fn/logical.pm
Criterion Covered Total %
statement 13 13 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 2 2 100.0
total 22 22 100.0


line stmt bran cond sub pod time code
1             package Spreadsheet::Engine::Fn::logical;
2              
3 28     28   173 use strict;
  28         90  
  28         960  
4 28     28   149 use warnings;
  28         51  
  28         710  
5              
6 28     28   137 use base 'Spreadsheet::Engine::Fn::base';
  28         64  
  28         7931  
7              
8 1065     1065 1 2439 sub argument_count { 1 }
9              
10             sub result {
11 4328     4328 1 5746 my $self = shift;
12 4328 100       17343 my $result = $self->calculate ? 1 : 0;
13 4273         127852 return Spreadsheet::Engine::Value->new(type => 'nl', value => $result);
14             }
15              
16             1;
17              
18             __END__