/[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 426 by dpavlin, Tue Nov 18 16:54:10 2008 UTC revision 427 by dpavlin, Tue Nov 18 23:42:40 2008 UTC
# Line 6  with 'Frey::Web'; Line 6  with 'Frey::Web';
6    
7  use Frey::Run;  use Frey::Run;
8    
 our $markup;  
   
9  sub markup {  sub markup {
10          my $self = shift;          my $self = shift;
11          return $markup if $markup;          my @rows;
         my $html;  
12          foreach my $class ( $self->classes ) {          foreach my $class ( $self->classes ) {
13                  $html .= qq|<tr><td><a href="/$class" title="| . $self->class_path( $class ) . qq|">$class</a></td><td>|;                  my $html
14                            = qq|<tr><td><a href="/$class" title="|
15                            . $self->class_path( $class )
16                            . qq|">$class</a></td><td>|
17                            ;
18                  if ( $class->can('meta') ) {                  if ( $class->can('meta') ) {
19                          if ( $class->meta->isa('Moose::Meta::Role') ) {                          if ( $class->meta->isa('Moose::Meta::Role') ) {
20                                  $html .= qq|role|;                                  $html .= qq|role|;
# Line 33  sub markup { Line 34  sub markup {
34                                  push @input, $try;                                  push @input, $try;
35                          }                          }
36                  }                  }
37                  $html .= qq|</td><td>| . join(' ', @run) . qq|</td><td>| .                  $html
38                          ( @input ? '&larr; ' . join(' ', @input) : '' ) .                          .= qq|</td><td>|
39                          qq|</td></tr>|;                          . join(' ', @run)
40                            . qq|</td><td>|
41                            . ( @input ? '&larr; ' . join(' ', @input) : '' )
42                            . qq|</td></tr>|
43                            ;
44                    push @rows, $html if $html;
45          }          }
46          $html = "<table>$html</table>" if $html;          return qq|<table>| . join("\n", @rows) . qq|</table>| if @rows;
         $markup = $html;  
47  }  }
48    
49  1;  1;

Legend:
Removed from v.426  
changed lines
  Added in v.427

  ViewVC Help
Powered by ViewVC 1.1.26