Dave Cross: Still Munging Data With Perl: Online event - Mar 17 Learn more

$Mira::Control::Plugin::Plug::VERSION = '00.07.24';
use strict;
use utf8;
use 5.012;
use Carp;
use lib 'plugins/lib';
sub plug {
my $class = shift;
my $source = shift;
my $plugins = shift;
my $apis = shift;
foreach my $plugin (@$plugins)
{
#eval "require $plug->{lib}";
#$plugin->{lib} .= '.pm' if $plugin->{lib} !~ /\.pm$/;
load $plugin;
eval {$plugin->plug($apis)};
###### TODO need better checks and error messages ######
# say "! plugin error: " . $plug_yaml . " > " . $plug->{name} . " need plug method" if $@;
}
}
1;