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