[Dancer-users] config.yml options not visible to Dancer::Template::HtmlTemplate

GJ gj at freeshell.org
Sun Mar 18 19:45:41 CET 2012


On Sun, Mar 18, 2012 at 06:29:13PM +0000, Stephen Fenwick-Paul wrote:
> I'm not sure this is bug. I use Mason for template engine. I just pass
> config values into the template like any other value.
> 
> I use the before_template for passing in common stuff:
> 
> hook before_template_render => sub {
>   my ($tokens) = @_;
> 
>    $tokens->{fb_app_id} = config->{facebook}->{app_id};
> 
> }

I suspect that the Mason plugin behaviour is irrelevant unfortunately.  The
guts of the Template::Toolkit plugin for example, are completely different
than that of the HTML::Template one.

However, if what you write above is true, then what is the point of setting
the directives in config.yml, if the app cannot parse them in directly?

Thanks
GJ


More information about the Dancer-users mailing list