27 |
|
|
28 |
sub method_link { |
sub method_link { |
29 |
my ( $pkg,$method ) = @_; |
my ( $pkg,$method ) = @_; |
30 |
|
my $url = "/$pkg/$method"; |
31 |
|
$url = $method if $method =~ m!^/!; |
32 |
a { |
a { |
33 |
{ href is "/$pkg/$method" } |
{ href is $url } |
34 |
outs $method |
outs $method |
35 |
} |
} |
36 |
} |
} |
49 |
template 'package-methods' => sub { |
template 'package-methods' => sub { |
50 |
my ( $self, $req, $package ) = @_; |
my ( $self, $req, $package ) = @_; |
51 |
$package ||= $req->param('package'); |
$package ||= $req->param('package'); |
52 |
my $templates = Template::Declare->templates->{ $package } or die "no package $package\n"; |
my $methods = Template::Declare->templates->{ $package } or die "no package $package\n"; |
53 |
package_methods( $package, $templates ); |
package_methods( $package, $methods ); |
54 |
}; |
}; |
55 |
|
|
56 |
template 'templates' => sub { |
template 'templates' => sub { |
69 |
|
|
70 |
template 'classes' => sub { |
template 'classes' => sub { |
71 |
my $self = shift; |
my $self = shift; |
72 |
h1 { 'All classes in image' }; |
h1 { 'All packages in image' }; |
73 |
my $f = Frey->new; |
my $f = Frey->new; |
74 |
debug_dump( $f->classes ); |
debug_dump( $f->classes ); |
75 |
}; |
}; |
76 |
|
|
77 |
template 'error' => sub { |
template 'error' => sub { |
78 |
my ( $self, $req, $error ) = shift; |
my ( $self, $req, $error ) = @_; |
79 |
$error ||= dump( caller(1) ); |
$error ||= dump( caller(1) ); |
80 |
warn "## error: $error\n"; |
warn "## error: $error\n"; |
81 |
pre { |
pre { |