EP/Formatter/HTML.pm

filter: Statementstmt 6.2% 1 / 16 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 2 totaltotal 3.3% 1 / 30 CC 4 SCAR 21.2
CC
4
Cov
4%
new
12.0
Format
6.0
__ANON__
2.0
CRAP 8.3
« EP/Install.pm ↑ Summary EP/Response.pm »
1 # -*- perl -*-
2
3 package XML::EP::Formatter::HTML;
4
5 1 $XML::EP::Formatter::HTML = '0.01';
6
7
8 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod undocumented
9 0 my $proto = shift;
10 0 ▶ my $self = (@_ == 1) ? \%{ shift() } : { @_ };
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
11 0 ▶ bless($self, (ref($proto) || $proto));
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
12 }
13
14 0 ▶sub Format {
Subroutine Format: not called CC=2 SCAR=17.9
Pod undocumented
15 0 my $self = shift; my $ep = shift; my $xml = shift;
16 0 my $response = $ep->Response();
17 0 ▶ $response->ContentType("text/html") unless $response->ContentType();
Branch: 1 branch
BranchTrueFalseTotal
unless $response->ContentType 0 0 0
18 0 my $fh = $ep->Request()->FileHandle();
19 0 ▶ XML::DOM::setTagCompression(sub {1});
Subroutine __ANON__: not called CC=1 SCAR=6.9
20
21 0 $xml->setXMLDecl(undef);
22
23 0 print $fh $ep->Response->Headers();
24
25 0 $xml->printToFileHandle($fh);
26 }
« EP/Install.pm ↑ Summary EP/Response.pm »