line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
2974
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
84
|
|
2
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
129
|
|
3
|
|
|
|
|
|
|
package MojoX::Renderer::Alloy::Velocity; |
4
|
|
|
|
|
|
|
BEGIN { |
5
|
2
|
|
|
2
|
|
65
|
$MojoX::Renderer::Alloy::Velocity::AUTHORITY = 'cpan:AJGB'; |
6
|
|
|
|
|
|
|
} |
7
|
|
|
|
|
|
|
{ |
8
|
|
|
|
|
|
|
$MojoX::Renderer::Alloy::Velocity::VERSION = '1.121150'; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
#ABSTRACT: Template::Alloy's Velocity renderer |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
11
|
use base 'MojoX::Renderer::Alloy'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
688
|
|
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
1216
|
use Template::Alloy qw( Velocity ); |
|
2
|
|
|
|
|
27925
|
|
|
2
|
|
|
|
|
16
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->attr('alloy'); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _render { |
20
|
22
|
|
|
22
|
|
59
|
my ($self, $r, $c, $output, $options) = @_; |
21
|
|
|
|
|
|
|
|
22
|
22
|
|
100
|
|
|
150
|
my $input = $self->_get_input( $r, $c, $options ) |
23
|
|
|
|
|
|
|
|| return; |
24
|
|
|
|
|
|
|
|
25
|
9
|
|
|
|
|
344
|
my $alloy = $self->alloy; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# Template::Alloy won't handle undefined strings |
28
|
9
|
50
|
|
|
|
89
|
$$output = '' unless defined $$output; |
29
|
|
|
|
|
|
|
$alloy->merge( $input, |
30
|
|
|
|
|
|
|
$self->_template_vars( $c ), |
31
|
|
|
|
|
|
|
$output, |
32
|
9
|
100
|
|
|
|
67
|
) || do { |
33
|
2
|
|
|
|
|
28837
|
my $e = $alloy->error; |
34
|
2
|
|
|
|
|
15
|
chomp $e; |
35
|
2
|
|
|
|
|
330
|
$c->render_exception( $e ); |
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
|
|
153090
|
return; |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
|
40
|
7
|
|
|
|
|
38940
|
return 1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |