- print "<p style=\"color:green;\">Covered: " .
- $coverage_ref->{"covered_lines"} . "<p>" .
- "<p style=\"color:red;\">Uncovered: " .
- $coverage_ref->{"uncovered_lines"} . "</span></p>";
+ my $para = HTML::Element->new('p');
+ my $covered = HTML::Element->new('span');
+ $covered->attr('style', "color:green;");
+ $covered->push_content("Covered: " . $coverage_ref->{"covered_lines"} );
+ $para->push_content($covered);
+
+ my $para2 = HTML::Element->new('p');
+ my $uncovered = HTML::Element->new('span');
+ $uncovered->attr('style', "color:red;");
+ $uncovered->push_content("Uncovered: " . $coverage_ref->{"uncovered_lines"} );
+ $para2->push_content($uncovered);
+ $body->push_content($para, $para2);
+ }
+ else
+ {
+ #print "coverage ref exists for $file:\n" . Data::Dumper::Dumper($coverage_ref) . "\n";