108 |
my ( $meta, $is_role ) = $self->class_meta; |
my ( $meta, $is_role ) = $self->class_meta; |
109 |
|
|
110 |
my $class = $self->class; |
my $class = $self->class; |
111 |
|
$self->title( $class ); |
112 |
|
|
113 |
my $introspect_path = "var/introspect/$class.yaml"; |
my $introspect_path = "var/introspect/$class.yaml"; |
114 |
$self->mkbasepath( $introspect_path ); |
$self->mkbasepath( $introspect_path ); |
115 |
my $introspect = $self->load( $introspect_path ); |
my $introspect; # FIXME update with = $self->load( $introspect_path ); |
116 |
|
|
117 |
my ( $superclasses, $roles ) = ( '<b>Role</b>', '' ); |
my ( $superclasses, $roles ) = ( '<b>Role</b>', '' ); |
118 |
if ( ! $is_role ) { |
if ( ! $is_role ) { |
161 |
$introspect->{methods}->{$name} = {}; |
$introspect->{methods}->{$name} = {}; |
162 |
} |
} |
163 |
qq|<td class="m">$name</td>| |
qq|<td class="m">$name</td>| |
164 |
} sort $self->class_methods( $class ); |
} sort { |
165 |
|
lc($a) cmp lc($b) |
166 |
|
} $self->class_methods( $class ); |
167 |
|
|
168 |
my @attributes; |
my @attributes; |
169 |
if ( $meta->get_attribute_list ) { |
if ( $meta->get_attribute_list ) { |
204 |
$name .= qq|<sup title="$role_name">$nr</sup>|; |
$name .= qq|<sup title="$role_name">$nr</sup>|; |
205 |
} |
} |
206 |
|
|
207 |
eval { $properties = $attr->documentation . ' ' . $properties }; |
if ( my $doc = eval { $attr->documentation } ) { |
208 |
|
$properties = qq| |
209 |
|
$properties |
210 |
|
<span class="documentation">$doc</span> |
211 |
|
|; |
212 |
|
$self->add_css(qq| |
213 |
|
span.documentation { |
214 |
|
background: #eee; |
215 |
|
padding: 0.25em; |
216 |
|
float: left; |
217 |
|
clear: left; |
218 |
|
} |
219 |
|
|); |
220 |
|
$introspect->{action}->{$name}->{documentation} = $doc; |
221 |
|
} |
222 |
|
|
223 |
qq|<td class="a">$html_name</td><td class="t">$type</td><td>$properties</td>| |
qq|<td class="a">$html_name</td><td class="t">$type</td><td>$properties</td>| |
224 |
} sort $meta->get_attribute_list |
} sort $meta->get_attribute_list |
271 |
|
|
272 |
$self->store( $introspect_path, $introspect ); |
$self->store( $introspect_path, $introspect ); |
273 |
|
|
|
$self->title( $class ); |
|
|
|
|
274 |
my $has_tests = ''; |
my $has_tests = ''; |
275 |
my @tests = grep { defined $_ } $self->has_tests; |
my @tests = grep { defined $_ } $self->has_tests; |
276 |
if ( @tests ) { |
if ( @tests ) { |