| 1 | package DTL::Fast::Tag::Verbatim; | ||||||||||||
| 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 | 3 | $DTL::Fast::TAG_HANDLERS{'verbatim'} = __PACKAGE__; | |||||||||||
| 5 | |||||||||||||
| 6 | 3 | ▶ | use DTL::Fast::Text; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | #@Override | ||||||||||||
| 9 | 0 | ▶ | sub get_close_tag{return 'endverbatim';} | ||||||||||
|
Subroutine
get_close_tag: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 10 | |||||||||||||
| 11 | #@Override | ||||||||||||
| 12 | sub parse_parameters | ||||||||||||
| 13 | { | ||||||||||||
| 14 | 22 | ▶ | my $self = shift; | ||||||||||
|
Subroutine
parse_parameters: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 15 | 22 | $self->{'contents'} = DTL::Fast::Text->new(); | |||||||||||
| 16 | 22 | ▶ | $self->{'last_tag'} = $self->{'parameter'} ? | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 17 | qr/\Qendverbatim\E\s+\Q$self->{'parameter'}\E/ | ||||||||||||
| 18 | : 'endverbatim'; | ||||||||||||
| 19 | 22 | return $self; | |||||||||||
| 20 | } | ||||||||||||
| 21 | |||||||||||||
| 22 | #@Override | ||||||||||||
| 23 | sub parse_next_chunk | ||||||||||||
| 24 | { | ||||||||||||
| 25 | 130 | ▶ | my $self = shift; | ||||||||||
|
Subroutine
parse_next_chunk: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||
| 26 | 130 | my $chunk = shift @{$self->{'raw_chunks'}}; | |||||||||||
| 27 | 130 | ▶ | my $chunk_lines = scalar (my @tmp = $chunk =~ /(\n)/g ) || 0; | ||||||||||
|
Condition100%2/2
scalar(my(@tmp) = $chunk =~ /(\n)/g) || 0
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)
| |||||||||||||
| 28 | |||||||||||||
| 29 | 130 | ▶ | if( $chunk =~ /^\{\%\s*$self->{'last_tag'}\s*\%\}$/six ) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 30 | { | ||||||||||||
| 31 | 22 | $self->{'raw_chunks'} = []; # this stops parsing | |||||||||||
| 32 | } | ||||||||||||
| 33 | else | ||||||||||||
| 34 | { | ||||||||||||
| 35 | 108 | $self->{'contents'}->append($chunk); | |||||||||||
| 36 | } | ||||||||||||
| 37 | |||||||||||||
| 38 | 130 | $DTL::Fast::Template::CURRENT_TEMPLATE_LINE += $chunk_lines; | |||||||||||
| 39 | |||||||||||||
| 40 | 130 | return; | |||||||||||
| 41 | } | ||||||||||||
| 42 | |||||||||||||
| 43 | #@Override | ||||||||||||
| 44 | sub render | ||||||||||||
| 45 | { | ||||||||||||
| 46 | 11 | ▶ | return shift->{'contents'}->render(shift); | ||||||||||
|
Subroutine
render: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 47 | } | ||||||||||||
| 48 | |||||||||||||
| 49 | 3 | 1; | |||||||||||