MojoX/Renderer/Alloy/Velocity.pm

filter: Statementstmt 62.9% 17 / 27 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 55.0% 22 / 40 CC 4 SCAR 22.5
CC
4
Cov
52%
_render
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 9.4
« Mojolicious/Plugin/AlloyRenderer.pm ↑ Summary MojoX/Renderer/Alloy/TT.pm »
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)
l!l
00
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)
Aresult
11
00
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
BranchTrueFalseTotal
unless defined $$output 0 0 0
29 $alloy->merge( $input,
30 $self->_template_vars( $c ),
31 $output,
32 0 ▶ ) || do {
Branch: 1 branch
BranchTrueFalseTotal
$alloy->merge($input, $self->_template_vars($c), $output) or do { my $e = $alloy->error; chomp $e; $c->render_exception($e); return } 0 0 0
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__
« Mojolicious/Plugin/AlloyRenderer.pm ↑ Summary MojoX/Renderer/Alloy/TT.pm »