--- trunk/lib/Frey/ClassBrowser.pm 2008/11/05 08:20:46 272
+++ trunk/lib/Frey/ClassBrowser.pm 2008/11/05 19:13:01 308
@@ -1,30 +1,29 @@
package Frey::ClassBrowser;
use Moose;
-extends 'Frey';
+extends 'Frey::ClassLoader';
-use Frey::ClassLoader;
use Frey::Run;
our $markup;
sub markup {
+ my $self = shift;
return $markup if $markup;
- my $f = Frey::ClassLoader->new;
my $html;
- foreach my $package ( $f->classes ) {
- $html .= qq|
$package | |;
- if ( $package->can('meta') ) {
- if ( $package->meta->isa('Moose::Meta::Role') ) {
+ foreach my $class ( $self->classes ) {
+ $html .= qq| |
$class | |;
+ if ( $class->can('meta') ) {
+ if ( $class->meta->isa('Moose::Meta::Role') ) {
$html .= qq|role|;
} else {
- $html .= qq|design| if $package->can('collection');
+ $html .= qq|design| if $class->can('collection');
}
}
my @inspect;
- push @inspect, qq|collection| if $package->can('collection_table');
+ push @inspect, qq|collection| if $class->can('collection_table');
foreach my $try ( Frey::Run->execute ) {
- push @inspect, qq|$try| if $package->can($try);
+ push @inspect, qq|$try| if $class->can($try);
}
$html .= qq| | | . join(' ', @inspect) . qq| |
|;
}