126 |
|
|
127 |
=head2 class_methods |
=head2 class_methods |
128 |
|
|
129 |
my @methods = $o->class_methods( $class ); |
my @all_methods = $o->class_methods( $class ); |
130 |
|
|
131 |
|
my $class_method = $o->class_methods( $class ); |
132 |
|
if ( $class_method->{ $method } ) { |
133 |
|
# $class has $method |
134 |
|
} |
135 |
|
|
136 |
=cut |
=cut |
137 |
|
|
146 |
my $meta = $class->meta; |
my $meta = $class->meta; |
147 |
|
|
148 |
my $attr; |
my $attr; |
149 |
|
my $methods; |
150 |
$attr->{$_}++ foreach $meta->get_attribute_list; |
$attr->{$_}++ foreach $meta->get_attribute_list; |
151 |
my @methods = grep { ! defined($attr->{$_}) } $meta->get_method_list; |
my @methods = map { $methods->{$_}++; $_ } grep { ! defined($attr->{$_}) && $_ ne 'meta' } $meta->get_method_list; |
152 |
warn "# methods = ",dump( @methods ) if $self->debug; |
warn "# methods = ",dump( @methods ) if $self->debug; |
153 |
|
|
154 |
return @methods; |
return @methods if wantarray; |
155 |
|
return $methods; |
156 |
} |
} |
157 |
|
|
|
|
|
158 |
1; |
1; |