blib/lib/Kelp/Module/Template/Xslate.pm

filter: Statementstmt 100% 13 / 13 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 2 / 2 totaltotal 100% 21 / 21 CC 2 SCAR 3.4
CC
2
Cov
100%
render
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
↑ Summary
1 package Kelp::Module::Template::Xslate;
2 1 ▶use Kelp::Base 'Kelp::Module::Template';
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Text::Xslate;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = 0.01;
6  
7 1 attr ext => 'tx';
8  
9 1 ▶sub build_engine {
Subroutine build_engine: called CC=1 SCAR=0.0
Pod documented
10 1 my ( $self, %args ) = @_;
11 1 Text::Xslate->new(%args);
12 }
13  
14 2 ▶sub render {
Subroutine render: called CC=2 SCAR=6.9
Pod documented
15 2 my ( $self, $template, $vars ) = @_;
16 return
17 2 ▶ ref($template) eq 'SCALAR'
Branch: 1 branch
BranchTrueFalseTotal
ref $template eq 'SCALAR' ? : 1 1 2
18 ? $self->engine->render_string( $$template, $vars )
19 : $self->engine->render( $template, $vars );
20 }
21  
22 1 1;
23  
24 __END__
↑ Summary