/[Frey]/trunk/lib/Frey/ClassLoader.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/ClassLoader.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 407 by dpavlin, Tue Nov 18 10:35:27 2008 UTC revision 408 by dpavlin, Tue Nov 18 12:55:32 2008 UTC
# Line 124  sub load_all_classes { Line 124  sub load_all_classes {
124          $loaded_class;          $loaded_class;
125  }  }
126    
127    =head2 class_methods
128    
129      my @methods = $o->class_methods( $class );
130    
131    =cut
132    
133    sub class_methods {
134            my ( $self, $class ) = @_;
135    
136            confess "need class" unless $class;
137            if ( ! $class->can('meta') ) {
138                    warn "$class doesn't have meta (isn't Moose class)";
139                    return;
140            }
141            my $meta = $class->meta;
142    
143            my $attr;
144            $attr->{$_}++ foreach $meta->get_attribute_list;
145            my @methods = grep { ! defined($attr->{$_}) } $meta->get_method_list;
146            warn "# methods = ",dump( @methods ) if $self->debug;
147    
148            return @methods;
149    }
150    
151    
152  1;  1;

Legend:
Removed from v.407  
changed lines
  Added in v.408

  ViewVC Help
Powered by ViewVC 1.1.26