So, after some tinkering I realsied that it actaully wasn't too hard to get my sessions into a postgresql database using Dancer2:Session:DBIC. I'm having an issue with my config.yml though, this is what I've got in my file at present:
This breaks template toolkit and I just get <% content %> where the HTML should be. If I replace the template toolkit block above with template: "template_toolkit" (uses the default tags [% %]) it works fine.appname: "xxxx" layout: "main" charset: "UTF-8" template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' session: "DBIC" engines: session: DBIC: dsn: "dbi:Pg:database=xxxx" schema_class: "xxxx::Schema" user: "" password: "" # resultset: "Session" id_column: "id" data_column: "data"
If I leave the template toolkit block as it is above and remove the session config block completely template toolkit works properly (with <% %> tags). I've tried swapping the config blocks around so that TT is after session, that gives me an Unable to create a new session: No schema class defined error. I've also tried playing around with the yaml formatting/spacing but I can't get them to play nicely. Can anyone spot what I'm doing wrong?
In reply to Dancer 2 yaml config file by soundX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |