in reply to Dancer 2 yaml config file
Can anyone spot what I'm doing wrong?
looks like you're using yaml instead of code, and its tricking your mind, see https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Config.pod#MANIPULATING-SETTINGS-VIA-CODE
Config is a hash, a hash of hashes, meaning there is only one %engines, there can be only one engines
{ 'engines' => { 'template' => { 'template_toolkit' => { 'start_tag' => '<%', 'end_tag' => '%>', }, }, 'session' => { 'DBIC' => { 'user' => '', 'pass' => '', ... }, }, }, 'template' => 'template_toolkit', 'session' => 'DBIC', ... }
IMHO, this is one of those pitfalls that shouldn't exist :) Dancer provides so many conveniences, why not a reminder that key are colliding/being clobbered
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dancer 2 yaml config file (is a hash of hashes ... key collision/clobbering is a common pitfall)
by soundX (Acolyte) on Feb 09, 2015 at 18:25 UTC |