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

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 39 / 39 CC 3 SCAR 5.6
CC
3
Cov
100%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
↑ Summary
1 package Tags::HTML::Page::End;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 ▶use Class::Utils qw(set_params);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 ▶use Error::Pure qw(err);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 4 our $VERSION = 0.04;
10  
11 # Constructor.
12 sub new {
13 5 ▶ my ($class, @params) = @_;
Subroutine new: called CC=3 SCAR=11.0
Pod documented
14  
15 # Create object.
16 5 my $self = bless {}, $class;
17  
18 # 'Tags' object.
19 5 $self->{'tags'} = undef;
20  
21 # Process params.
22 5 set_params($self, @params);
23  
24 # Check to 'Tags' object.
25 5 ▶ if (! $self->{'tags'} || ! $self->{'tags'}->isa('Tags::Output')) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"tags"} and $self->{"tags"}->isa("Tags::Output")) 2 3 5
Condition100%3/3
$self->{"tags"} and $self->{"tags"}->isa("Tags::Output")
!ll&&!rl&&r
113
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 3 return $self;
31 }
32  
33 # Process 'Tags'.
34 sub process {
35 1 ▶ my $self = shift;
Subroutine process: called CC=1 SCAR=0.0
Pod documented
36  
37 # End of page.
38 1 $self->{'tags'}->put(
39 ['e', 'body'],
40 ['e', 'html'],
41 );
42  
43 1 return;
44 }
45  
46 4 1;
47  
48 __END__
↑ Summary