blib/lib/Tags/HTML/Page/End.pm

filter: Statementstmt 87.5% 21 / 24 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 83.3% 5 / 6 Podpod 100% 2 / 2 totaltotal 89.7% 35 / 39 CC 3 SCAR 6.3
CC
3
Cov
90%
new
3.0
process
2.0
BEGIN
1.0
CRAP 1.9
↑ Summary
1 package Tags::HTML::Page::End;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use Class::Utils qw(set_params);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use Error::Pure qw(err);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 our $VERSION = 0.03;
10  
11 # Constructor.
12 sub new {
13 4 ▶ my ($class, @params) = @_;
Subroutine new: called CC=3 SCAR=11.0
Pod documented
14  
15 # Create object.
16 4 my $self = bless {}, $class;
17  
18 # 'Tags' object.
19 4 $self->{'tags'} = undef;
20  
21 # Process params.
22 4 set_params($self, @params);
23  
24 # Check to 'Tags' object.
25 4 ▶ if (! $self->{'tags'} || ! $self->{'tags'}->isa('Tags::Output')) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"tags"} and $self->{"tags"}->isa("Tags::Output")) 2 2 4
Condition100%3/3
$self->{"tags"} and $self->{"tags"}->isa("Tags::Output")
!ll&&!rl&&r
112
MC/DC100%2/2
$self->{"tags"} and $self->{"tags"}->isa("Tags::Output")
$self->{"tags"} $self->{"tags"}->isa("Tags::Output")
Truth table100%3/3
A and B
A= $self->{"tags"}B= $self->{"tags"}->isa("Tags::Output")
ABresult
0X0
100
111
26 2 err "Parameter 'tags' must be a 'Tags::Output::*' class.";
27 }
28  
29 # Object.
30 2 return $self;
31 }
32  
33 # Process 'Tags'.
34 sub process {
35 0 ▶ my $self = shift;
Subroutine process: not called CC=1 SCAR=6.9
Pod documented
36  
37 # End of page.
38 0 $self->{'tags'}->put(
39 ['e', 'body'],
40 ['e', 'html'],
41 );
42  
43 0 return;
44 }
45  
46 3 1;
47  
48 __END__
↑ Summary