--- trunk/lib/Frey/Introspect.pm 2009/02/03 20:55:45 1033
+++ trunk/lib/Frey/Introspect.pm 2009/02/03 21:24:02 1034
@@ -253,8 +253,10 @@
my $path = $self->class_path( $class );
- my $pod = Frey::Pod->new( class => $class, request_url => $self->request_url )->as_markup;
- return $pod if $path =~ m{\.pod};
+ my ( $pod_toc, $pod ) = Frey::Pod->new( class => $class, request_url => $self->request_url )->as_markup;
+ return $pod_toc . $pod if $path =~ m{\.pod};
+
+ warn "# ", $pod_toc ? 'toc' : '', ' ', $pod ? 'pod' : '';
my $Document = PPI::Document->new( $path );
@@ -288,7 +290,7 @@
$runnable = "
runnable$runnable" if $runnable;
my $has_tests = '';
- my @tests = grep { defined $_ } $self->has_tests;
+ my @tests = sort { lc($a) cmp lc($b) } grep { defined $_ } $self->has_tests;
if ( @tests ) {
$has_tests
= qq|test|
@@ -323,7 +325,7 @@
$self->store( $introspect_path, $introspect );
$self->add_css(qq|
- .right {
+ .frey-introspect-right {
position: fixed;
top: 1em;
right: 1em;
@@ -333,23 +335,37 @@
width: 20%;
font-size: 80%;
}
- .right dl dd {
+ .frey-introspect-right dl dd {
margin-left: 1em;
}
+
+ /* fix pod */
+ .frey-introspect-right dd ul {
+ padding-left: 0;
+ }
+ .frey-introspect-right dl ul > li {
+ list-style: none;
+ }
|);
- my $right
- = qq|
-
- $runnable
- $has_tests
-
- |
- . join(' ',
- $pod ? qq|pod| : '',
- $source ? qq|source| : ''
- )
- ;
+ my $has_pod = qq|
+ pod
+ $pod_toc
+ | if $pod_toc;
+
+ my $has_source = qq|
+ source
+ | if $source;
+
+ my $right = qq|
+
+ $runnable
+ $has_tests
+ $has_pod
+ $has_source
+
+ |;
+
return
qq|
@@ -358,7 +374,7 @@
$superclasses $roles
$includes
-