0

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;
}
VeroLom
  • 3,856
  • 9
  • 34
  • 48

1 Answers1

3

Module::Pluggable

daxim
  • 39,270
  • 4
  • 65
  • 132