From: sunnavy Date: Wed, 16 Sep 2009 00:40:55 +0000 (+0800) Subject: Moose role class has ->meta in method_list since 0.90, update for that X-Git-Tag: 0.32~62 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=faa45e546ff56d48fbd9fec43d1fc014520ca0e3;p=gitmo%2FMouse.git Moose role class has ->meta in method_list since 0.90, update for that --- diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index 709c3f9..13daeaf 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -64,7 +64,7 @@ sub get_method_list { no strict 'refs'; # Get all the CODE symbol table entries my @functions = - grep !/^(?:has|with|around|before|after|augment|inner|override|super|blessed|extends|confess|excludes|meta|requires)$/, + grep !/^(?:has|with|around|before|after|augment|inner|override|super|blessed|extends|confess|excludes|requires)$/, grep { defined &{"${name}::$_"} } keys %{"${name}::"}; wantarray ? @functions : \@functions; diff --git a/t/800_shikabased/013-compatibility-get_method_list.t b/t/800_shikabased/013-compatibility-get_method_list.t index 41d886e..1fd9a2f 100644 --- a/t/800_shikabased/013-compatibility-get_method_list.t +++ b/t/800_shikabased/013-compatibility-get_method_list.t @@ -32,6 +32,6 @@ sub test { die $@ if $@; is join(',', sort "${class}Class"->meta->get_method_list()), 'foo,meta', "mutable $class"; is join(',', sort "${class}ClassImm"->meta->get_method_list()), 'DESTROY,foo,meta,new', "immutable $class"; - is join(',', sort "${class}Role"->meta->get_method_list()), 'bar', "role $class"; + is join(',', sort "${class}Role"->meta->get_method_list()), 'bar,meta', "role $class"; }