line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Latemp::NavLinks::GenHtml::ArrowImages; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
66378
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
52
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
89
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.2.6'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
10
|
use vars qw($nav_buttons_html); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
96
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
1390
|
use parent 'HTML::Latemp::NavLinks::GenHtml'; |
|
2
|
|
|
|
|
591
|
|
|
2
|
|
|
|
|
11
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
13
|
|
|
|
|
|
|
_ext |
14
|
|
|
|
|
|
|
) |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _init |
18
|
|
|
|
|
|
|
{ |
19
|
2
|
|
|
2
|
|
5
|
my $self = shift; |
20
|
2
|
|
|
|
|
10
|
my (%args) = (@_); |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
|
|
16
|
$self->SUPER::_init(%args); |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
100
|
|
|
18
|
$self->_ext($args{ext} || '.png'); |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
24
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
2
|
|
1880
|
use Template; |
|
2
|
|
|
|
|
46726
|
|
|
2
|
|
|
|
|
67
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# load Template::Stash to make method tables visible |
33
|
2
|
|
|
2
|
|
1749
|
use Template::Stash; |
|
2
|
|
|
|
|
28627
|
|
|
2
|
|
|
|
|
578
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Define a method to return a substring. |
36
|
|
|
|
|
|
|
$Template::Stash::SCALAR_OPS->{ 'substr' } = sub { |
37
|
|
|
|
|
|
|
return substr($_[0], $_[1], $_[2]); |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _get_nav_buttons_html |
41
|
|
|
|
|
|
|
{ |
42
|
2
|
|
|
2
|
|
4
|
my $self = shift; |
43
|
|
|
|
|
|
|
|
44
|
2
|
|
|
|
|
5
|
my (%args) = (@_); |
45
|
|
|
|
|
|
|
|
46
|
2
|
|
|
|
|
4
|
my $with_accesskey = $args{'with_accesskey'}; |
47
|
|
|
|
|
|
|
|
48
|
2
|
|
|
|
|
10
|
my $root = $self->root(); |
49
|
|
|
|
|
|
|
|
50
|
2
|
|
|
|
|
66
|
my $template = |
51
|
|
|
|
|
|
|
Template->new( |
52
|
|
|
|
|
|
|
{ |
53
|
|
|
|
|
|
|
'POST_CHOMP' => 1, |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
2
|
|
|
|
|
10981
|
my $vars = |
58
|
|
|
|
|
|
|
{ |
59
|
|
|
|
|
|
|
'buttons' => $self->_get_buttons(), |
60
|
|
|
|
|
|
|
'root' => $root, |
61
|
|
|
|
|
|
|
'with_accesskey' => $with_accesskey, |
62
|
|
|
|
|
|
|
'image_base' => $self->get_image_base(), |
63
|
|
|
|
|
|
|
ext => $self->_ext(), |
64
|
|
|
|
|
|
|
}; |
65
|
|
|
|
|
|
|
|
66
|
2
|
|
|
|
|
28
|
my $nav_links_template = <<'EOF'; |
67
|
|
|
|
|
|
|
[% USE HTML %] |
68
|
|
|
|
|
|
|
[% FOREACH b = buttons %] |
69
|
|
|
|
|
|
|
[% SET key = b.dir.substr(0, 1) %] |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
[% IF b.exists %] |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
[% IF with_accesskey %] |
74
|
|
|
|
|
|
|
accesskey="[% key %]" |
75
|
|
|
|
|
|
|
[% END %] |
76
|
|
|
|
|
|
|
>[% END %]
|
77
|
|
|
|
|
|
|
alt="[% b.title %]" class="bless" />[% IF b.exists %] |
78
|
|
|
|
|
|
|
[% END %] |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
[% END %] |
81
|
|
|
|
|
|
|
EOF |
82
|
|
|
|
|
|
|
|
83
|
2
|
|
|
|
|
5
|
my $nav_buttons_html = ""; |
84
|
|
|
|
|
|
|
|
85
|
2
|
|
|
|
|
11
|
$template->process(\$nav_links_template, $vars, \$nav_buttons_html); |
86
|
2
|
|
|
|
|
829
|
return $nav_buttons_html; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub get_image_base |
92
|
|
|
|
|
|
|
{ |
93
|
2
|
|
|
2
|
1
|
4
|
my $self = shift; |
94
|
|
|
|
|
|
|
|
95
|
2
|
|
|
|
|
10
|
return "arrow-"; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub get_total_html |
100
|
|
|
|
|
|
|
{ |
101
|
2
|
|
|
2
|
1
|
1097
|
my $self = shift; |
102
|
|
|
|
|
|
|
|
103
|
2
|
|
|
|
|
10
|
return " |
104
|
|
|
|
|
|
|
$self->_get_nav_buttons_html(@_) . |
105
|
|
|
|
|
|
|
"\n"; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
1; |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
__END__ |