File Coverage

blib/lib/SQL/Statement/Function/ByName/IF.pm
Criterion Covered Total %
statement 9 9 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 15 16 93.7


line stmt bran cond sub pod time code
1             package SQL::Statement::Function::ByName::IF;
2              
3             our $DATE = '2017-01-25'; # DATE
4             our $VERSION = '0.001'; # VERSION
5              
6 1     1   1126 use 5.010001;
  1         2  
7 1     1   3 use strict;
  1         1  
  1         19  
8 1     1   3 use warnings;
  1         1  
  1         52  
9              
10             sub SQL_FUNCTION_IF {
11 2 100   2 0 21 $_[2] ? $_[3] : $_[4];
12             }
13              
14             1;
15             # ABSTRACT: SQL function to return a value or the other depending on condition
16              
17             __END__