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

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 94.1% 32 / 34 SCAR 11.0
CC
3
Cov
100%
render
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« blib/lib/DTL/Fast/Tag/Autoescape.pm ↑ Summary blib/lib/DTL/Fast/Tag/Dump.pm »
1 package DTL::Fast::Tag::Firstof;
2 3 ▶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 3 ▶use parent 'DTL::Fast::Tag::Simple';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 $DTL::Fast::TAG_HANDLERS{'firstof'} = __PACKAGE__;
6  
7 #@Override
8 sub parse_parameters
9 {
10 23 ▶ my $self = shift;
Subroutine parse_parameters: called CC=1 SCAR=0.0
Pod undocumented
11 23 $self->{'sources'} = $self->parse_sources($self->{'parameter'});
12 23 return $self;
13 }
14  
15 #@Override
16 sub render
17 {
18 11 ▶ my( $self, $context, $global_safe) = @_;
Subroutine render: called CC=3 SCAR=11.0
Pod undocumented
19 11 my $result = '';
20
21 11 foreach my $source (@{$self->{'sources'}})
22 {
23 58 ▶ if( $result = $source->render($context, $global_safe) )
Branch: 1 branch
BranchTrueFalseTotal
if ($result = $source->render($context, $global_safe)) 11 47 58
24 {
25 11 last;
26 }
27 }
28 11 return $result;
29 }
30  
31 3 1;
« blib/lib/DTL/Fast/Tag/Autoescape.pm ↑ Summary blib/lib/DTL/Fast/Tag/Dump.pm »