--- trunk/lib/Frey/ClassBrowser.pm 2008/07/13 18:51:29 119 +++ trunk/lib/Frey/ClassBrowser.pm 2008/11/18 23:42:40 427 @@ -1,34 +1,49 @@ package Frey::ClassBrowser; use Moose; +extends 'Frey::ClassLoader'; with 'Frey::Web'; -use Frey::ClassLoader; +use Frey::Run; -our $markup; - -sub html_markup { +sub markup { my $self = shift; - return $markup if $markup; - my $f = Frey::ClassLoader->new; - my $classes = dom2html( - table => [ - map { - my $package = $_; - ( tr => [ - td => [ a => { href => '/~/' . $package, title => $f->package_path( $package ) } => [ $package ] ], - td => [ - $package->can('meta') ? - $package->meta->isa('Moose::Meta::Role') ? 'role' : - ( a => { href => '/od/' . $package } => [ 'design' ] ) : - '' - ], - td => [ $package->can('collection_table') ? ( a => { href => '/ob/' . $package } => [ 'collection' ] ) : '' ], - ] ) - } $f->classes - ], - ); - $markup = $classes; + my @rows; + foreach my $class ( $self->classes ) { + my $html + = qq|