Bigtop::Backend::Control::Gantry 0.18 review
DownloadBigtop::Backend::Control::Gantry is a controller generator for the Gantry framework. SYNOPSIS Build a file like this called my.
|
|
Bigtop::Backend::Control::Gantry is a controller generator for the Gantry framework.
SYNOPSIS
Build a file like this called my.bigtop:
config {
base_dir `/home/username`;
Control Gantry {}
}
app App::Name {
controller SomeController {}
}
Then run this command:
bigtop my.bigtop Control
When your bigtop config includes Control Gantry, this module will be loaded by Bigtop::Parser when bigtop is run with all or Control in its build list.
This module builds files in the lib subdirectory of base_dir/App-Name. (But you can change name by supplying app_dir, as explained in Bigtop::Parser's pod.)
There will generally be two files for each controller you define. One will have the name you give it with the app name in front. For the SYNOPSIS example, that file will be called
/home/username/App-Name/lib/App/Name/SomeController.pm
I call this file the stub. It won't have much useful code in it, though it might have method stubs depending on what's in its controller block.
The other file will have generated code in it. As such it will go in the GEN subdirectory of the directory where the stub lives. In the example, the name will be:
/home/username/App-Name/lib/App/Name/GEN/SomeController.pm
During the intial build, both of these files will be made. Subsequently, the stub will not be regenerated (unless you delete it), but the GEN file will be. To prevent regeneration you may either put no_gen in the Control Gantry block of the config, like this:
config {
...
Control Gantry { no_gen 1; }
}
or you may mark the controller itself:
controller SomeController {
no_gen 1;
}
Requirements:
Perl
Bigtop::Backend::Control::Gantry 0.18 search tags