[Dancer-users] Template engines
Oleg A. Mamontov
oleg at mamontov.net
Wed Feb 16 22:01:08 CET 2011
On Feb 16, 2011, at 11:51 PM, Oleg A. Mamontov wrote:
>
> On Feb 16, 2011, at 11:22 PM, Marco Fontani wrote:
>
>>> But after several unsuccessful attempts to use it i realized one simple thing:
>>> Dancer idea of template engine is not compatible with Text::Xslate fundamentally.
>>
>> Not true. See below.
>>
>>> Unfortunately I have no good ideas on how to combine Dancer with Text::Xslate
>>> but I feel that this should be done :)
>>
>> I use Dancer with Xslate templates for my blog:
>> https://github.com/mfontani/Brocco
>>
>> config.yml change needed (a hack really):
>>
>> engines:
>> xslate:
>> cache_dir: "/tmp/wherever"
>> cache: 1
>> path:
>> - /
>> - ./views
>>
>> The "path" is the important bit:
>> - needs / so that the files that are given by full path can work
>> - needs views/ since the main layout path is given relative to that
>>
>> Hope you can now enjoy Xslate and Dancer both :)
>
> Include '/' in search path??
> This kind of `solution` i tried the first thing.
> I'm sure it will not recommend to anyone.
>
> PS: Now turn on 'auto_page' and 'GET /etc/passwd HTTP/1.0\r\n\r\n' ;)
Sorry, i hurried with wrong 'auto_page' example.
Anyway, i think, that '/' in search path is too risky.
>
>>
>> -marco-
>>
>> --
>> Marco Fontani
>> Glasgow Perl Mongers - http://glasgow.pm.org/
>> Join the RackSpace Cloud at: http://www.rackspacecloud.com/277.html
>
>
> --
> Cheers,
> Oleg A. Mamontov
>
> mailto: oleg at mamontov.net
>
> jabber: lonerr at charla.mamontov.net
> icq uin: 79-521-617
> cell: +7-903-798-1352
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
--
Cheers,
Oleg A. Mamontov
mailto: oleg at mamontov.net
jabber: lonerr at charla.mamontov.net
icq uin: 79-521-617
cell: +7-903-798-1352
More information about the Dancer-users
mailing list