line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bigtop::Backend::Conf::General; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1763
|
use Bigtop::Backend::Conf; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
4
|
use Bigtop; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
5
|
1
|
|
|
1
|
|
4
|
use Inline; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
49
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub what_do_you_make { |
8
|
|
|
|
|
|
|
return [ |
9
|
0
|
|
|
0
|
1
|
|
[ 'docs/AppName.conf' |
10
|
|
|
|
|
|
|
=> 'Your config info in Config::General format' ], |
11
|
|
|
|
|
|
|
]; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub backend_block_keywords { |
15
|
|
|
|
|
|
|
return [ |
16
|
0
|
|
|
0
|
1
|
|
{ keyword => 'no_gen', |
17
|
|
|
|
|
|
|
label => 'No Gen', |
18
|
|
|
|
|
|
|
descr => 'Skip everything for this backend', |
19
|
|
|
|
|
|
|
type => 'boolean' }, |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
{ keyword => 'gen_root', |
22
|
|
|
|
|
|
|
label => 'Generate Root Path', |
23
|
|
|
|
|
|
|
descr => q!used to make a default root on request, ! |
24
|
|
|
|
|
|
|
. q!now you get defaults by defaul!, |
25
|
|
|
|
|
|
|
type => 'deprecated' }, |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
{ keyword => 'template', |
28
|
|
|
|
|
|
|
label => 'Alternate Template', |
29
|
|
|
|
|
|
|
descr => 'A custom TT template.', |
30
|
|
|
|
|
|
|
type => 'text' }, |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
]; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub gen_Conf { |
36
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
37
|
0
|
|
|
|
|
|
my $base_dir = shift; |
38
|
0
|
|
|
|
|
|
my $tree = shift; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my $conf_content = $class->output_conf( $tree ); |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my $docs_dir = File::Spec->catdir( $base_dir, 'docs' ); |
43
|
0
|
|
|
|
|
|
mkdir $docs_dir; |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my $app_name = $tree->get_appname(); |
46
|
0
|
|
|
|
|
|
$app_name =~ s/::/-/g; |
47
|
0
|
|
|
|
|
|
my $conf_file = File::Spec->catfile( $docs_dir, "$app_name.conf" ); |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
Bigtop::write_file( $conf_file, $conf_content ); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub output_conf { |
53
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
54
|
0
|
|
|
|
|
|
my $tree = shift; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# first find the base location |
57
|
0
|
|
|
|
|
|
my $location_output = $tree->walk_postorder( |
58
|
|
|
|
|
|
|
'output_base_location_general' |
59
|
|
|
|
|
|
|
); |
60
|
0
|
|
0
|
|
|
|
my $location = $location_output->[0] || ''; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# now build the blocks |
63
|
0
|
|
|
|
|
|
my $locations = $tree->walk_postorder( |
64
|
|
|
|
|
|
|
'output_gantry_locations_general', |
65
|
|
|
|
|
|
|
{ |
66
|
|
|
|
|
|
|
location => $location, |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
); |
69
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
return Bigtop::Backend::Conf::General::conf_file( |
71
|
|
|
|
|
|
|
{ |
72
|
|
|
|
|
|
|
locations => $locations, |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
our $template_is_setup = 0; |
78
|
|
|
|
|
|
|
our $default_template_text = <<'EO_TT_BLOCKS'; |
79
|
|
|
|
|
|
|
[% BLOCK conf_file %] |
80
|
|
|
|
|
|
|
[% FOREACH line IN locations %] |
81
|
|
|
|
|
|
|
[% line %] |
82
|
|
|
|
|
|
|
[% END %][%# end of foreach line in locations %] |
83
|
|
|
|
|
|
|
[% END %] |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
[% BLOCK all_locations %] |
86
|
|
|
|
|
|
|
[% FOREACH config IN configs %][% config %][% END %] |
87
|
|
|
|
|
|
|
[% FOREACH literal IN literals %][% literal %][% END %] |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
[% FOREACH child_piece IN child_output %][% child_piece %][% END %] |
90
|
|
|
|
|
|
|
[% END %][%# all_locations %] |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
[% BLOCK config %] |
93
|
|
|
|
|
|
|
[% IF indent %] [% END %][% var %] [% value %] |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
[% END %] |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
[% BLOCK sub_locations %] |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
[% FOREACH config IN loc_configs %] |
100
|
|
|
|
|
|
|
[% config %][% END %] |
101
|
|
|
|
|
|
|
[% IF literal %][% literal %][% END %] |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
[% END %] |
105
|
|
|
|
|
|
|
EO_TT_BLOCKS |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub setup_template { |
108
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
109
|
0
|
|
0
|
|
|
|
my $template_text = shift || $default_template_text; |
110
|
|
|
|
|
|
|
|
111
|
0
|
0
|
|
|
|
|
return if ( $template_is_setup ); |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
|
Inline->bind( |
114
|
|
|
|
|
|
|
TT => $template_text, |
115
|
|
|
|
|
|
|
POST_CHOMP => 1, |
116
|
|
|
|
|
|
|
TRIM_LEADING_SPACE => 0, |
117
|
|
|
|
|
|
|
TRIM_TRAILING_SPACE => 0, |
118
|
|
|
|
|
|
|
); |
119
|
|
|
|
|
|
|
|
120
|
0
|
|
|
|
|
|
$template_is_setup = 1; |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
package # application |
124
|
|
|
|
|
|
|
application; |
125
|
1
|
|
|
1
|
|
778
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
161
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub output_gantry_locations_general { |
128
|
0
|
|
|
0
|
|
|
my $self = shift; |
129
|
0
|
|
|
|
|
|
my $child_output = shift; |
130
|
0
|
|
|
|
|
|
my $data = shift; |
131
|
0
|
|
0
|
|
|
|
my $location = $data->{ location } || '/'; |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
# handle set vars at root location |
134
|
0
|
|
|
|
|
|
my $config = $self->walk_postorder( 'output_conf_general' ); |
135
|
0
|
|
|
|
|
|
my $literals = $self->walk_postorder( 'output_top_level_literal_general' ); |
136
|
|
|
|
|
|
|
|
137
|
0
|
|
|
|
|
|
my $output = Bigtop::Backend::Conf::General::all_locations( |
138
|
|
|
|
|
|
|
{ |
139
|
|
|
|
|
|
|
root_loc => $location, |
140
|
|
|
|
|
|
|
configs => $config, |
141
|
|
|
|
|
|
|
literals => $literals, |
142
|
|
|
|
|
|
|
child_output => $child_output, |
143
|
|
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
); |
145
|
|
|
|
|
|
|
|
146
|
0
|
|
|
|
|
|
return [ $output ]; |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
# app_statement |
150
|
|
|
|
|
|
|
package # app_statement |
151
|
|
|
|
|
|
|
app_statement; |
152
|
1
|
|
|
1
|
|
5
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
87
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
sub output_base_location_general { |
155
|
0
|
|
|
0
|
|
|
my $self = shift; |
156
|
|
|
|
|
|
|
|
157
|
0
|
0
|
|
|
|
|
return unless $self->{__KEYWORD__} eq 'location'; |
158
|
|
|
|
|
|
|
|
159
|
0
|
|
|
|
|
|
my $location = $self->{__ARGS__}[0]; |
160
|
|
|
|
|
|
|
|
161
|
0
|
|
|
|
|
|
return [ $location ]; |
162
|
|
|
|
|
|
|
} |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
# app_config_block |
165
|
|
|
|
|
|
|
package # app_config_block |
166
|
|
|
|
|
|
|
app_config_block; |
167
|
1
|
|
|
1
|
|
14
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
222
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
sub output_conf_general { |
170
|
0
|
|
|
0
|
|
|
my $self = shift; |
171
|
0
|
|
|
|
|
|
my $child_output = shift; |
172
|
|
|
|
|
|
|
|
173
|
0
|
0
|
|
|
|
|
return unless $child_output; |
174
|
|
|
|
|
|
|
|
175
|
0
|
|
|
|
|
|
my $output; |
176
|
0
|
|
|
|
|
|
my $gen_root = 1; |
177
|
|
|
|
|
|
|
|
178
|
0
|
|
|
|
|
|
foreach my $config ( @{ $child_output } ) { |
|
0
|
|
|
|
|
|
|
179
|
0
|
|
|
|
|
|
$output .= Bigtop::Backend::Conf::General::config( |
180
|
|
|
|
|
|
|
{ |
181
|
|
|
|
|
|
|
var => $config->{__KEYWORD__}, |
182
|
|
|
|
|
|
|
value => $config->{__ARGS__}, |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
); |
185
|
|
|
|
|
|
|
|
186
|
0
|
0
|
|
|
|
|
$gen_root = 0 if ( $config->{__KEYWORD__} eq 'root' ); |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
0
|
0
|
|
|
|
|
if ( $gen_root ) { |
190
|
0
|
|
|
|
|
|
$output .= Bigtop::Backend::Conf::General::config( |
191
|
|
|
|
|
|
|
{ |
192
|
|
|
|
|
|
|
var => 'root', |
193
|
|
|
|
|
|
|
value => 'html:html/templates', |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
); |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
0
|
|
|
|
|
|
return [ $output ]; |
199
|
|
|
|
|
|
|
} |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
# app_config_statement |
202
|
|
|
|
|
|
|
package # app_config_statement |
203
|
|
|
|
|
|
|
app_config_statement; |
204
|
1
|
|
|
1
|
|
6
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
84
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
sub output_conf_general { |
207
|
0
|
|
|
0
|
|
|
my $self = shift; |
208
|
|
|
|
|
|
|
|
209
|
0
|
|
|
|
|
|
my $output_vals = $self->{__ARGS__}->get_args(); |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
return [ { |
212
|
0
|
|
|
|
|
|
__KEYWORD__ => $self->{__KEYWORD__}, |
213
|
|
|
|
|
|
|
__ARGS__ => $output_vals |
214
|
|
|
|
|
|
|
} ]; |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
# literal_block |
218
|
|
|
|
|
|
|
package # literal_block |
219
|
|
|
|
|
|
|
literal_block; |
220
|
1
|
|
|
1
|
|
6
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
54
|
|
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
sub output_top_level_literal_general { |
223
|
0
|
|
|
0
|
|
|
my $self = shift; |
224
|
|
|
|
|
|
|
|
225
|
0
|
|
|
|
|
|
return $self->make_output( 'Conf' ); |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
# controller_block |
229
|
|
|
|
|
|
|
package # controller_block |
230
|
|
|
|
|
|
|
controller_block; |
231
|
1
|
|
|
1
|
|
4
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
248
|
|
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
sub output_gantry_locations_general { |
234
|
0
|
|
|
0
|
|
|
my $self = shift; |
235
|
0
|
|
|
|
|
|
my $child_output = shift; |
236
|
0
|
|
|
|
|
|
my $data = shift; |
237
|
0
|
|
|
|
|
|
my $location = $data->{ location }; |
238
|
|
|
|
|
|
|
|
239
|
0
|
0
|
|
|
|
|
return if $self->is_base_controller; |
240
|
|
|
|
|
|
|
|
241
|
0
|
|
|
|
|
|
my %child_loc = @{ $child_output }; |
|
0
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
|
243
|
0
|
0
|
|
|
|
|
if ( keys %child_loc != 1 ) { |
244
|
0
|
|
|
|
|
|
die "Error: controller '" . $self->get_name() |
245
|
|
|
|
|
|
|
. "' must have one location or rel_location statement.\n"; |
246
|
|
|
|
|
|
|
} |
247
|
|
|
|
|
|
|
|
248
|
0
|
|
|
|
|
|
my $app = $self->{__PARENT__}{__PARENT__}{__PARENT__}; |
249
|
0
|
|
|
|
|
|
my $full_name = $app->get_name() . '::' . $self->get_name(); |
250
|
|
|
|
|
|
|
|
251
|
0
|
|
|
|
|
|
my $loc_configs |
252
|
|
|
|
|
|
|
= $self->walk_postorder( 'output_glocation_configs_general' ); |
253
|
|
|
|
|
|
|
|
254
|
0
|
|
|
|
|
|
my $literals = $self->walk_postorder( |
255
|
|
|
|
|
|
|
'output_glocation_literal_general' |
256
|
|
|
|
|
|
|
); |
257
|
|
|
|
|
|
|
|
258
|
0
|
|
|
|
|
|
my $child_location; |
259
|
|
|
|
|
|
|
|
260
|
0
|
0
|
|
|
|
|
if ( defined $child_loc{rel_location} ) { |
261
|
0
|
|
|
|
|
|
$child_location = "$location/$child_loc{rel_location}"; |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
else { # must be location |
264
|
0
|
|
|
|
|
|
$child_location = $child_loc{location}; |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
|
267
|
0
|
0
|
|
|
|
|
return unless ( @{ $loc_configs } ); |
|
0
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
|
269
|
0
|
|
|
|
|
|
my $output = Bigtop::Backend::Conf::General::sub_locations( |
270
|
|
|
|
|
|
|
{ |
271
|
|
|
|
|
|
|
loc => $child_location, |
272
|
0
|
|
|
|
|
|
literal => join( "\n", @{ $literals } ), |
273
|
|
|
|
|
|
|
handler => $full_name, |
274
|
|
|
|
|
|
|
loc_configs => $loc_configs, |
275
|
|
|
|
|
|
|
} |
276
|
|
|
|
|
|
|
); |
277
|
|
|
|
|
|
|
|
278
|
0
|
|
|
|
|
|
return [ $output ]; |
279
|
|
|
|
|
|
|
} |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
# controller_statement |
282
|
|
|
|
|
|
|
package # controller_statement |
283
|
|
|
|
|
|
|
controller_statement; |
284
|
1
|
|
|
1
|
|
7
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
104
|
|
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
sub output_gantry_locations_general { |
287
|
0
|
|
|
0
|
|
|
my $self = shift; |
288
|
|
|
|
|
|
|
|
289
|
0
|
0
|
|
|
|
|
if ( $self->{__KEYWORD__} eq 'rel_location' ) { |
|
|
0
|
|
|
|
|
|
290
|
0
|
|
|
|
|
|
return [ rel_location => $self->{__ARGS__}->get_first_arg() ]; |
291
|
|
|
|
|
|
|
} |
292
|
|
|
|
|
|
|
elsif ( $self->{__KEYWORD__} eq 'location' ) { |
293
|
0
|
|
|
|
|
|
return [ location => $self->{__ARGS__}->get_first_arg() ]; |
294
|
|
|
|
|
|
|
} |
295
|
|
|
|
|
|
|
else { |
296
|
0
|
|
|
|
|
|
return; |
297
|
|
|
|
|
|
|
} |
298
|
|
|
|
|
|
|
} |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
# controller_config_block |
301
|
|
|
|
|
|
|
package # controller_config_block |
302
|
|
|
|
|
|
|
controller_config_block; |
303
|
1
|
|
|
1
|
|
5
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
146
|
|
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
sub output_glocation_configs_general { |
306
|
0
|
|
|
0
|
|
|
my $self = shift; |
307
|
0
|
|
|
|
|
|
my $child_output = shift; |
308
|
|
|
|
|
|
|
|
309
|
0
|
0
|
|
|
|
|
return unless $child_output; |
310
|
|
|
|
|
|
|
|
311
|
0
|
|
|
|
|
|
my $output; |
312
|
|
|
|
|
|
|
|
313
|
0
|
|
|
|
|
|
foreach my $config ( @{ $child_output } ) { |
|
0
|
|
|
|
|
|
|
314
|
0
|
|
|
|
|
|
$output .= Bigtop::Backend::Conf::General::config( |
315
|
|
|
|
|
|
|
{ |
316
|
|
|
|
|
|
|
var => $config->{__KEYWORD__}, |
317
|
|
|
|
|
|
|
value => $config->{__ARGS__}, |
318
|
|
|
|
|
|
|
indent => 1, |
319
|
|
|
|
|
|
|
} |
320
|
|
|
|
|
|
|
); |
321
|
|
|
|
|
|
|
} |
322
|
|
|
|
|
|
|
|
323
|
0
|
|
|
|
|
|
return [ $output ]; |
324
|
|
|
|
|
|
|
} |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
# controller_config_statement |
327
|
|
|
|
|
|
|
package # controller_config_statement |
328
|
|
|
|
|
|
|
controller_config_statement; |
329
|
1
|
|
|
1
|
|
6
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
194
|
|
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
sub output_glocation_configs_general { |
332
|
0
|
|
|
0
|
|
|
my $self = shift; |
333
|
|
|
|
|
|
|
|
334
|
0
|
|
|
|
|
|
my $output_vals = $self->{__ARGS__}->get_args(); |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
return [ { |
337
|
0
|
|
|
|
|
|
__KEYWORD__ => $self->{__KEYWORD__}, |
338
|
|
|
|
|
|
|
__ARGS__ => $output_vals |
339
|
|
|
|
|
|
|
} ]; |
340
|
|
|
|
|
|
|
} |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
# controller_literal_block |
343
|
|
|
|
|
|
|
package # controller_literal_block |
344
|
|
|
|
|
|
|
controller_literal_block; |
345
|
1
|
|
|
1
|
|
6
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
83
|
|
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
sub output_glocation_literal_general { |
348
|
0
|
|
|
0
|
|
|
my $self = shift; |
349
|
|
|
|
|
|
|
|
350
|
0
|
|
|
|
|
|
return $self->make_output( 'GantryLocation' ); |
351
|
|
|
|
|
|
|
} |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
1; |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
=head1 NAME |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
Bigtop::Backend::Conf::General - makes Config::General conf files |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
=head1 SYNOPSIS |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
If your bigtop file includes: |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
config { |
364
|
|
|
|
|
|
|
Conf General {} |
365
|
|
|
|
|
|
|
} |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
and there are controllers in your app section, this module will generate |
368
|
|
|
|
|
|
|
docs/httpd.conf when you type: |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
bigtop app.bigtop Conf |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
or |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
bigtop app.bigtop all |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
You can then directly Include this conf in your system httpd.conf or in one |
377
|
|
|
|
|
|
|
of its virtual hosts. |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
=head1 DESCRIPTION |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
This is a Bigtop backend which generates conf files. These |
382
|
|
|
|
|
|
|
have the format of Config::General. While you could use these with |
383
|
|
|
|
|
|
|
Gantry::Conf the Conf Gantry backend provides more directl help for that |
384
|
|
|
|
|
|
|
case. |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
=head1 KEYWORDS |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
This module does not register any keywords. See Bigtop::Conf |
389
|
|
|
|
|
|
|
for a list of allowed keywords (think app and controller level 'location' |
390
|
|
|
|
|
|
|
and controller level 'rel_location' statements). |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
=head1 METHODS |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
To keep podcoverage tests happy. |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
=over 4 |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
=item backend_block_keywords |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
Tells tentmaker that I understand these config section backend block keywords: |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
no_gen |
403
|
|
|
|
|
|
|
template |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
=item what_do_you_make |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
Tells tentmaker what this module makes. Summary: app.conf in Config::General |
408
|
|
|
|
|
|
|
format, suitable for use with Gantry::Conf. |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=item gen_Conf |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
Called by Bigtop::Parser to get me to do my thing. |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=item output_conf |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
What I call on the various AST packages to do my thing. |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=item setup_template |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
Called by Bigtop::Parser so the user can substitute an alternate template |
421
|
|
|
|
|
|
|
for the hard coded one here. |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
=back |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
=head1 AUTHOR |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
Phil Crow |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
=head1 COPYRIGHT and LICENSE |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
Copyright (C) 2005 by Phil Crow |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
434
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.6 or, |
435
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
=cut |