[dancer-users] Question on MongoDB and Dancer
Scott H
scott.harpster at gmail.com
Wed Oct 18 16:44:52 BST 2017
Here is what I had to do, i was pulling from elasticsearch same issue as
you, after a few hours i humbled myself and went on to irc perl help
channel and someone mentioned the private variables not displaying, dangit
how dumb.
Here is my yaml config file for dancer2, the show_private_variables will
allow _var's to work.
template: "template_toolkit"
engines:
template:
template_toolkit:
start_tag: '[%'
end_tag: '%]'
show_private_variables: true;
On Wed, Oct 18, 2017 at 4:04 AM, Richard Jones <ra.jones at dpw.clara.co.uk>
wrote:
> On 18/10/2017 10:42, Russell Jenkins wrote:
>
> On 18/10/17 8:13 pm, Richard Jones wrote:
>
> I've been caught by that before. Try [% entries.$id.item('_id') %]. For
> some reason (would interested to learn what), TT doesn't seem to be able to
> cope with leading underscores in data structures.
>
>
> That's documented in Template::Manual::Variables, which states
>
> > Any key in a hash which starts with a '_' or '.' character will be
> considered private ...
>
>
>
> Thanks Russell, that's exactly it. Obviously I didn't RTFM (or had
> forgotten I'd done it eons ago).
>
> --
> Richard Jones
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20171018/0d1cc54d/attachment.html>
More information about the dancer-users
mailing list