Hi Everyone, Playing with Dancer, I was trying to have it automatically render templates by name.
I can make it work by doing the following, but was wondering if anyone has a
better way.
find( sub {
return if ! /[.]tt$/;
my $path = $1 if $File::Find::name =~ m{[.]/views(.*)[.]tt$};
get $path => sub {
template $path;
};
}, './views');
dance;
Cheers,
Ynon
_______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
