From: Robert Buels Date: Mon, 22 Jun 2009 14:11:29 +0000 (-0700) Subject: added fix for bug tested in 4c8c390 X-Git-Tag: 0.84~25^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d984726366c96aa7c8235f5c0a235c13a2546605;p=gitmo%2FMoose.git added fix for bug tested in 4c8c390 --- diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index 0e343d3..98550fc 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -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 {