blib/lib/Template/ShowStartStop.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 6 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 1 / 1 totaltotal 100% 39 / 39 CC 4 SCAR 7.4
CC
4
Cov
100%
process
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.1
↑ Summary
1 package Template::ShowStartStop;
2 7 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 our $VERSION = '1.0.1'; # VERSION
7 }
8 7 ▶use SUPER;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 7 ▶use parent 'Template::Context';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 16 ▶sub process {
Subroutine process: called CC=4 SCAR=13.9
Pod documented
12 16 my ( $self, $template ) = @_;
13  
14 my $template_id
15 # conditional # set $template to
16 = ref($template) eq 'Template::Document' ? $template->name
17 16 ▶ : ref($template) eq 'ARRAY' ? join( ' + ', @{$template} )
Branch: 3 branches
BranchTrueFalseTotal
ref $template eq 'Template::Document' ? : 8 8 16
ref $template eq 'ARRAY' ? : 1 7 8
ref $template eq 'SCALAR' ? : 1 6 7
18 : ref($template) eq 'SCALAR' ? '(evaluated block)'
19 : $template
20 ;
21  
22 16 my $processed_data = super;
23  
24 16 return my $output
25 = "<!-- START: process $template_id -->\n"
26 . "$processed_data"
27 . "<!-- STOP: process $template_id -->\n"
28 ;
29  
30 };
31 7 ▶no SUPER;
Subroutine BEGIN: called CC=1 SCAR=0.0
32 7 1;
33 # ABSTRACT: Display where templates start and stop
34  
35 __END__
↑ Summary