On Thu, Feb 19, 2015 at 9:05 AM, Zahir Lalani <
[email protected]> wrote:

> > From: dancer-users [mailto:[email protected]] On Behalf Of
> > Andrew Beverley
> > Sent: 19 February 2015 13:59
> > To: Perl Dancer users mailing list
> > Subject: Re: [dancer-users] session dir
> >
> > On Thu, 2015-02-19 at 13:50 +0000, Zahir Lalani wrote:
> > > Ah! Do you mean this:
> > >
> > > template: "template_toolkit"
> > > engines:
> > >  template:
> > >   template_toolkit:
> > >     start_tag:  '<%'
> > >     end_tag:    '%>'
> > >     encoding:   'utf8'
> > >
> > > #
> > > # session management
> > > # YAML stores on disk
> > > session: YAML
> > > engines:
> > >   session:
> > >     YAML:
> > >       session_dir: /tmp/dancer-sessions
> > >
> > > so should I be combining the two engines entry as so?
> > >
> > > template: "template_toolkit"engines:
> > > session: YAML
> > > engines:
> > >  template:
> > >   template_toolkit:
> > >     start_tag:  '<%'
> > >     end_tag:    '%>'
> > >     encoding:   'utf8'
> > >   session:
> > >     YAML:
> > >       session_dir: /tmp/dancer-sessions
> >
> > Yes, exactly that ;-)
> >
> > Although make sure your "session" key is directly below the "template"
> > key
> >
>
> Perfect - amazed that its so sensitive to indentation! Very pythony :-)
>

Indeed!  I believe it was the Bard that first said "Oh what tangled webs we
weave, when first we labor to believe, that indentation should be syntax."

A simple route that prints a Dumper of your config can be a useful thing in
debugging this sort of issue.  (Or just a debug line like

debug Dumper(scalar config );

) can help with debugging this sort of thing.

mike

>
> Thx for the help all
>
> Z
> _______________________________________________
> dancer-users mailing list
> [email protected]
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to