[dancer-users] New Dancer2 releases: 0.162000 ... 0.166000!

Warren Young wyml at etr-usa.com
Wed Jan 13 20:23:48 GMT 2016


On Jan 13, 2016, at 7:30 AM, John Stoffel <john at stoffel.org> wrote:
> 
> Sawyer> What do you think should be our next major focus? Would you like to
> Sawyer> help? Let us know!
> 
> I'd love to see expanded skeletons

Long ago, I proposed that dancer2 be expanded to understand all of the available template engines.  The current version is hard-coded for Template::Toolkit, which means playing with a different one means you have to understand both it *and* the template engine you actually want to use, so you can translate the generated code.

This is less trivial than it sounds.  For instance, from views/layouts/main.tt:

  <meta charset="<% settings.charset %>">

needs to be changed to this for Xslate:

  <meta charset="<: $settings.charset :>”>

The obvious change is the bracket style, but how much user brainpower is wasted figuring out that you need $ in the second case?  It threw me for a while, at least!

The fix is fundamentally simple: add something like “-t xslate” which selects a different set of skeleton files.  Then all that’s needed is for someone to manually translate the standard version for each template engine.

Incidentally, I notice that the initially hidden box underneath “About your application’s environment” in the app generated by dancer2 is missing two values.  It looks like perl_version and settings.apphandler were defined in D1 but aren’t in D2, but someone translated the code without checking for this regression.


More information about the dancer-users mailing list