--- trunk/lib/Frey/Introspect.pm 2008/07/14 21:22:43 121 +++ trunk/lib/Frey/Introspect.pm 2008/07/15 14:56:28 134 @@ -149,10 +149,9 @@ if ( $class->get_attribute_list ) { @attributes = map { my $attr = $class->get_attribute($_); -# warn "## $_ ", $attr->is_required ? 'required' : 'optional'; - qq|$_| . - ( $attr->is_required ? ' required' : '' ) . - qq||; + my ( $before, $title, $after ) = ( '', '', '' ); + ( $before, $title, $after ) = ( '', ' title="required"', '' ) if $attr->can('is_required') && $attr->is_required; + qq|$before$_$after| } sort $class->get_attribute_list } @@ -174,9 +173,32 @@ warn "## css = ",dump( $self->css ); + my ( $superclasses, $roles ) = ( '', 'Role' ); + if ( ! $is_role ) { + if ( $meta->superclasses ) { + $superclasses = 'Superclasses: ' . + join(', ', + map { my $s = $_->meta->name; qq|$s| } + #grep { $_ ne 'Moose::Object' } + $meta->superclasses + ); + } + + if ( $meta->can('roles') ) { + $roles = join(', ', map { my $r = $_->name; qq|$r| } @{ $meta->roles } ); + $roles = " with roles: $roles" if $roles; + } + } + + my $pod = Frey::Pod->new( class => $package )->markup; + my $html = $self->page( title => "Introspect $package", - body => "

$package

\n$table\n$classes", + body => qq|

$package

| + . qq|$superclasses\n$roles\n| + . ( $pod ? qq|↓pod&darr| : '' ) + . qq|$table\n$pod\n$classes|, + ); $request->print($html);