soundX has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dancer 2 yaml config file (is a hash of hashes ... key collision/clobbering is a common pitfall)
by Anonymous Monk on Feb 09, 2015 at 00:42 UTC | |
by soundX (Acolyte) on Feb 09, 2015 at 18:25 UTC | |
|
Re: Dancer 2 yaml config file
by etherald (Novice) on Feb 08, 2015 at 23:46 UTC |