blib/lib/DTL/Fast/Filter/Strftime.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.6% 29 / 30 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/DTL/Fast/Filter/Urlencode.pm ↑ Summary blib/lib/DTL/Fast/Filter/Linenumbers.pm »
1 package DTL::Fast::Filter::Strftime;
2 2 ▶use strict; use utf8; use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use parent 'DTL::Fast::Filter::Date';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 $DTL::Fast::FILTER_HANDLERS{'strftime'} = __PACKAGE__;
6  
7 2 ▶use DTL::Fast::Utils;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 #@Override
10 sub filter
11 {
12 2 ▶ my $self = shift; # self
Subroutine filter: called CC=1 SCAR=0.0
Pod undocumented
13 2 shift; # filter_manager
14 2 my $value = shift;
15 2 my $context = shift;
16
17 2 my $format = $self->{'format'}->render($context);
18
19 2 return DTL::Fast::Utils::time2str($format, $value);
20 }
21  
22 2 1;
« blib/lib/DTL/Fast/Filter/Urlencode.pm ↑ Summary blib/lib/DTL/Fast/Filter/Linenumbers.pm »