line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Spreadsheet::Engine::Function::IF; |
2
|
|
|
|
|
|
|
|
3
|
28
|
|
|
28
|
|
147
|
use strict; |
|
28
|
|
|
|
|
61
|
|
|
28
|
|
|
|
|
903
|
|
4
|
28
|
|
|
28
|
|
144
|
use warnings; |
|
28
|
|
|
|
|
60
|
|
|
28
|
|
|
|
|
779
|
|
5
|
|
|
|
|
|
|
|
6
|
28
|
|
|
28
|
|
145
|
use base 'Spreadsheet::Engine::Fn::base'; |
|
28
|
|
|
|
|
55
|
|
|
28
|
|
|
|
|
5707
|
|
7
|
|
|
|
|
|
|
|
8
|
1801
|
|
|
1801
|
1
|
7517
|
sub signature { '*', '*', '*' } |
9
|
181
|
|
|
181
|
|
2825
|
sub _error_ops_ok { 1 } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub result { |
12
|
882
|
|
|
882
|
1
|
1672
|
my $self = shift; |
13
|
882
|
|
|
|
|
2734
|
my ($cond, $trueval, $falseval) = $self->_ops; |
14
|
882
|
100
|
66
|
|
|
7538
|
return Spreadsheet::Engine::Error->val |
15
|
|
|
|
|
|
|
unless $cond->is_num |
16
|
|
|
|
|
|
|
or $cond->is_blank; |
17
|
743
|
100
|
|
|
|
20006
|
return $cond->value ? $trueval : $falseval; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__END__ |