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;
as Str,
where { $_ =~ /^[:A-Za-z_]+$/ };
-use namespace::clean -except => 'meta';
# this class is just as runnable as any other, so I guess we should tag it
with 'MooseX::Runnable', 'MooseX::Object::Pluggable';
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 {
my @bad_attributes = map { $_->name } grep {
$_->is_required && $_->has_default || $_->has_builder
- } $class->compute_all_applicable_attributes;
+ } $class->get_all_attributes;
confess
'By default, MooseX::Runnable calls the constructor with no'.