| 1 | use common::sense; | ||
| 2 | use File::Basename; | ||
| 3 | use Data::Dump 'pp'; | ||
| 4 | |||
| 5 | # archive list | ||
| 6 | sub { | ||
| 7 | my ($self) = @_; | ||
| 8 | my $v = $self->v; | ||
| 9 | my $tt = $self->env->{tt}; | ||
| 10 | my $storage = $self->env->{storage}; | ||
| 11 | my $template; | ||
| 12 | my ($file, $dir, $suffix) = fileparse(__FILE__, '.pl'); | ||
| 13 | $template = $file; | ||
| 14 | $template =~ s/\d+_//; | ||
| 15 | $template .= ".html"; | ||
| 16 | my $out; | ||
| 17 | |||
| 18 | $v->{archives} = [ $storage->archives() ]; | ||
| 19 | $tt->process($template, $v, \$out); | ||
| 20 | $out; | ||
| 21 | } |