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

filter: Statementstmt 100% 22 / 22 Branchbran 50.0% 2 / 4 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 76.9% 30 / 39 SCAR 16.5
CC
5
Cov
80%
parse_parameters
7.5
BEGIN
1.0
BEGIN
1.0
CRAP 5.2
« blib/lib/DTL/Fast/Filter/Divisibleby.pm ↑ Summary blib/lib/DTL/Fast/Cache/Runtime.pm »
1 package DTL::Fast::Tag::Extends;
2 1 ▶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 1 ▶use parent 'DTL::Fast::Tag::Simple';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 $DTL::Fast::TAG_HANDLERS{'extends'} = __PACKAGE__;
6  
7 1 ▶use DTL::Fast::Template;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 #@Override
10 sub parse_parameters
11 {
12 14 ▶ my $self = shift;
Subroutine parse_parameters: called CC=5 SCAR=20.1
Pod undocumented
13
14 die $self->get_parse_error("parent template was not specified")
15 14 ▶ if not $self->{'parameter'};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"parameter"} 0 14 14
16
17 die $self->get_parse_error(
18 sprintf("Multiple extends specified in the template:\n\%s\n\%s\n"
19 , $DTL::Fast::Template::CURRENT_TEMPLATE->{'extends'}->{'original'} // 'undef'
20 , $self->{'parameter'} // 'undef'
21 )
22 14 ▶ ) if $DTL::Fast::Template::CURRENT_TEMPLATE->{'extends'};
Branch: 1 branch
BranchTrueFalseTotal
if $DTL::Fast::Template::CURRENT_TEMPLATE->{"extends"} 0 14 14
Condition0%0/4
$DTL::Fast::Template::CURRENT_TEMPLATE->{"extends"}{"original"} // "undef"
l!l
00
$self->{"parameter"} // "undef"
l!l
00
MC/DC0%0/1
$DTL::Fast::Template::CURRENT_TEMPLATE->{"extends"}{"original"} // "undef"
$DTL::Fast::Template::CURRENT_TEMPLATE->{"extends"}{"original"}
MC/DC0%0/1
$self->{"parameter"} // "undef"
$self->{"parameter"}
Truth table0%0/2
A
A= $DTL::Fast::Template::CURRENT_TEMPLATE->{"extends"}{"original"}
Aresult
11
00
Truth table0%0/2
A
A= $self->{"parameter"}
Aresult
11
00
23
24 14 $DTL::Fast::Template::CURRENT_TEMPLATE->{'extends'} = DTL::Fast::Variable->new($self->{'parameter'});
25
26 14 return;
27 }
28  
29 1 1;
« blib/lib/DTL/Fast/Filter/Divisibleby.pm ↑ Summary blib/lib/DTL/Fast/Cache/Runtime.pm »