マイプロジェクトの構造体:perlでプラグインファイルを動的に読み込む方法は?
Test.pm
Plugins/Plugin1.pm
Plugins/Plugin2.pm
test.pmは、次のようになります。たとえば、同じAPIを
sub new{
#how to dynamic load plugins?
plugin1、plugs2提供、sub run {#...}
perlスクリプトは次のようになります。
my $test=Test->new("Plugin1");
$test->run ;#should call Plugin1->run
test.pmのプラグインを動的に読み込む方法は?
私を助ける良いフレームワークはありますか?
ありがとうございました。
http://stackoverflow.com/questions/2025261/how-can-i-find-all-the-packages-that-inherit-from-a-package-in-perl http://stackoverflow.com/質問/ 2478009/plugin-object-with-pluginsとは何ですか?http://stackoverflow.com/questions/4815432/what-is-the-best-option-for-building-a-plugin-system -for-a-moose-application http://stackoverflow.com/questions/8301959/dynamically-loading-perl-modules – daxim