Dancer 1.3118 and Template Toolkit

I just got caught by a change in Dancer 1.3118 and so I thought I’d share with you. As of 1.3118 Dancer no longer sets default variables for template toolkit if you subclass it. You’ll want to add these variables to your config.yml file in the engines template_toolkit section:

ABSOLUTE : 1

ANYCASE : 1

INCLUDE_PATH : /path/to/views

These variables all used to be set automatically, but when you upgrade you’ll get this error: 

absolute paths are not allowed (set ABSOLUTE option)

[From my blog.]

Leave a comment

About JT Smith

user-pic My little part in the greater Perl world.