/[Frey]/trunk/lib/Frey/Class/Loader.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/Class/Loader.pm

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

trunk/lib/Frey/ClassLoader.pm revision 686 by dpavlin, Tue Dec 2 18:57:11 2008 UTC trunk/lib/Frey/Class/Loader.pm revision 1133 by dpavlin, Tue Jun 30 15:10:55 2009 UTC
# Line 1  Line 1 
1  package Frey::ClassLoader;  package Frey::Class::Loader;
2  use Moose;  use Moose;
3    
4  =head1 DESCRIPTION  =head1 DESCRIPTION
# Line 65  sub class_path { Line 65  sub class_path {
65                          $path = $INC{$path};                          $path = $INC{$path};
66                          warn "# $class from INC $path";                          warn "# $class from INC $path";
67                          $class_path->{$class} = $path;                          $class_path->{$class} = $path;
68                    } elsif ( $path =~ s{\.pm$}{} && -e "lib/${path}.pod" ) {
69                            return "lib/${path}.pod";
70                  } else {                  } else {
71                          confess "can't find path for $class";                          confess "can't find $class at $path";
72                  }                  }
73          }          }
74          return $class_path->{$class};          return $class_path->{$class};
# Line 170  sub class_methods { Line 172  sub class_methods {
172    
173  =cut  =cut
174    
175    sub class_runnable_re { m{^as_} || m{_as_} || m{sql} }
176    
177  sub class_runnable {  sub class_runnable {
178          my ( $self, $class ) = @_;          my ( $self, $class ) = @_;
179          my @methods = grep { m{^as_} || m{_as_} } $self->class_methods( $class );          my @methods = grep { class_runnable_re } $self->class_methods( $class );
180          return @methods if wantarray;          return @methods if wantarray;
181          return \@methods;          return \@methods;
182  }  }
# Line 212  It is used by L<Frey::Run> and L<Frey::P Line 216  It is used by L<Frey::Run> and L<Frey::P
216                  my ($self) = @_;                  my ($self) = @_;
217                  $self->sponge;                  $self->sponge;
218          }          }
219    
220            no Moose::Role;
221  }  }
222    
223  our $syntax_checked_last;  our $syntax_checked_last;
# Line 259  sub new_frey_class { Line 265  sub new_frey_class {
265          return $instance;          return $instance;
266  }  }
267    
268    __PACKAGE__->meta->make_immutable;
269    no Moose;
270    
271  1;  1;

Legend:
Removed from v.686  
changed lines
  Added in v.1133

  ViewVC Help
Powered by ViewVC 1.1.26