149 |
if ( $class->get_attribute_list ) { |
if ( $class->get_attribute_list ) { |
150 |
@attributes = map { |
@attributes = map { |
151 |
my $attr = $class->get_attribute($_); |
my $attr = $class->get_attribute($_); |
152 |
# warn "## $_ ", $attr->is_required ? 'required' : 'optional'; |
my ( $before, $title, $after ) = ( '', '', '' ); |
153 |
qq|<td><a href="/~/$package/$_?">$_</a></td><td>| . |
( $before, $title, $after ) = ( '<b>', ' title="required"', '</b>' ) if $attr->is_required; |
154 |
( $attr->is_required ? ' <b>required</b>' : '' ) . |
qq|<td>$before<a href="/~/$package/$_?"$title>$_</a>$after</td>| |
|
qq|</td>|; |
|
155 |
} sort $class->get_attribute_list |
} sort $class->get_attribute_list |
156 |
} |
} |
157 |
|
|
182 |
#grep { $_ ne 'Moose::Object' } |
#grep { $_ ne 'Moose::Object' } |
183 |
$meta->superclasses |
$meta->superclasses |
184 |
) if ! $is_role && $meta->superclasses; |
) if ! $is_role && $meta->superclasses; |
185 |
|
|
186 |
|
my $pod = Frey::Pod->new( class => $package )->markup; |
187 |
|
|
188 |
my $html = $self->page( |
my $html = $self->page( |
189 |
title => "Introspect $package", |
title => "Introspect $package", |
190 |
body => "<h1>$package</h1>$superclasses\n$table\n$classes", |
body => qq|<h1>$package</h1>| |
191 |
|
. ( $pod ? qq|<a href="#___top" title="Skip to POD" style="font-size: 80%; color: #aaa;">↓pod&darr</a> | : '' ) |
192 |
|
. qq|$superclasses\n$table\n$pod\n$classes|, |
193 |
|
|
194 |
); |
); |
195 |
|
|
196 |
$request->print($html); |
$request->print($html); |