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