File Coverage

lib/Spreadsheet/Engine/Function/SLN.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 16 16 100.0


line stmt bran cond sub pod time code
1             package Spreadsheet::Engine::Function::SLN;
2              
3 28     28   156 use strict;
  28         58  
  28         972  
4 28     28   148 use warnings;
  28         56  
  28         753  
5              
6 28     28   150 use base 'Spreadsheet::Engine::Fn::depreciation';
  28         53  
  28         5300  
7              
8             sub calculate {
9 4     4 1 156 my ($self, $cost, $salvage, $lifetime) = @_;
10 4         93 return ($cost - $salvage) / $lifetime;
11             }
12              
13             1;
14              
15             __END__