10 |
template status => sub { |
template status => sub { |
11 |
my ( $self ) = @_; |
my ( $self ) = @_; |
12 |
p { 'Welcome to Frey' } |
p { 'Welcome to Frey' } |
13 |
h1 { 'Available templates' } |
h1 { 'Available templates' }; |
14 |
|
my $templates = Template::Declare->templates; |
15 |
|
warn "templates = ",dump( $templates ); |
16 |
|
ul { |
17 |
|
foreach my $pkg ( keys %$templates ) { |
18 |
|
li { |
19 |
|
outs $pkg; |
20 |
|
ul { |
21 |
|
foreach my $template ( @{ $templates->{$pkg} } ) { |
22 |
|
li { |
23 |
|
a { |
24 |
|
{ href is "/$pkg/$template" } |
25 |
|
$template |
26 |
|
} |
27 |
|
} |
28 |
|
} |
29 |
|
} |
30 |
|
} |
31 |
|
} |
32 |
|
} |
33 |
pre { |
pre { |
34 |
{ class is 'debug' } |
{ class is 'debug' } |
35 |
outs dump( Template::Declare->templates ) |
outs dump( Template::Declare->templates ) |
36 |
} |
} |
37 |
}; |
}; |
38 |
|
|
39 |
|
template 'refresh_modules' => sub { |
40 |
|
Module::Refresh->refresh; |
41 |
|
p { 'Modules refreshed' } |
42 |
|
}; |
43 |
|
|
44 |
1; |
1; |