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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 314 - (hide annotations)
Wed Nov 5 20:18:33 2008 UTC (15 years, 6 months ago) by dpavlin
File size: 940 byte(s)
rename execute to runnable which makes much more sense
1 dpavlin 119 package Frey::ClassBrowser;
2     use Moose;
3    
4 dpavlin 308 extends 'Frey::ClassLoader';
5 dpavlin 119
6 dpavlin 223 use Frey::Run;
7 dpavlin 119
8     our $markup;
9    
10 dpavlin 121 sub markup {
11 dpavlin 308 my $self = shift;
12 dpavlin 144 return $markup if $markup;
13     my $html;
14 dpavlin 308 foreach my $class ( $self->classes ) {
15     $html .= qq|<tr><td><a href="/$class" title="| . $self->class_path( $class ) . qq|">$class</a></td><td>|;
16     if ( $class->can('meta') ) {
17     if ( $class->meta->isa('Moose::Meta::Role') ) {
18 dpavlin 144 $html .= qq|role|;
19     } else {
20 dpavlin 308 $html .= qq|<a href="/Frey-ObjectDesigner?class=$class">design</a>| if $class->can('collection');
21 dpavlin 144 }
22     }
23 dpavlin 187 my @inspect;
24 dpavlin 308 push @inspect, qq|<a href="/Frey-ObjectBrowser?class=$class">collection</a>| if $class->can('collection_table');
25 dpavlin 314 foreach my $try ( Frey::Run->runnable ) {
26 dpavlin 308 push @inspect, qq|<a href="/$class/$try">$try</a>| if $class->can($try);
27 dpavlin 223 }
28 dpavlin 187 $html .= qq|</td><td>| . join('&nbsp;', @inspect) . qq|</td></tr>|;
29 dpavlin 144 }
30     $html = "<table>$html</table>" if $html;
31     $markup = $html;
32 dpavlin 119 }
33    
34     1;

  ViewVC Help
Powered by ViewVC 1.1.26