129 |
|
|
130 |
=head1 OUTPUT GENERATION |
=head1 OUTPUT GENERATION |
131 |
|
|
132 |
=head2 html |
=head2 request |
133 |
|
|
134 |
$o->html( $request ); |
$o->request( $request ); |
135 |
|
|
136 |
=cut |
=cut |
137 |
|
|
138 |
sub html { |
sub request { |
139 |
my ( $self, $request ) = @_; |
my ( $self, $request ) = @_; |
140 |
|
|
141 |
$self->add_head( 'static/introspect.css' ); |
$self->add_head( 'static/introspect.css' ); |
147 |
my $package = $self->package; |
my $package = $self->package; |
148 |
|
|
149 |
my @methods; |
my @methods; |
150 |
@methods = map { qq|<td class="m"><tt>$_</tt></td>| } $self->methods; |
@methods = map { qq|<td class="m">$_</td>| } $self->methods; |
151 |
|
|
152 |
my @attributes; |
my @attributes; |
153 |
if ( $meta->get_attribute_list ) { |
if ( $meta->get_attribute_list ) { |
173 |
} |
} |
174 |
$after .= ' '; |
$after .= ' '; |
175 |
} |
} |
176 |
qq|<td class="a">$before<tt>$_</tt></td><td>$after</td>| |
qq|<td class="a">$before $_</td><td>$after</td>| |
177 |
} sort $meta->get_attribute_list |
} sort $meta->get_attribute_list |
178 |
} |
} |
179 |
|
|
215 |
|
|
216 |
my $pod = Frey::Pod->new( class => $package )->markup; |
my $pod = Frey::Pod->new( class => $package )->markup; |
217 |
|
|
218 |
|
use Frey::Run; |
219 |
|
my $execute = join("\n", map { qq|<a href="/$_/$package">$_</a>| } grep { $package->can($_) } Frey::Run->execute ); |
220 |
|
$execute = " execute: $execute" if $execute; |
221 |
|
|
222 |
my $html = $self->page( |
my $html = $self->page( |
223 |
title => "Introspect $package", |
title => "Introspect $package", |
224 |
body => qq|<h1>$package</h1>| |
body => qq|<h1>$package</h1>| |
225 |
. qq|$superclasses\n$roles\n| |
. qq|$superclasses\n$roles\n$execute\n| |
226 |
. ( $pod ? qq|<a href="#___top" title="Skip to POD" style="font-size: 80%; color: #aaa;">↓pod&darr</a>| : '' ) |
. ( $pod ? qq|<a href="#___top" title="Skip to POD" style="font-size: 80%; color: #aaa;">↓pod&darr</a>| : '' ) |
227 |
. qq|$table\n$pod|, |
. qq|$table\n$pod| |
228 |
|
|
229 |
); |
); |
230 |
|
|