in reply to Re: Similar plugins run serially
in thread Similar plugins run serially
That said, it seems like you're trying way too hard. The following is untested and may need some tweaking, but you get the idea.opendir my $dir, PLUGINS; @scanners = map (-f $_ ? /^(.*)\.pm$/i : ()), readdir $dir; closedir $dir; # .. require "$_.pm";
{ local @INC = PLUGINS; opendir my $dir, PLUGINS; eval qq(@{[ map -f && ? /^(.*)\.pm$/ && "use \Q$1\E;", readdir $di +r ]}); closedir $dir; }
Update: had forgotten to actually put the plugins path into @INC.
Makeshifts last the longest.
|
|---|