File Coverage

blib/lib/Data/Sah/Value/perl/Date/last_year_utc.pm
Criterion Covered Total %
statement 8 13 61.5
branch n/a
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 11 20 55.0


line stmt bran cond sub pod time code
1             package Data::Sah::Value::perl::Date::last_year_utc;
2              
3 1     1   458996 use 5.010001;
  1         5  
4 1     1   8 use strict;
  1         2  
  1         47  
5 1     1   6 use warnings;
  1         3  
  1         322  
6              
7             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
8             our $DATE = '2023-12-09'; # DATE
9             our $DIST = 'Data-Sah-ValueBundle-Date'; # DIST
10             our $VERSION = '0.003'; # VERSION
11              
12             sub meta {
13             +{
14 0     0 0   v => 1,
15             summary => 'Last year, from UTC time',
16             prio => 50,
17             args => {
18             },
19             };
20             }
21              
22             sub value {
23 0     0 0   my %cargs = @_;
24              
25             #my $gen_args = $cargs{args} // {};
26 0           my $res = {};
27              
28 0           $res->{expr_value} = 'do { my @lt = gmtime(); $lt[5]+1900-1 }';
29              
30 0           $res;
31             }
32              
33             1;
34             # ABSTRACT:
35              
36             __END__