File Coverage

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


line stmt bran cond sub pod time code
1             package Spreadsheet::Engine::Function::RIGHT;
2              
3 28     28   170 use strict;
  28         58  
  28         937  
4 28     28   148 use warnings;
  28         54  
  28         815  
5              
6 28     28   136 use base 'Spreadsheet::Engine::Fn::text';
  28         50  
  28         4275  
7              
8 191     191 1 903 sub signature { 't', '>=0' }
9              
10             sub calculate {
11 86     86 1 3164 my ($self, $string, $len) = @_;
12 86         606 return substr $string, -$len, $len;
13             }
14              
15             1;
16              
17             __END__