line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Latemp::NavLinks::GenHtml; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1212
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
65
|
|
4
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
38
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
42
|
use 5.008; |
|
2
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
15
|
use parent 'Class::Accessor'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
24
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
11
|
|
|
|
|
|
|
nav_links_obj |
12
|
|
|
|
|
|
|
root |
13
|
|
|
|
|
|
|
)); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.2.6'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new |
20
|
|
|
|
|
|
|
{ |
21
|
2
|
|
|
2
|
1
|
1260
|
my $class = shift; |
22
|
2
|
|
|
|
|
6
|
my $self = {}; |
23
|
2
|
|
|
|
|
6
|
bless $self, $class; |
24
|
2
|
|
|
|
|
13
|
$self->_init(@_); |
25
|
2
|
|
|
|
|
6
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _init |
29
|
|
|
|
|
|
|
{ |
30
|
2
|
|
|
2
|
|
4
|
my $self = shift; |
31
|
2
|
|
|
|
|
7
|
my (%args) = @_; |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
14
|
$self->root($args{root}); |
34
|
2
|
|
|
|
|
46
|
$self->nav_links_obj($args{nav_links_obj}); |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
24
|
return $self; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _get_buttons |
41
|
|
|
|
|
|
|
{ |
42
|
2
|
|
|
2
|
|
5
|
my $self = shift; |
43
|
|
|
|
|
|
|
|
44
|
2
|
|
|
|
|
19
|
my @buttons = |
45
|
|
|
|
|
|
|
( |
46
|
|
|
|
|
|
|
{ |
47
|
|
|
|
|
|
|
'dir' => "prev", |
48
|
|
|
|
|
|
|
'button' => "left", |
49
|
|
|
|
|
|
|
'title' => "Previous Page", |
50
|
|
|
|
|
|
|
}, |
51
|
|
|
|
|
|
|
{ |
52
|
|
|
|
|
|
|
'dir' => "up", |
53
|
|
|
|
|
|
|
'button' => "up", |
54
|
|
|
|
|
|
|
'title' => "Up in the Site", |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
{ |
57
|
|
|
|
|
|
|
'dir' => "next", |
58
|
|
|
|
|
|
|
'button' => "right", |
59
|
|
|
|
|
|
|
'title' => "Next Page", |
60
|
|
|
|
|
|
|
}, |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
|
63
|
2
|
|
|
|
|
6
|
foreach my $button (@buttons) |
64
|
|
|
|
|
|
|
{ |
65
|
6
|
|
|
|
|
46
|
my $dir = $button->{'dir'}; |
66
|
6
|
50
|
|
|
|
21
|
if ($button->{'exists'} = exists($self->nav_links_obj->{$dir})) |
67
|
|
|
|
|
|
|
{ |
68
|
6
|
|
|
|
|
82
|
$button->{'link_obj'} = $self->nav_links_obj->{$dir}; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
2
|
|
|
|
|
31
|
return \@buttons; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
__END__ |