<div dir="ltr">Hi Everyone,<br><br>Playing with Dancer, I was trying to have it automatically render templates by name.<br><br>I can make it work by doing the following, but was wondering if anyone has a better way.<br><br>
find( sub {<br> return if ! /[.]tt$/;<br><br> my $path = $1 if $File::Find::name =~ m{[.]/views(.*)[.]tt$};<br><br> get $path => sub {<br> template $path;<br> }; <br> }, './views');<br>
<br>dance;<br><br>Cheers,<br> Ynon<br><br></div>