File Coverage

blib/lib/SQL/Statement/Function/ByName/DAYOFMONTH.pm
Criterion Covered Total %
statement 11 11 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 17 18 94.4


line stmt bran cond sub pod time code
1             package SQL::Statement::Function::ByName::DAYOFMONTH;
2              
3             our $DATE = '2016-01-21'; # DATE
4             our $VERSION = '0.03'; # VERSION
5              
6 1     1   14 use 5.010001;
  1         3  
7 1     1   4 use strict;
  1         2  
  1         19  
8 1     1   5 use warnings;
  1         1  
  1         98  
9              
10             sub SQL_FUNCTION_DAYOFMONTH {
11 6     6 0 1259 my $param = $_[2];
12              
13 6 100       31 $param =~ /^\d{4}-\d{2}-(\d{2})/ or return undef;
14 4         17 $1+0;
15             }
16              
17             1;
18             # ABSTRACT: DAYOFMONTH() SQL function
19              
20             __END__