line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Application::HelpMan; |
2
|
1
|
|
|
1
|
|
20224
|
use base 'CGI::Application'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1171
|
|
3
|
1
|
|
|
1
|
|
11142
|
use CGI::Application::Plugin::TmplInnerOuter; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use CGI::Application::Plugin::AutoRunmode; |
5
|
|
|
|
|
|
|
use CGI::Application::Plugin::Session; |
6
|
|
|
|
|
|
|
use CGI::Application::Plugin::Feedback ':all'; |
7
|
|
|
|
|
|
|
use CGI::Application::Plugin::Forward; |
8
|
|
|
|
|
|
|
use CGI::Application::Plugin::HelpMan ':all'; |
9
|
|
|
|
|
|
|
#$CGI::Application::Plugin::TmplInnerOuter::DEBUG = 1; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub setup { |
12
|
|
|
|
|
|
|
my $self = shift; |
13
|
|
|
|
|
|
|
$self->start_mode('help_search'); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub help : Runmode { |
17
|
|
|
|
|
|
|
my $self = shift; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$self->_set_tmpl_default(q{ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
}); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$self->_set_vars( |
27
|
|
|
|
|
|
|
HELP_TITLE => $self->hm_help_title, |
28
|
|
|
|
|
|
|
HELP_BODY => $self->hm_help_body, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return $self->tmpl_output; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub help_view : Runmode { |
35
|
|
|
|
|
|
|
my $self = shift; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
unless( $self->hm_found_term_query ){ |
38
|
|
|
|
|
|
|
$self->feedback("What do you want to search for?"); |
39
|
|
|
|
|
|
|
return $self->forward('help_search'); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
$self->feedback(sprintf "You searched for [%s]", $self->hm_term_get ); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $abs; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
unless( $self->hm_found_term_abs ){ |
47
|
|
|
|
|
|
|
$self->feedback( sprintf "Sorry, I can't find [%s]", $self->hm_term_get ); |
48
|
|
|
|
|
|
|
return $self->forward('help_search'); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
unless( $self->hm_found_term_doc ) { |
52
|
|
|
|
|
|
|
$self->feedback( sprintf "Sorry, no doccumentation in [%s]", $self->hm_term_get ); |
53
|
|
|
|
|
|
|
return $self->forward('help_search'); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
unless( $self->hm_doc_body ) { |
57
|
|
|
|
|
|
|
$self->feedback( sprintf "Sorry, cant get out the doccumentation for [%s]", $self->hm_term_get ); |
58
|
|
|
|
|
|
|
return $self->forward('help_search'); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
$self->_set_tmpl_default(q{ |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
}); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
$self->_set_vars( |
71
|
|
|
|
|
|
|
HELP_TITLE => $self->hm_doc_title, |
72
|
|
|
|
|
|
|
HELP_BODY => $self->hm_doc_body, |
73
|
|
|
|
|
|
|
); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
return $self->tmpl_output; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub help_search : Runmode { |
80
|
|
|
|
|
|
|
my $self = shift; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
$self->_set_tmpl_default(q{ |
83
|
|
|
|
|
|
|
Search Help |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
}); |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
return $self->tmpl_output; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub tmpl_output { |
96
|
|
|
|
|
|
|
my $self = shift; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
$self->_set_tmpl_default(q{ |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|