line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Expression::Operator::Unary::Defined; |
2
|
2
|
|
|
2
|
|
775
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
45
|
|
3
|
2
|
|
|
2
|
|
11
|
use utf8; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
4
|
2
|
|
|
2
|
|
39
|
use warnings FATAL => 'all'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
51
|
|
5
|
2
|
|
|
2
|
|
9
|
use parent 'DTL::Fast::Expression::Operator::Unary'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$DTL::Fast::OPS_HANDLERS{defined} = __PACKAGE__; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub render |
10
|
|
|
|
|
|
|
{ |
11
|
10
|
|
|
10
|
0
|
17
|
my ( $self, $context) = @_; |
12
|
10
|
|
|
|
|
14
|
my $result = undef; |
13
|
|
|
|
|
|
|
|
14
|
10
|
50
|
|
|
|
24
|
if ($self->{a}->{undef}) |
15
|
|
|
|
|
|
|
{ |
16
|
0
|
|
|
|
|
0
|
$result = 1; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
else |
19
|
|
|
|
|
|
|
{ |
20
|
10
|
|
|
|
|
31
|
$result = defined $self->{a}->render($context, 1); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
10
|
|
|
|
|
33
|
return $result; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |