/[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 434 by dpavlin, Wed Nov 19 01:21:31 2008 UTC revision 459 by dpavlin, Wed Nov 19 17:30:50 2008 UTC
# Line 15  has 'usage_on_top' => ( Line 15  has 'usage_on_top' => (
15          documentation => 'Show usage on top of list',          documentation => 'Show usage on top of list',
16  );  );
17    
18  sub markup {  sub as_markup {
19          my $self = shift;          my $self = shift;
20          my $row;          my $row;
21    
# Line 34  sub markup { Line 34  sub markup {
34                                  $html .= qq|<a href="/Frey-ObjectDesigner?class=$class">design</a>| if $class->can('collection');                                  $html .= qq|<a href="/Frey-ObjectDesigner?class=$class">design</a>| if $class->can('collection');
35                          }                          }
36                  }                  }
37                  my @run;  
38                  my @input;                  my @run = map {
39                            s{^as_}{};
40                            qq|<a href="/$class/as_$_" title="$class->as_$_">$_</a>|;
41                    } $self->class_runnable( $class );
42                  push @run, qq|<a href="/Frey-ObjectBrowser?class=$class">collection</a>| if $class->can('collection_table');                  push @run, qq|<a href="/Frey-ObjectBrowser?class=$class">collection</a>| if $class->can('collection_table');
43                  my $class_method = $self->class_methods( $class );  
44                  foreach my $try ( Frey::Run->runnable ) {                  my @inputs = $self->class_inputs( $class );
45                          next unless $class->can($try);  
                         if ( $class_method->{ $try } ) {  
                                 push @run, qq|<a href="/$class/$try">$try</a>|;  
                         } else {  
                                 push @input, $try;  
                         }  
                 }  
46                  $usage->{$class} ||= 0;                  $usage->{$class} ||= 0;
47                  $html                  $html
48                          .= qq|</td><td>|                          .= qq|</td><td>|
49                          . join(' ', @run)                          . join(' ', @run)
50                          . qq|</td><td>|                          . qq|</td><td>|
51                          . ( @input ? '&larr; ' . join(' ', @input) : '' )                          . ( @inputs ? '&larr; ' . join(' ', @inputs) : '' )
52                          . qq|</td><td>|                          . qq|</td><td>|
53                          . ( $usage->{$class} || '' )                          . ( $usage->{$class} || '' )
54                          . qq|</td></tr>|                          . qq|</td></tr>|

Legend:
Removed from v.434  
changed lines
  Added in v.459

  ViewVC Help
Powered by ViewVC 1.1.26