Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dancer CPAN distribution.

Report information
The Basics
Id: 57077
Status: new
Priority: 0/
Queue: Dancer

People
Owner: Nobody in particular
Requestors: stephane [...] shimaore.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.176
Fixed in: (no value)



Subject: propagate all TT config entries from Dancer's configuration to TT's
Per discussion on dancer-users list[1]. This applies especially to INCLUDE_PATH which is currently overridden unconditionally. At least two possible approaches: 1. Simply replace $tt_config->{INCLUDE_PATH} = setting('views'); with $tt_config->{INCLUDE_PATH} ||= setting('views'); in Dancer::Template::TemplateToolkit 2. Prepend setting('views') to an INCLUDE_PATH provided by the user. In this case the code is more complicated (INCLUDE_PATH may be a scalar or an array) and along the lines of: if($tt_config->{INCLUDE_PATH}) { if(ref($tt_config->{INCLUDE_PATH}) eq 'ARRAY') { unshift @{$tt_config->{INCLUDE_PATH}}, setting('views'); } else { $tt_config->{INCLUDE_PATH} = [setting('views'),$tt_config->{INCLUDE_PATH}]; } } else { $tt_config->{INCLUDE_PATH} = setting('views'); } [1] http://lists.perldancer.org/pipermail/dancer-users/2010-April/000112.html