X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole.pm;h=0da0ebcaa25d38053c3f40c9cf5025bc2f22d7c3;hb=9e4ed568f2e5c1041e6fea8d0cbde420562ab5df;hp=18e68dea7efb4bc5d5c5ccf5a77d8933db7f0194;hpb=bb153262bdf27ba624caf70970cfd6e520df90f5;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index 18e68de..0da0ebc 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -10,7 +10,7 @@ use Carp 'confess'; use Sub::Name 'subname'; use Devel::GlobalDestruction 'in_global_destruction'; -our $VERSION = '0.79'; +our $VERSION = '0.84'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -214,7 +214,8 @@ foreach my $modifier_type (qw[ before around after ]) { $META->add_method("get_${modifier_type}_method_modifiers" => sub { my ($self, $method_name) = @_; #return () unless exists $self->$attr_reader->{$method_name}; - @{$self->$attr_reader->{$method_name}}; + my $mm = $self->$attr_reader->{$method_name}; + $mm ? @$mm : (); }); $META->add_method("has_${modifier_type}_method_modifiers" => sub {