X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FPurePerl.pm;h=a999394bb50ec0101ba748632bfceba6152810b2;hp=9c39b72c91559dbe84a6c4ffd5b2209861a8c605;hb=047d7af00ab8b37c6369c032211bfe492fe6cd05;hpb=6a97bbdad44391f2a587165cb81fcf8aedc642ac diff --git a/lib/Mouse/PurePerl.pm b/lib/Mouse/PurePerl.pm index 9c39b72..a999394 100644 --- a/lib/Mouse/PurePerl.pm +++ b/lib/Mouse/PurePerl.pm @@ -1,5 +1,7 @@ package Mouse::PurePerl; +require Mouse::Util; + package Mouse::Util; @@ -166,7 +168,7 @@ package sub name { $_[0]->{package} } sub _method_map { $_[0]->{methods} } -sub _attribute_map{ $_[0]->{attribute_map} } +sub _attribute_map{ $_[0]->{attributes} } sub namespace{ my $name = $_[0]->{package}; @@ -209,6 +211,12 @@ sub roles { $_[0]->{roles} } sub linearized_isa { @{ get_linear_isa($_[0]->{package}) } } +sub get_all_attributes { + my($self) = @_; + my %attrs = map { %{ $self->initialize($_)->{attributes} } } reverse $self->linearized_isa; + return values %attrs; +} + package Mouse::Meta::Role; @@ -340,7 +348,7 @@ Mouse::PurePerl - A Mouse guts in pure Perl =head1 VERSION -This document describes Mouse version 0.40_04 +This document describes Mouse version 0.40_05 =head1 SEE ALSO