comparison Lib/IMPL/Class/Meta.pm @ 280:c6d0f889ef87

+IMPL::declare now supports meta attributes *bugfixes related to the typeof() operator
author cin
date Wed, 06 Feb 2013 02:15:48 +0400
parents af8af4b8337e
children 7c784144d2f1
comparison
equal deleted inserted replaced
279:af8af4b8337e 280:c6d0f889ef87
27 $class = ref $class if ref $class; 27 $class = ref $class if ref $class;
28 no strict 'refs'; 28 no strict 'refs';
29 my @result; 29 my @result;
30 30
31 if ($deep) { 31 if ($deep) {
32 @result = map { $_->can('get_meta') ? $_->get_meta($meta_class,$predicate,$deep) : () } @{$class.'::ISA'}; 32 @result = map { $_->can('GetMeta') ? $_->GetMeta($meta_class,$predicate,$deep) : () } @{$class.'::ISA'};
33 } 33 }
34 34
35 if ($predicate) { 35 if ($predicate) {
36 push @result,grep( &$predicate($_), map( @{$class_meta{$class}{$_}}, grep( $_->isa($meta_class), keys %{$class_meta{$class} || {}} ) ) ); 36 push @result,grep( &$predicate($_), map( @{$class_meta{$class}{$_}}, grep( $_->isa($meta_class), keys %{$class_meta{$class} || {}} ) ) );
37 } else { 37 } else {