blib/lib/Dancer2/Template/Alloy.pm

filter: Statementstmt 100% 24 / 24 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 94.1% 32 / 34 CC 2 SCAR 2.3
CC
2
Cov
96%
render
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
↑ Summary
1 package Dancer2::Template::Alloy;
2  
3 # ABSTRACT: Template Alloy engine for Dancer2
4  
5  
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Carp 'croak';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Template::Alloy;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 with 'Dancer2::Core::Role::Template';
14  
15 1 our $VERSION = '0.002';
16  
17 1 ▶sub _build_engine {
Subroutine _build_engine: called CC=1 SCAR=0.0
18 1 my $self = shift;
19  
20 Template::Alloy->new(
21 ABSOLUTE => 1,
22 ENCODING => $self->charset,
23 INCLUDE_PATH => $self->views,
24 1 %{ $self->config },
25 );
26 }
27  
28 1 ▶sub render {
Subroutine render: called CC=2 SCAR=7.1
Pod undocumented
29 1 my ( $self, $tmpl, $vars ) = @_;
30  
31 1 ▶ $self->engine->process( $tmpl, $vars, \my $content )
Branch: 1 branch
BranchTrueFalseTotal
$self->engine->process($tmpl, $vars, \my $content) or croak($self->engine->error) 1 0 1
32 or croak $self->engine->error;
33  
34 1 $content;
35 }
36  
37 1 1;
38  
39 __END__
↑ Summary