NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Dancer code could have been more concise (Score:1)
I would have put the template configuration in the config.yml configuration file. Or you could just use the default <% and %> start end tags in your templates. It wouldn't be the end of the world. I know that it is a matter of style and personal preference, but with a little white space formatting the dancer version could have been written more concisely like so:
#!/usr/bin/perl
use Dancer;
use Template;
use CPANDB { maxage => 3600 * 24 * 7 };
# Route blockget '/' => sub { template 'index' };
dance;
Reply to This