Articulate/Serialisation/TemplateToolkit.pm

filter: Statementstmt 78.5% 11 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 78.9% 15 / 19 CC 1 SCAR 2.2
CC
1
Cov
79%
serialise
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Articulate/Sortation/Numeric.pm ↑ Summary Articulate/Service/LoginForm.pm »
1 package Articulate::Serialisation::TemplateToolkit;
2 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 with 'Articulate::Role::Component';
7  
8 =head1 NAME
9  
10 Articulate::Serialisation::TemplateToolkit - put your response into a TT2 template
11  
12 =head1 METHODS
13  
14 =head3 serialise
15  
16 Finds the template corresponding to the response type and processes it, passing in the response data.
17  
18 =cut
19  
20 sub serialise {
21 0 ▶ my $self = shift;
Subroutine serialise: not called CC=1 SCAR=6.9
Pod documented
22 0 my $response = shift;
23 0 return $self->framework->template_process( $response->type, $response->data );
24 }
25  
26 5 1;
« Articulate/Sortation/Numeric.pm ↑ Summary Articulate/Service/LoginForm.pm »