| 1 | 3 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 2 | 3 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | package MojoX::Renderer::Alloy::Velocity; | ||||||||||||
| 4 | 3 | ▶ | BEGIN { | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 3 | $MojoX::Renderer::Alloy::Velocity::AUTHORITY = 'cpan:AJGB'; | |||||||||||
| 6 | } | ||||||||||||
| 7 | { | ||||||||||||
| 8 | 3 | $MojoX::Renderer::Alloy::Velocity::VERSION = '1.121150'; | |||||||||||
| 9 | } | ||||||||||||
| 10 | #ABSTRACT: Template::Alloy's Velocity renderer | ||||||||||||
| 11 | |||||||||||||
| 12 | 3 | ▶ | use base 'MojoX::Renderer::Alloy'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | |||||||||||||
| 14 | 3 | ▶ | use Template::Alloy qw( Velocity ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 15 | |||||||||||||
| 16 | 3 | __PACKAGE__->attr('alloy'); | |||||||||||
| 17 | |||||||||||||
| 18 | |||||||||||||
| 19 | 0 | ▶ | sub _render { | ||||||||||
|
Subroutine
_render: not called CC=4 SCAR=30.0
| |||||||||||||
| 20 | 0 | my ($self, $r, $c, $output, $options) = @_; | |||||||||||
| 21 | |||||||||||||
| 22 | 0 | ▶ | my $input = $self->_get_input( $r, $c, $options ) | ||||||||||
|
Condition0%0/2
$self->_get_input($r, $c, $options) || (return)
MC/DC0%0/1
$self->_get_input($r, $c, $options) || (return)
$self->_get_input($r, $c, $options)
Truth table0%0/2
A
A= $self->_get_input($r, $c, $options)
| |||||||||||||
| 23 | || return; | ||||||||||||
| 24 | |||||||||||||
| 25 | 0 | my $alloy = $self->alloy; | |||||||||||
| 26 | |||||||||||||
| 27 | # Template::Alloy won't handle undefined strings | ||||||||||||
| 28 | 0 | ▶ | $$output = '' unless defined $$output; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 29 | $alloy->merge( $input, | ||||||||||||
| 30 | $self->_template_vars( $c ), | ||||||||||||
| 31 | $output, | ||||||||||||
| 32 | 0 | ▶ | ) || do { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 33 | 0 | my $e = $alloy->error; | |||||||||||
| 34 | 0 | chomp $e; | |||||||||||
| 35 | 0 | $c->render_exception( $e ); | |||||||||||
| 36 | |||||||||||||
| 37 | 0 | return; | |||||||||||
| 38 | }; | ||||||||||||
| 39 | |||||||||||||
| 40 | 0 | return 1; | |||||||||||
| 41 | } | ||||||||||||
| 42 | |||||||||||||
| 43 | 3 | 1; | |||||||||||
| 44 | |||||||||||||
| 45 | __END__ | ||||||||||||