lib/PDF/FromHTML/Template/Container/Row.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 36 CC 2 SCAR 11.0
CC
2
Cov
0%
total_of
6.0
BEGIN
2.0
enter_scope
2.0
CRAP 3.0
1 package PDF::FromHTML::Template::Container::Row;
2  
3 use strict;
4  
5 BEGIN {
6 use vars qw(@ISA);
7 @ISA = qw(PDF::FromHTML::Template::Container);
8  
9 use PDF::FromHTML::Template::Container;
10 }
11  
12 sub enter_scope
13 {
14 my $self = shift;
15 my ($context) = @_;
16  
17 $self->SUPER::enter_scope($context);
18  
19 $context->{X} = $context->get($self, 'LEFT_MARGIN');
20  
21 return 1;
22 }
23  
24 sub deltas
25 {
26 my $self = shift;
27 my ($context) = @_;
28  
29 return {
30 X => $context->get($self, 'X') * -1 + $context->get($self, 'LEFT_MARGIN'),
31 Y => -1 * $self->max_of($context, 'H'),
32 };
33 }
34  
35 sub total_of
36 {
37 my $self = shift;
38 my ($context, $attr) = @_;
39  
40 return $self->max_of($context, $attr) if $attr eq 'H';
41  
42 return $self->SUPER::total_of($context, $attr);
43 }
44  
45 1;
46 __END__