Question

Need for help. Necessary to implement the installation and loading of "modules". "Module" plug-in is located in the file like lib//. I think I should somehow take the search subdirectories lib/ for "module", load the plugin to check if it is installed, and install it if not (for example, MyApp::MyModule->install()). The plugin contains "module", helpers, etc. Does you have anything ideas?

seems like final code:

# Load Core
my $_core = $self->plugin('FW::Core');

# Load modules
my $plugins = FW::Core::Model::Module->select->hashes();
if(@$plugins) {
    $self->plugin('FW::' . ucfirst $_->{name}) for @$plugins;
}
Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top