blib/lib/DTL/Fast/Tag/Templatetag.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 86.6% 26 / 30 SCAR 6.9
CC
2
Cov
91%
parse_parameters
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« blib/lib/DTL/Fast/Filter/DefaultIfNone.pm ↑ Summary blib/lib/DTL/Fast/Expression/Operator/Unary/Not.pm »
1 package DTL::Fast::Tag::Templatetag;
2 2 ▶use strict; use utf8; use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use parent 'DTL::Fast::Tag::Simple';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 $DTL::Fast::TAG_HANDLERS{'templatetag'} = __PACKAGE__;
6  
7 2 our %TAG_MAP = (
8 'openblock' => '{%',
9 'closeblock' => '%}',
10 'openvariable' => '{{',
11 'closevariable' => '}}',
12 'openbrace' => '{',
13 'closebrace' => '}',
14 'opencomment' => '{#',
15 'closecomment' => '#}',
16 );
17  
18 #@Override
19 sub parse_parameters
20 {
21 16 ▶ my $self = shift;
Subroutine parse_parameters: called CC=2 SCAR=7.6
Pod undocumented
22
23 16 ▶ if( not ($self->{'value'} = $TAG_MAP{$self->{'parameter'}}))
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"value"} = $DTL::Fast::Tag::Templatetag::TAG_MAP{$self->{"parameter"}}) 0 16 16
24 {
25 0 die $self->get_parse_error("unknown template tag $self->{'parameter'}");
26 }
27
28 16 return $self;
29 }
30  
31 #@Override
32 sub render
33 {
34 16 ▶ return shift->{'value'};
Subroutine render: called CC=1 SCAR=0.0
Pod undocumented
35 }
36  
37 2 1;
« blib/lib/DTL/Fast/Filter/DefaultIfNone.pm ↑ Summary blib/lib/DTL/Fast/Expression/Operator/Unary/Not.pm »