/[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 1021 by dpavlin, Mon Jan 26 23:09:38 2009 UTC revision 1022 by dpavlin, Mon Jan 26 23:30:09 2009 UTC
# Line 277  sub as_markup { Line 277  sub as_markup {
277  #       $source =~ s{^.*<body[^>]+>}{}s;  #       $source =~ s{^.*<body[^>]+>}{}s;
278  #       $source =~ s{</body.*$}{}s;  #       $source =~ s{</body.*$}{}s;
279    
280          my $runnable = join("\n",          my $runnable = join("</dd><dd>",
281                  map {                  map {
282                          $introspect->{runnable}->{$_} = {};                          $introspect->{runnable}->{$_} = {};
283                          my $short = $_;                          my $short = $_;
# Line 285  sub as_markup { Line 285  sub as_markup {
285                          qq|<a target="$class" href="/$class/$_" title="/$class/$_">$short</a>|                          qq|<a target="$class" href="/$class/$_" title="/$class/$_">$short</a>|
286                  } $self->class_runnable( $class )                  } $self->class_runnable( $class )
287          );          );
288          $runnable = "Runnable: $runnable" if $runnable;          $runnable = "<dt>runnable</dt><dd>$runnable</dd>" if $runnable;
289    
290          my $has_tests = '';          my $has_tests = '';
291          my @tests = grep { defined $_ } $self->has_tests;          my @tests = grep { defined $_ } $self->has_tests;
292          if ( @tests ) {          if ( @tests ) {
293                  $has_tests =                  $has_tests
294                  'Test' . ( $#tests > 0 ? 's' : '' ) . ': ' .                              = qq|<dt>test|
295                  join("\n", map {                          . ( $#tests > 0 ? 's' : '' )
296                          qq|<a target="$class" href="/Frey::Test::Runner/as_markup?test=$_">$_</a>|                          . qq|<dt><dd>|
297                  } @tests );                          . join("</dd><dd>", map {
298                                    qq|<a target="$class" href="/Frey::Test::Runner/as_markup?test=$_">$_</a>|
299                            } @tests )
300                            . qq|</dd>|
301                            ;
302                  $introspect->{tests} = [ @tests ],                  $introspect->{tests} = [ @tests ],
303          }          }
304    
# Line 324  sub as_markup { Line 328  sub as_markup {
328                          top: 1em;                          top: 1em;
329                          right: 1em;                          right: 1em;
330                          z-index: 10;                          z-index: 10;
331                          background: #fff;                          background: #ffc;
332                          padding: 0.2em;                          padding: 0.5em;
333                          border: 1px dashed #ee8;                          width: 20%;
334                            font-size: 80%;
335                    }
336                    .right dl dd {
337                            margin-left: 1em;
338                  }                  }
339          |);          |);
340    
341          my $right = join('<br>',          my $right
342                  grep { $_ } (                  = qq|
343                          $runnable,                          <dl>
344                          $has_tests,                          $runnable
345                          join('&nbsp;',                          $has_tests
346                                  $pod    ? qq|<a class="frey-skip" style="float: left;" href="#___top" title="Skip to POD"    >pod</a>|    : '',                          </dl>
347                                  $source ? qq|<a class="frey-skip" style="float: right;" href="#source" title="Skip to source" >source</a>| : ''                  |
348                          )                  . join('&nbsp;',
349                            $pod    ? qq|<a class="frey-skip" style="float: left;" href="#___top" title="Skip to POD"    >pod</a>|    : '',
350                            $source ? qq|<a class="frey-skip" style="float: right;" href="#source" title="Skip to source" >source</a>| : ''
351                  )                  )
352          );                  ;
353    
354          return          return
355                  qq|                  qq|

Legend:
Removed from v.1021  
changed lines
  Added in v.1022

  ViewVC Help
Powered by ViewVC 1.1.26