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 1     1   17 use 5.010001;
  1         3  
4 1     1   6 use strict;
  1         2  
  1         19  
5 1     1   4 use warnings;
  1         3  
  1         160  
6              
7             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
8             our $DATE = '2022-12-12'; # DATE
9             our $DIST = 'SQL-Statement-Functions-Date'; # DIST
10             our $VERSION = '0.050'; # VERSION
11              
12             sub SQL_FUNCTION_DAYOFMONTH {
13 8     8 0 2322 my $param = $_[2];
14              
15 8 100       49 $param =~ /^\d{4}-\d{2}-(\d{2})/ or return undef; ## no critic: TestingAndDebugging::ProhibitExplicitReturnUndef
16 6         33 $1+0;
17             }
18              
19             1;
20             # ABSTRACT: Return day of month of a date/datetime expression
21              
22             __END__