--- trunk/lib/Frey/ClassLoader.pm 2008/12/02 18:57:11 686 +++ trunk/lib/Frey/Class/Loader.pm 2009/06/30 15:10:55 1133 @@ -1,4 +1,4 @@ -package Frey::ClassLoader; +package Frey::Class::Loader; use Moose; =head1 DESCRIPTION @@ -65,8 +65,10 @@ $path = $INC{$path}; warn "# $class from INC $path"; $class_path->{$class} = $path; + } elsif ( $path =~ s{\.pm$}{} && -e "lib/${path}.pod" ) { + return "lib/${path}.pod"; } else { - confess "can't find path for $class"; + confess "can't find $class at $path"; } } return $class_path->{$class}; @@ -170,9 +172,11 @@ =cut +sub class_runnable_re { m{^as_} || m{_as_} || m{sql} } + sub class_runnable { my ( $self, $class ) = @_; - my @methods = grep { m{^as_} || m{_as_} } $self->class_methods( $class ); + my @methods = grep { class_runnable_re } $self->class_methods( $class ); return @methods if wantarray; return \@methods; } @@ -212,6 +216,8 @@ my ($self) = @_; $self->sponge; } + + no Moose::Role; } our $syntax_checked_last; @@ -259,4 +265,7 @@ return $instance; } +__PACKAGE__->meta->make_immutable; +no Moose; + 1;