From: Jonathan Rockway Date: Mon, 2 Nov 2009 08:32:24 +0000 (-0600) Subject: bugfix; bump to 0.02 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Runnable.git;a=commitdiff_plain;h=6568c67dc4decc059123a6e6c83d450bf19e2b58 bugfix; bump to 0.02 fix bug where superclasses were not considered during invocation scheme application --- diff --git a/Changes b/Changes index 79fd289..7784247 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +0.02 Mon Nov 2 02:30:10 CST 2009 + - fix bug where roles of superclasses were not considered when + applying invocation schemes. + 0.01 Tue Oct 13 02:04:03 CDT 2009 - stable release, no major changes diff --git a/lib/MooseX/Runnable.pm b/lib/MooseX/Runnable.pm index 49b8d7d..7f21076 100644 --- a/lib/MooseX/Runnable.pm +++ b/lib/MooseX/Runnable.pm @@ -1,7 +1,7 @@ package MooseX::Runnable; use Moose::Role; -our $VERSION = '0.01'; +our $VERSION = '0.02'; requires 'run'; diff --git a/lib/MooseX/Runnable/Invocation.pm b/lib/MooseX/Runnable/Invocation.pm index 2fb34b7..3ebc1b1 100644 --- a/lib/MooseX/Runnable/Invocation.pm +++ b/lib/MooseX/Runnable/Invocation.pm @@ -2,6 +2,7 @@ package MooseX::Runnable::Invocation; use Moose; use MooseX::Types -declare => ['RunnableClass']; use MooseX::Types::Moose qw(Str HashRef ArrayRef); +use List::MoreUtils qw(uniq); use namespace::autoclean; require Class::MOP; @@ -100,11 +101,13 @@ sub apply_scheme { my ($self, $class) = @_; my @schemes = grep { defined } map { - $self->_convert_role_to_scheme($_) - } $class->calculate_all_roles; + eval { $self->_convert_role_to_scheme($_) } + } map { + eval { $_->meta->calculate_all_roles }; + } $class->linearized_isa; eval { - foreach my $scheme (@schemes) { + foreach my $scheme (uniq @schemes) { $scheme->apply($self); } };