--- trunk/lib/Frey/ClassBrowser.pm 2008/07/17 18:00:55 158
+++ trunk/lib/Frey/ClassBrowser.pm 2008/11/05 08:20:46 272
@@ -2,9 +2,9 @@
use Moose;
extends 'Frey';
-with 'Frey::Web';
use Frey::ClassLoader;
+use Frey::Run;
our $markup;
@@ -13,27 +13,23 @@
my $f = Frey::ClassLoader->new;
my $html;
foreach my $package ( $f->classes ) {
- $html .= qq|
$package | |;
+ $html .= qq| |
$package | |;
if ( $package->can('meta') ) {
if ( $package->meta->isa('Moose::Meta::Role') ) {
$html .= qq|role|;
} else {
- $html .= qq|design| if $package->can('collection');
+ $html .= qq|design| if $package->can('collection');
}
}
- $html .= qq| | |;
- $html .= qq|collection| if $package->can('collection_table');
- $html .= qq|markup| if $package->can('markup');
- $html .= qq| |
|;
+ my @inspect;
+ push @inspect, qq|collection| if $package->can('collection_table');
+ foreach my $try ( Frey::Run->execute ) {
+ push @inspect, qq|$try| if $package->can($try);
+ }
+ $html .= qq|| . join(' ', @inspect) . qq| | |;
}
$html = "" if $html;
$markup = $html;
}
-sub html {
- my ( $self, $req ) = @_;
- my $html = $self->page( body => qq|Classes
| . $self->markup );
- $req->print( $html );
-}
-
1;