| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HTML::Latemp::NavLinks::GenHtml::Text; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1219
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
26
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
44
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.2.6'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use vars qw($nav_buttons_html); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
85
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use parent 'HTML::Latemp::NavLinks::GenHtml'; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
7
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
|
14
|
|
|
|
|
|
|
nav_links |
|
15
|
|
|
|
|
|
|
root |
|
16
|
|
|
|
|
|
|
)); |
|
17
|
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
73
|
use Template; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
19
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# load Template::Stash to make method tables visible |
|
21
|
1
|
|
|
1
|
|
5
|
use Template::Stash; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
258
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Define a method to return a substring. |
|
24
|
|
|
|
|
|
|
$Template::Stash::SCALAR_OPS->{ 'substr' } = sub { |
|
25
|
|
|
|
|
|
|
return substr($_[0], $_[1], $_[2]); |
|
26
|
|
|
|
|
|
|
}; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _get_nav_buttons_html |
|
29
|
|
|
|
|
|
|
{ |
|
30
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
31
|
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my (%args) = (@_); |
|
33
|
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
my $with_accesskey = $args{'with_accesskey'}; |
|
35
|
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my $root = $self->root(); |
|
37
|
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $template = |
|
39
|
|
|
|
|
|
|
Template->new( |
|
40
|
|
|
|
|
|
|
{ |
|
41
|
|
|
|
|
|
|
'POST_CHOMP' => 1, |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
); |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my $vars = |
|
46
|
|
|
|
|
|
|
{ |
|
47
|
|
|
|
|
|
|
'buttons' => $self->_get_buttons(), |
|
48
|
|
|
|
|
|
|
'root' => $root, |
|
49
|
|
|
|
|
|
|
'with_accesskey' => $with_accesskey, |
|
50
|
|
|
|
|
|
|
}; |
|
51
|
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
my $nav_links_template = <<'EOF'; |
|
53
|
|
|
|
|
|
|
[% USE HTML %] |
|
54
|
|
|
|
|
|
|
[% FOREACH b = buttons %] |
|
55
|
|
|
|
|
|
|
[% SET key = b.dir.substr(0, 1) %] |
|
56
|
|
|
|
|
|
|
[ |
|
57
|
|
|
|
|
|
|
[% IF b.exists %] |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
[% IF with_accesskey %] |
|
60
|
|
|
|
|
|
|
accesskey="[% key %]" |
|
61
|
|
|
|
|
|
|
[% END %] |
|
62
|
|
|
|
|
|
|
>[% END %] [% b.dir %] [% IF b.exists %] |
|
63
|
|
|
|
|
|
|
[% END %] |
|
64
|
|
|
|
|
|
|
] |
|
65
|
|
|
|
|
|
|
[% END %] |
|
66
|
|
|
|
|
|
|
EOF |
|
67
|
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
my $nav_buttons_html = ""; |
|
69
|
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
$template->process(\$nav_links_template, $vars, \$nav_buttons_html); |
|
71
|
0
|
|
|
|
|
|
return $nav_buttons_html; |
|
72
|
|
|
|
|
|
|
} |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub get_total_html |
|
75
|
|
|
|
|
|
|
{ |
|
76
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
77
|
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
return " |
|
79
|
|
|
|
|
|
|
$self->_get_nav_buttons_html(@_) . |
|
80
|
|
|
|
|
|
|
"\n"; |
|
81
|
|
|
|
|
|
|
} |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
__END__ |