/[Frey]/trunk/lib/Frey/Introspect.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/Introspect.pm

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

revision 458 by dpavlin, Wed Nov 19 17:05:59 2008 UTC revision 501 by dpavlin, Mon Nov 24 21:36:01 2008 UTC
# Line 13  use PPI::HTML; Line 13  use PPI::HTML;
13    
14  use lib 'lib';  use lib 'lib';
15    
16  extends 'Frey::ClassLoader';  extends 'Frey::PPI';
17  with 'Frey::Web';  with 'Frey::Web';
18    
19  has 'class' => (  has 'class' => (
# Line 22  has 'class' => ( Line 22  has 'class' => (
22          required => 1,          required => 1,
23  );  );
24    
 has 'path' => (  
         is => 'rw',  
 );  
   
25  =head2 joose  =head2 joose
26    
27    my $js = $o->joose;    my $js = $o->joose;
# Line 98  sub joose { Line 94  sub joose {
94          my $path = "static/blib/$filename";          my $path = "static/blib/$filename";
95          write_file( $path, $out );          write_file( $path, $out );
96          warn "# created $path\n";          warn "# created $path\n";
         $self->path( $path );  
97    
98          return $out;          return $out;
99  }  }
# Line 231  sub as_markup { Line 226  sub as_markup {
226    
227          my $runnable = join("\n",          my $runnable = join("\n",
228                  map {                  map {
229                          qq|<a href="/$class/$_">$_</a>|                          qq|<a target="$_" href="/$class/$_">$_</a>|
230                  } $self->class_runnable( $class )                  } $self->class_runnable( $class )
231          );          );
232          $runnable = " runnable: $runnable" if $runnable;          $runnable = " runnable: $runnable" if $runnable;
233    
234          $self->title( $class );          $self->title( $class );
235    
236            my $has_tests = '';
237            if ( my @tests = $self->has_tests ) {
238                    $has_tests =
239                    '<br/>test' . ( $#tests > 0 ? 's' : '' ) . ': ' .      
240                    join("\n", map {
241                            qq|<a target="test" href="/Frey::Test::Runner?tests=$_">$_</a>|
242                    } @tests );
243            }
244    
245          return join("\n",          return join("\n",
246                  qq|<h1>$class</h1>|,                  qq|<h1>$class</h1>|,
247                  qq|<div class="frey-introspect">$superclasses\n$roles\n$runnable\n|,                  qq|<div class="frey-introspect">$superclasses\n$roles\n$runnable\n|,
248                  $pod    ? qq|<a class="frey-skip" href="#___top" title="Skip to POD"    >pod</a>|    : '',                  $pod    ? qq|<a class="frey-skip" href="#___top" title="Skip to POD"    >pod</a>|    : '',
249                  $source ? qq|<a class="frey-skip" href="#source" title="Skip to source" >source</a>| : '',                  $source ? qq|<a class="frey-skip" href="#source" title="Skip to source" >source</a>| : '',
250                    $has_tests,
251                  qq|$table\n$pod\n</div>\n|,                  qq|$table\n$pod\n</div>\n|,
252                  qq|<h1>Source</h1><a name="source"></a><div class="frey-source">$source</div>|,                  qq|<h1>Source</h1><a name="source"></a><div class="frey-source">$source</div>|,
253          );          );

Legend:
Removed from v.458  
changed lines
  Added in v.501

  ViewVC Help
Powered by ViewVC 1.1.26