/[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 602 by dpavlin, Fri Nov 28 19:19:46 2008 UTC revision 662 by dpavlin, Mon Dec 1 23:28:27 2008 UTC
# Line 11  use List::Util; Line 11  use List::Util;
11  use PPI;  use PPI;
12  use PPI::HTML;  use PPI::HTML;
13    
14    use Frey::Pod;
15    
16  use lib 'lib';  use lib 'lib';
17    
18  extends 'Frey::PPI';  extends 'Frey::PPI';
# Line 211  sub as_markup { Line 213  sub as_markup {
213          }          }
214          $table .= qq|</table>|;          $table .= qq|</table>|;
215    
216          my $pod = Frey::Pod->new( class => $class )->as_markup;          my $pod = Frey::Pod->new( class => $class, request_url => $self->request_url )->as_markup;
217          $pod = $pod->{body} if ref($pod);          $pod = $pod->{body} if ref($pod);
218    
219          my $path = $self->class_path( $class );          my $path = $self->class_path( $class );
# Line 239  sub as_markup { Line 241  sub as_markup {
241          my $runnable = join("\n",          my $runnable = join("\n",
242                  map {                  map {
243                          $introspect->{runnable}->{$_}++;                          $introspect->{runnable}->{$_}++;
244                          qq|<a target="$class" href="/$class/$_">$_</a>|                          my $short = $_;
245                            $short =~ s{_as_(?:markup|data|sponge)$}{};
246                            qq|<a target="$class" href="/$class/$_" title="/$class/$_">$short</a>|
247                  } $self->class_runnable( $class )                  } $self->class_runnable( $class )
248          );          );
249          $runnable = " runnable: $runnable" if $runnable;          $runnable = " runnable: $runnable" if $runnable;
# Line 249  sub as_markup { Line 253  sub as_markup {
253          $self->title( $class );          $self->title( $class );
254    
255          my $has_tests = '';          my $has_tests = '';
256          if ( my @tests = $self->has_tests ) {          my @tests = grep { defined $_ } $self->has_tests;
257            if ( @tests ) {
258                  $has_tests =                  $has_tests =
259                  '<br/>test' . ( $#tests > 0 ? 's' : '' ) . ': ' .                        '<br/>test' . ( $#tests > 0 ? 's' : '' ) . ': ' .      
260                  join("\n", map {                  join("\n", map {

Legend:
Removed from v.602  
changed lines
  Added in v.662

  ViewVC Help
Powered by ViewVC 1.1.26