13 |
|
|
14 |
use lib 'lib'; |
use lib 'lib'; |
15 |
|
|
16 |
extends 'Frey::ClassLoader'; |
extends 'Frey::PPI'; |
17 |
with 'Frey::Web'; |
with 'Frey::Web'; |
18 |
|
|
19 |
has 'class' => ( |
has 'class' => ( |
22 |
required => 1, |
required => 1, |
23 |
); |
); |
24 |
|
|
|
has 'path' => ( |
|
|
is => 'rw', |
|
|
); |
|
|
|
|
25 |
=head2 joose |
=head2 joose |
26 |
|
|
27 |
my $js = $o->joose; |
my $js = $o->joose; |
94 |
my $path = "static/blib/$filename"; |
my $path = "static/blib/$filename"; |
95 |
write_file( $path, $out ); |
write_file( $path, $out ); |
96 |
warn "# created $path\n"; |
warn "# created $path\n"; |
|
$self->path( $path ); |
|
97 |
|
|
98 |
return $out; |
return $out; |
99 |
} |
} |
225 |
|
|
226 |
|
|
227 |
my $runnable = join("\n", |
my $runnable = join("\n", |
228 |
map { qq|<a href="/$class/$_">$_</a>| : '' } $self->class_runnable( $class ); |
map { |
229 |
|
qq|<a target="$_" href="/$class/$_">$_</a>| |
230 |
|
} $self->class_runnable( $class ) |
231 |
); |
); |
232 |
$runnable = " runnable: $runnable" if $runnable; |
$runnable = " runnable: $runnable" if $runnable; |
233 |
|
|
234 |
$self->title( $class ); |
$self->title( $class ); |
235 |
|
|
236 |
|
my $has_tests = ''; |
237 |
|
if ( my @tests = $self->has_tests ) { |
238 |
|
$has_tests = |
239 |
|
'<br/>test' . ( $#tests > 0 ? 's' : '' ) . ': ' . |
240 |
|
join("\n", map { |
241 |
|
qq|<a target="test" href="/Frey::Test::Runner?tests=$_">$_</a>| |
242 |
|
} @tests ); |
243 |
|
} |
244 |
|
|
245 |
return join("\n", |
return join("\n", |
246 |
qq|<h1>$class</h1>|, |
qq|<h1>$class</h1>|, |
247 |
qq|<div class="frey-introspect">$superclasses\n$roles\n$runnable\n|, |
qq|<div class="frey-introspect">$superclasses\n$roles\n$runnable\n|, |
248 |
$pod ? qq|<a class="frey-skip" href="#___top" title="Skip to POD" >pod</a>| : '', |
$pod ? qq|<a class="frey-skip" href="#___top" title="Skip to POD" >pod</a>| : '', |
249 |
$source ? qq|<a class="frey-skip" href="#source" title="Skip to source" >source</a>| : '', |
$source ? qq|<a class="frey-skip" href="#source" title="Skip to source" >source</a>| : '', |
250 |
|
$has_tests, |
251 |
qq|$table\n$pod\n</div>\n|, |
qq|$table\n$pod\n</div>\n|, |
252 |
qq|<h1>Source</h1><a name="source"></a><div class="frey-source">$source</div>|, |
qq|<h1>Source</h1><a name="source"></a><div class="frey-source">$source</div>|, |
253 |
); |
); |