/[Frey]/trunk/lib/Frey/ClassBrowser.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

Contents of /trunk/lib/Frey/ClassBrowser.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 119 - (show annotations)
Sun Jul 13 18:51:29 2008 UTC (15 years, 9 months ago) by dpavlin
File size: 743 byte(s)
split ClassBrowser into it's own package (class)
1 package Frey::ClassBrowser;
2 use Moose;
3
4 with 'Frey::Web';
5
6 use Frey::ClassLoader;
7
8 our $markup;
9
10 sub html_markup {
11 my $self = shift;
12 return $markup if $markup;
13 my $f = Frey::ClassLoader->new;
14 my $classes = dom2html(
15 table => [
16 map {
17 my $package = $_;
18 ( tr => [
19 td => [ a => { href => '/~/' . $package, title => $f->package_path( $package ) } => [ $package ] ],
20 td => [
21 $package->can('meta') ?
22 $package->meta->isa('Moose::Meta::Role') ? 'role' :
23 ( a => { href => '/od/' . $package } => [ 'design' ] ) :
24 ''
25 ],
26 td => [ $package->can('collection_table') ? ( a => { href => '/ob/' . $package } => [ 'collection' ] ) : '' ],
27 ] )
28 } $f->classes
29 ],
30 );
31 $markup = $classes;
32 }
33
34 1;

  ViewVC Help
Powered by ViewVC 1.1.26