File Coverage

lib/Spreadsheet/Engine/Function/ABS.pm
Criterion Covered Total %
statement 12 12 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 19 19 100.0


line stmt bran cond sub pod time code
1             package Spreadsheet::Engine::Function::ABS;
2              
3 28     28   148 use strict;
  28         60  
  28         924  
4 28     28   146 use warnings;
  28         52  
  28         4243  
5              
6 28     28   154 use base 'Spreadsheet::Engine::Fn::math';
  28         60  
  28         6768  
7              
8             sub calculate {
9 181     181 1 5475 my ($self, $value) = @_;
10 181 100       2191 return -$value if $value < 0;
11 92         1912 return $value;
12             }
13              
14             1;
15              
16             __END__