line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Filter::DefaultIfNone; |
2
|
2
|
|
|
2
|
|
1282
|
use strict; use utf8; use warnings FATAL => 'all'; |
|
2
|
|
|
2
|
|
4
|
|
|
2
|
|
|
2
|
|
50
|
|
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
48
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
74
|
|
3
|
2
|
|
|
2
|
|
9
|
use parent 'DTL::Fast::Filter::Default'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$DTL::Fast::FILTER_HANDLERS{'default_if_none'} = __PACKAGE__; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#@Override |
8
|
|
|
|
|
|
|
sub filter |
9
|
|
|
|
|
|
|
{ |
10
|
11
|
|
|
11
|
0
|
16
|
my $self = shift; # self |
11
|
11
|
|
|
|
|
13
|
shift; # filter_manager |
12
|
11
|
|
|
|
|
15
|
my $value = shift; |
13
|
11
|
|
|
|
|
12
|
my $context = shift; |
14
|
|
|
|
|
|
|
|
15
|
11
|
|
66
|
|
|
52
|
return $value // $self->{'default'}->render($context); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |