/[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 218 - (show annotations)
Fri Oct 31 22:48:45 2008 UTC (15 years, 5 months ago) by dpavlin
File size: 975 byte(s)
we don't really use Frey::Web role
1 package Frey::ClassBrowser;
2 use Moose;
3
4 extends 'Frey';
5
6 use Frey::ClassLoader;
7
8 our $markup;
9
10 sub markup {
11 return $markup if $markup;
12 my $f = Frey::ClassLoader->new;
13 my $html;
14 foreach my $package ( $f->classes ) {
15 $html .= qq|<tr><td><a href="/~/$package" title="| . $f->package_path( $package ) . qq|">$package</a></td><td>|;
16 if ( $package->can('meta') ) {
17 if ( $package->meta->isa('Moose::Meta::Role') ) {
18 $html .= qq|role|;
19 } else {
20 $html .= qq|<a href="/od/$package">design</a>| if $package->can('collection');
21 }
22 }
23 my @inspect;
24 push @inspect, qq|<a href="/ob/$package">collection</a>| if $package->can('collection_table');
25 push @inspect, qq|<a href="/markup/$package">markup</a>| if $package->can('markup');
26 push @inspect, qq|<a href="/request/$package">request</a>| if $package->can('request');
27 $html .= qq|</td><td>| . join('&nbsp;', @inspect) . qq|</td></tr>|;
28 }
29 $html = "<table>$html</table>" if $html;
30 $markup = $html;
31 }
32
33 1;

  ViewVC Help
Powered by ViewVC 1.1.26