return MooseX::Runnable::Invocation->new(
class => $app,
- plugins => [ keys %{$args->plugins} ], # XXX: fixme
+ plugins => $args->plugins,
)->run($args->app_args);
}
package MooseX::Runnable::Invocation;
use Moose;
use MooseX::Types -declare => ['RunnableClass'];
-use MooseX::Types::Moose qw(Str ClassName);
+use MooseX::Types::Moose qw(Str HashRef ArrayRef);
use namespace::autoclean;
require Class::MOP;
has 'plugins' => (
is => 'ro',
- isa => 'ArrayRef[Str]',
+ isa => HashRef[ArrayRef[Str]],
default => sub { [] },
required => 1,
auto_deref => 1,
sub BUILD {
my $self = shift;
- $self->load_plugin($_) for $self->plugins;
+ $self->load_plugin($_) for keys %{$self->plugins};
}
sub load_class {