blib/lib/DBIx/ReportBuilder/Render/HTML.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 31 CC 5 SCAR 29.7
CC
5
Cov
0%
section
30.0
new
2.0
BEGIN
2.0
CRAP 19.5
1 # $File: //member/autrijus/DBIx-ReportBuilder/lib/DBIx/ReportBuilder/Render/HTML.pm $ $Author: autrijus $
2 # $Revision: #6 $ $Change: 8292 $ $DateTime: 2003/09/28 23:47:26 $
3  
4 package DBIx::ReportBuilder::Render::HTML;
5 use base 'DBIx::ReportBuilder::Render';
6 use strict;
7  
8 sub new {
9 my ($class, %args) = @_;
10 my $self = $class->SUPER::new(
11 %args,
12 twig_handlers => {
13 preamble => \&section,
14 header => \&section,
15 content => \&section,
16 footer => \&section,
17 postamble => \&section,
18 graph => sub { $_[0]->plotGraph($_[1]) },
19 },
20 pretty_print => ($args{pretty_print} || 'none'),
21 );
22 };
23  
24 sub section {
25 if ($_->att('separator')) {
26 if ($_->tag eq 'header') {
27 $_->insert_new_elt(last_child => 'hr');
28 }
29 elsif ($_->tag eq 'footer') {
30 $_->insert_new_elt(first_child => 'hr');
31 }
32 }
33 $_->att('hidden') ? $_->delete : $_->erase;
34 }
35  
36 1;