--- trunk/lib/Frey/ClassLoader.pm 2008/11/18 12:55:32 408 +++ trunk/lib/Frey/ClassLoader.pm 2008/11/18 13:52:26 409 @@ -126,7 +126,12 @@ =head2 class_methods - my @methods = $o->class_methods( $class ); + my @all_methods = $o->class_methods( $class ); + + my $class_method = $o->class_methods( $class ); + if ( $class_method->{ $method } ) { + # $class has $method + } =cut @@ -141,12 +146,13 @@ my $meta = $class->meta; my $attr; + my $methods; $attr->{$_}++ foreach $meta->get_attribute_list; - my @methods = grep { ! defined($attr->{$_}) } $meta->get_method_list; + my @methods = map { $methods->{$_}++; $_ } grep { ! defined($attr->{$_}) && $_ ne 'meta' } $meta->get_method_list; warn "# methods = ",dump( @methods ) if $self->debug; - return @methods; + return @methods if wantarray; + return $methods; } - 1;