File Coverage

lib/Spreadsheet/Engine/Error.pm
Criterion Covered Total %
statement 16 18 88.8
branch n/a
condition 2 2 100.0
subroutine 9 11 81.8
pod 7 7 100.0
total 34 38 89.4


line stmt bran cond sub pod time code
1             package Spreadsheet::Engine::Error;
2              
3 28     28   164 use strict;
  28         62  
  28         1119  
4 28     28   156 use warnings;
  28         60  
  28         869  
5              
6 28     28   150 use Spreadsheet::Engine::Value;
  28         65  
  28         7008  
7              
8             sub _new {
9 1415     1415   3397 my ($self, $type, $val) = @_;
10 1415   100     38792 Spreadsheet::Engine::Value->new(type => $type, value => $val || 0);
11             }
12              
13 72     72 1 358 sub div0 { shift->_new('e#DIV/0!', @_) }
14 231     231 1 922 sub na { shift->_new('e#N/A', @_) }
15 0     0 1 0 sub name { shift->_new('e#NAME?', @_) }
16 0     0 1 0 sub null { shift->_new('e#NULL!', @_) }
17 12     12 1 72 sub num { shift->_new('e#NUM!', @_) }
18 1     1 1 4 sub ref { shift->_new('e#REF!', @_) }
19 1099     1099 1 10155 sub val { shift->_new('e#VALUE!', @_) }
20              
21             1;
22             __END__