If both your stub and its generated controller module needs to load a module, include a uses statement in your controller's block.
uses
uses takes a comma separated list of modules to use. If you want to control their import lists, use pairs. For example, this will use the modules with default importing:
uses Your::Module, Some::Other::Module;
Add pairs to get the imports of your dreams:
uses Your::Module => `qw( :everything :and then some )`;
Note that the value will be used literally to produce this:
use Your::Module qw( :everything :and then some );
So, qw is a good choice (as it usually is).
See also gen_uses and stub_uses which only add use statements to one of the modules.
gen_uses
stub_uses
The plugins keyword is the way to load Gantry plugin modules from the Gantry::Plugins:: namespace.
plugins
Gantry::Plugins::
Note that nothing is every added to a stub once it is made, so uses statements added after stub generation are equivalent to gen_uses statements as far as bigtop is concerned, but they could still serve as documentation.
Build the example with:
bigtop -c example.bigtop all
Look for Exotic in both lib/Kids/Child.pm and lib/Kids/GEN/Child.pm. Notice how Your::Module lists imports explicitly. If you don't provide a list, all of the @EXPORT items will be explicitly listed.
Exotic
lib/Kids/Child.pm
lib/Kids/GEN/Child.pm
Your::Module
@EXPORT
To install Bigtop, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bigtop
CPAN shell
perl -MCPAN -e shell install Bigtop
For more information on module installation, please visit the detailed CPAN module installation guide.