diff Lib/IMPL/Class/Meta.pm @ 369:7c784144d2f1

Implemented object metadata class, cleanup
author cin
date Mon, 09 Dec 2013 17:35:34 +0400
parents c6d0f889ef87
children
line wrap: on
line diff
--- a/Lib/IMPL/Class/Meta.pm	Wed Dec 04 17:31:53 2013 +0400
+++ b/Lib/IMPL/Class/Meta.pm	Mon Dec 09 17:35:34 2013 +0400
@@ -28,15 +28,16 @@
     no strict 'refs';
     my @result;
     
-    if ($deep) {
-        @result = map { $_->can('GetMeta') ? $_->GetMeta($meta_class,$predicate,$deep) : () } @{$class.'::ISA'};
-    }
-    
     if ($predicate) {
         push @result,grep( &$predicate($_), map( @{$class_meta{$class}{$_}}, grep( $_->isa($meta_class), keys %{$class_meta{$class} || {}} ) ) );
     } else {
         push @result, map( @{$class_meta{$class}{$_} || []}, grep( $_->isa($meta_class), keys %{$class_meta{$class} || {}} ) );
     }
+    
+    if ($deep) {
+        push @result, map { $_->can('GetMeta') ? $_->GetMeta($meta_class,$predicate,$deep) : () } @{$class.'::ISA'};
+    }
+    
     wantarray ? @result : \@result;
 }