253 |
|
|
254 |
my $path = $self->class_path( $class ); |
my $path = $self->class_path( $class ); |
255 |
|
|
256 |
my $pod = Frey::Pod->new( class => $class, request_url => $self->request_url )->as_markup; |
my ( $pod_toc, $pod ) = Frey::Pod->new( class => $class, request_url => $self->request_url )->as_markup; |
257 |
return $pod if $path =~ m{\.pod}; |
return $pod_toc . $pod if $path =~ m{\.pod}; |
258 |
|
|
259 |
|
warn "# ", $pod_toc ? 'toc' : '', ' ', $pod ? 'pod' : ''; |
260 |
|
|
261 |
my $Document = PPI::Document->new( $path ); |
my $Document = PPI::Document->new( $path ); |
262 |
|
|
290 |
$runnable = "<dt>runnable</dt><dd>$runnable</dd>" if $runnable; |
$runnable = "<dt>runnable</dt><dd>$runnable</dd>" if $runnable; |
291 |
|
|
292 |
my $has_tests = ''; |
my $has_tests = ''; |
293 |
my @tests = grep { defined $_ } $self->has_tests; |
my @tests = sort { lc($a) cmp lc($b) } grep { defined $_ } $self->has_tests; |
294 |
if ( @tests ) { |
if ( @tests ) { |
295 |
$has_tests |
$has_tests |
296 |
= qq|<dt>test| |
= qq|<dt>test| |
325 |
$self->store( $introspect_path, $introspect ); |
$self->store( $introspect_path, $introspect ); |
326 |
|
|
327 |
$self->add_css(qq| |
$self->add_css(qq| |
328 |
.right { |
.frey-introspect-right { |
329 |
position: fixed; |
position: fixed; |
330 |
top: 1em; |
top: 1em; |
331 |
right: 1em; |
right: 1em; |
335 |
width: 20%; |
width: 20%; |
336 |
font-size: 80%; |
font-size: 80%; |
337 |
} |
} |
338 |
.right dl dd { |
.frey-introspect-right dl dd { |
339 |
margin-left: 1em; |
margin-left: 1em; |
340 |
} |
} |
341 |
|
|
342 |
|
/* fix pod */ |
343 |
|
.frey-introspect-right dd ul { |
344 |
|
padding-left: 0; |
345 |
|
} |
346 |
|
.frey-introspect-right dl ul > li { |
347 |
|
list-style: none; |
348 |
|
} |
349 |
|); |
|); |
350 |
|
|
351 |
my $right |
my $has_pod = qq| |
352 |
= qq| |
<dt><a href="#___top" title="Skip to POD">pod</a></dt> |
353 |
<dl> |
<dd>$pod_toc</dd> |
354 |
$runnable |
| if $pod_toc; |
355 |
$has_tests |
|
356 |
</dl> |
my $has_source = qq| |
357 |
| |
<dt><a href="#source" title="Skip to source">source</a></dt> |
358 |
. join(' ', |
| if $source; |
359 |
$pod ? qq|<a class="frey-skip" style="float: left;" href="#___top" title="Skip to POD" >pod</a>| : '', |
|
360 |
$source ? qq|<a class="frey-skip" style="float: right;" href="#source" title="Skip to source" >source</a>| : '' |
my $right = qq| |
361 |
) |
<dl> |
362 |
; |
$runnable |
363 |
|
$has_tests |
364 |
|
$has_pod |
365 |
|
$has_source |
366 |
|
</dl> |
367 |
|
|; |
368 |
|
|
369 |
|
|
370 |
return |
return |
371 |
qq| |
qq| |
374 |
$superclasses $roles |
$superclasses $roles |
375 |
<br>$includes |
<br>$includes |
376 |
</div> |
</div> |
377 |
<div class="right"> |
<div class="frey-introspect-right"> |
378 |
$right |
$right |
379 |
</div> |
</div> |
380 |
$table |
$table |