line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::PageLayout::Page; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
57
|
use 5.010; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
142
|
|
4
|
4
|
|
|
4
|
|
20
|
use utf8; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
18
|
|
5
|
4
|
|
|
4
|
|
97
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
136
|
|
6
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
159
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
6697
|
use overload q[""] => \&Str; |
|
4
|
|
|
|
|
4447
|
|
|
4
|
|
|
|
|
60
|
|
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
4
|
|
4023
|
use Moo; |
|
4
|
|
|
|
|
68775
|
|
|
4
|
|
|
|
|
31
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Text::PageLayout::PageElements'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has page_number => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
required => 1, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has total_pages => ( |
20
|
|
|
|
|
|
|
is => 'rw', |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has bottom_filler => ( |
24
|
|
|
|
|
|
|
is => 'ro', |
25
|
|
|
|
|
|
|
default => sub { '' }, |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub Str { |
29
|
15
|
|
|
15
|
0
|
2280
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
15
|
|
|
|
|
96
|
return join '', |
32
|
|
|
|
|
|
|
$self->_apply('header'), |
33
|
15
|
|
|
|
|
44
|
join($self->separator, @{ $self->paragraphs }), |
34
|
|
|
|
|
|
|
$self->bottom_filler, |
35
|
|
|
|
|
|
|
$self->_apply('footer'), |
36
|
|
|
|
|
|
|
; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
sub as_string { |
39
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
40
|
0
|
|
|
|
|
0
|
$self->Str; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub _apply { |
44
|
30
|
|
|
30
|
|
50
|
my ($self, $elem) = @_; |
45
|
30
|
|
|
|
|
86
|
my $e = $self->$elem; |
46
|
30
|
|
|
|
|
197
|
return $self->process_template->( |
47
|
|
|
|
|
|
|
template => $e, |
48
|
|
|
|
|
|
|
element => $elem, |
49
|
|
|
|
|
|
|
page_number => $self->page_number, |
50
|
|
|
|
|
|
|
total_pages => $self->total_pages, |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |