updated: fixed globfor (@INC) { my $path = "$_/MyModule/Plugins"; for my $m (<$path/*.pm>) { $m =~ s{^\Q$_\E/}{}; # strip off everything leading up to MyModul +e... $m =~ s{/}{::}g; # replace / with :: $m =~ s{\.pm$}{}; # remove extension eval "use $m;"; # use MyModule::Plugin::Whatever die if $@; # propagate exceptions } }
In reply to Re: How to see what is available in Module::Namespace::*
by Joost
in thread How to see what is available in Module::Namespace::*
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |