Dancer2 Basic YAML question
Hi All, I've put this into a config.yml file and it isn't working really at all and I'm guessing there is something basic going on that I don't know about. template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' session: Cookie engines: session: Cookie: secret_key: yoursecretpassphrase default_duration: 604800 When I put in the session: Cookie line after the template toolkit line, it gives me an error about not having a secret_key. When I put the section before it, it just return <% content %> on every page, presumably because something is failing after the cookie section or my .yml formatting is completely wrong... Can I please have some pointers as to where exactly I'm going wrong here? Thanks in advance, David
No guarantees, but try this: template: "template_toolkit" session: Cookie engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' session: Cookie: secret_key: yoursecretpassphrase default_duration: 604800 which in Perl speak is something like { engines => { template => ... , session => ...}, } as opposed to what you had which meant: { engines => { template => ... }, engines => { session => ... }, } where the second overwrites the first. Why it was the other way around in your example is a mystery to me though. Andrew On Wed, Aug 19, 2015 at 6:30 PM, David H <untg99@gmail.com> wrote:
Hi All,
I've put this into a config.yml file and it isn't working really at all and I'm guessing there is something basic going on that I don't know about.
template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
session: Cookie engines: session: Cookie: secret_key: yoursecretpassphrase default_duration: 604800
When I put in the session: Cookie line after the template toolkit line, it gives me an error about not having a secret_key. When I put the section before it, it just return <% content %> on every page, presumably because something is failing after the cookie section or my .yml formatting is completely wrong...
Can I please have some pointers as to where exactly I'm going wrong here?
Thanks in advance,
David
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Andrew Solomon Mentor@Geekuni http://geekuni.com/ http://www.linkedin.com/in/asolomon
participants (2)
-
Andrew Solomon -
David H