/[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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 121 by dpavlin, Mon Jul 14 21:22:43 2008 UTC revision 144 by dpavlin, Wed Jul 16 16:03:09 2008 UTC
# Line 9  use Frey::ClassLoader; Line 9  use Frey::ClassLoader;
9  our $markup;  our $markup;
10    
11  sub markup {  sub markup {
12            return $markup if $markup;
13          my $f = Frey::ClassLoader->new;          my $f = Frey::ClassLoader->new;
14          my $classes = dom2html(          my $html;
15                  table => [          foreach my $package ( $f->classes ) {
16                          map {                  $html .= qq|<tr><td><a href="/~/$package" title="| . $f->package_path( $package ) . qq|">$package</a></td><td>|;
17                                  my $package = $_;                  if ( $package->can('meta') ) {
18                                  ( tr => [                          if ( $package->meta->isa('Moose::Meta::Role') ) {
19                                          td => [ a => { href => '/~/' . $package, title => $f->package_path( $package ) } => [ $package ] ],                                  $html .= qq|role|;
20                                          td => [                          } else {
21                                                  $package->can('meta') ?                                  $html .= qq|<a href="/od/$package">design</a>| if $package->can('collection');
22                                                          $package->meta->isa('Moose::Meta::Role') ? 'role' :                          }
23                                                          ( a => { href => '/od/' . $package } => [ 'design' ] ) :                  }
24                                                  ''                  $html .= qq|</td><td>|;
25                                          ],                  $html .= qq|<a href="/ob/$package">collection</a>| if $package->can('collection_table');
26                                          td => [ $package->can('collection_table') ? ( a => { href => '/ob/' . $package } => [ 'collection' ] ) : '' ],                  $html .= qq|</td></tr>|;
27                                  ] )          }
28                          } $f->classes          $html = "<table>$html</table>" if $html;
29                  ],          $markup = $html;
         );  
         $markup = $classes;  
30  }  }
31    
32  sub html {  sub html {

Legend:
Removed from v.121  
changed lines
  Added in v.144

  ViewVC Help
Powered by ViewVC 1.1.26