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

filter: Statementstmt 96.3% 26 / 27 Branchbran 100% 2 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 3 totaltotal 88.3% 38 / 43 SCAR 11.0
CC
3
Cov
97%
parse_next_chunk
3.0
get_close_tag
2.0
BEGIN
1.0
CRAP 3.0
« blib/lib/DTL/Fast/Filter/Urlizetrunc.pm ↑ Summary blib/lib/DTL/Fast/Tag/Sprintf.pm »
1 package DTL::Fast::Tag::Comment;
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';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 $DTL::Fast::TAG_HANDLERS{'comment'} = __PACKAGE__;
6  
7 3 ▶use DTL::Fast::Text;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 #@Override
10 0 ▶sub get_close_tag{return 'endcomment';}
Subroutine get_close_tag: not called CC=1 SCAR=6.9
Pod undocumented
11  
12 #@Override
13 sub parse_next_chunk
14 {
15 80 ▶ my $self = shift;
Subroutine parse_next_chunk: called CC=3 SCAR=11.0
Pod undocumented
16 80 my $chunk = shift @{$self->{'raw_chunks'}};
17 80 ▶ my $chunk_lines = scalar (my @tmp = $chunk =~ /(\n)/g ) || 0;
Condition100%2/2
scalar(my(@tmp) = $chunk =~ /(\n)/g) || 0
l!l
4040
MC/DC100%1/1
scalar(my(@tmp) = $chunk =~ /(\n)/g) || 0
scalar(my(@tmp) = $chunk =~ /(\n)/g)
Truth table100%2/2
A
A= scalar(my(@tmp) = $chunk =~ /(\n)/g)
Aresult
11
00
18
19 80 ▶ if( $chunk =~ /^\{\%\s*endcomment\s*\%\}$/six )
Branch: 1 branch
BranchTrueFalseTotal
if ($chunk =~ /^\{\%\s*endcomment\s*\%\}$/six) 16 64 80
20 {
21 16 $self->{'raw_chunks'} = []; # this stops parsing
22 }
23  
24 80 $DTL::Fast::Template::CURRENT_TEMPLATE_LINE += $chunk_lines;
25
26 80 return;
27 }
28  
29 #@Override
30 sub render
31 {
32 10 ▶ return '';
Subroutine render: called CC=1 SCAR=0.0
Pod undocumented
33 }
34  
35 3 1;
« blib/lib/DTL/Fast/Filter/Urlizetrunc.pm ↑ Summary blib/lib/DTL/Fast/Tag/Sprintf.pm »