<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bug-reports</title><link>https://sourceforge.net/p/dotiac/bug-reports/</link><description>Recent changes to bug-reports</description><atom:link href="https://sourceforge.net/p/dotiac/bug-reports/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 06 Sep 2010 16:12:37 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/dotiac/bug-reports/feed.rss" rel="self" type="application/rss+xml"/><item><title>include/extend tags are relative from the current template</title><link>https://sourceforge.net/p/dotiac/bug-reports/6/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I found this bug by using the extend tag, but assuming it also effects include tag.&lt;/p&gt;
&lt;p&gt;When passing the file path to the extend tag, the path is always relative to the template that is currently being processed. This is problematic when rendering templates within sub directories of the template directory.&lt;/p&gt;
&lt;p&gt;An example&lt;br /&gt;
Consider the following directory structure:&lt;br /&gt;
- Templates&lt;br /&gt;
|-&amp;gt; layouts&lt;br /&gt;
|  main.html&lt;br /&gt;
|-&amp;gt; blog&lt;br /&gt;
|   entries.html&lt;br /&gt;
`&amp;gt; home.html&lt;/p&gt;
&lt;p&gt;When using Dotiac to parse home.html, home.html could use the extends tag to extend layouts/main.html:&lt;/p&gt;
&lt;p&gt;{% extends "layouts/main.html" %}&lt;/p&gt;
&lt;p&gt;However if you try and do this within blog/entries.html, it will not work because it will in fact try to use blog/layouts/main.html, which does not exist. In django the tags extend and include lookup the paths that they are passed relative to the template directories configured in TEMPLATE_DIRS. This list of directories could be @Dotiac::DTL::TEMPLATE_DIRS, since this is already used when using Dotiac in a django fashion (exported Template and Context).&lt;/p&gt;
&lt;p&gt;I have included a svn diff of the changes I have made locally and the test I wrote for it in the hope it helps.&lt;/p&gt;
&lt;p&gt;Some background:&lt;br /&gt;
I discovered this bug while trying to write a Dotiac renderer for Mojolicious. Mojolicious uses a single directory to store templates, which are typically organised in subfolders for each controller, which inherit from other templates. Currently this is (the simplified) version of that code:&lt;/p&gt;
&lt;p&gt;@Dotiac::DTL::TEMPLATE_DIRS = $config{template_paths};&lt;br /&gt;
my $template = Dotiac::DTL::Template($template_name);&lt;br /&gt;
my $context = Dotiac::DTL::Context({%{$c-&amp;gt;stash}, c =&amp;gt; $c, h =&amp;gt; $helper});&lt;br /&gt;
$$output = $template-&amp;gt;render($context);&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben</dc:creator><pubDate>Mon, 06 Sep 2010 16:12:37 -0000</pubDate><guid>https://sourceforge.net2f6d148d1f0d5b120e2d70497a82c4bd201a7118</guid></item><item><title>Dokumentation Bug</title><link>https://sourceforge.net/p/dotiac/bug-reports/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In section Extension of Dotiac::DTL -&amp;gt; Filters of the main pod the example uses the old syntax.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 11 Jan 2010 11:24:40 -0000</pubDate><guid>https://sourceforge.netca4bbaa791a2787cfb1aea0c78461af78065878e</guid></item><item><title>get_variables() with multiple empty keywords</title><link>https://sourceforge.net/p/dotiac/bug-reports/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;get_variables() does not work right on multiple allowed empty keywords:&lt;/p&gt;
&lt;p&gt;{Dotiac::DTL::get_variables("loop foo bar","bar","foo");}&lt;br /&gt;
is &lt;br /&gt;
{&lt;br /&gt;
"" =&amp;gt; [&lt;br /&gt;
"loop"&lt;br /&gt;
],&lt;br /&gt;
"foo" =&amp;gt; [&lt;br /&gt;
"bar"&lt;br /&gt;
]&lt;br /&gt;
};&lt;br /&gt;
not &lt;br /&gt;
{&lt;br /&gt;
"" =&amp;gt; [&lt;br /&gt;
"loop"&lt;br /&gt;
],&lt;br /&gt;
"foo" =&amp;gt; [],&lt;br /&gt;
"bar" = &amp;gt; []         &lt;br /&gt;
};&lt;br /&gt;
as it should be.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Maluku</dc:creator><pubDate>Thu, 05 Feb 2009 18:42:15 -0000</pubDate><guid>https://sourceforge.net4155afdae5c2885fefb25d795212868caaf0025c</guid></item><item><title>Does not work with perl 5.6.2</title><link>https://sourceforge.net/p/dotiac/bug-reports/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Fails for various reasons, most of which got to do with time related stuff or wrong modules loaded.&lt;/p&gt;
&lt;p&gt;See CPAN-testers&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Maluku</dc:creator><pubDate>Mon, 19 Jan 2009 00:19:22 -0000</pubDate><guid>https://sourceforge.net74634e80aead66356ff3058028673674b824b1dc</guid></item><item><title>get_variables() warns on undef</title><link>https://sourceforge.net/p/dotiac/bug-reports/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;get_variables() should check for undef as $x, otherwise it will generate useless warnings.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Maluku</dc:creator><pubDate>Fri, 16 Jan 2009 23:24:20 -0000</pubDate><guid>https://sourceforge.net69e82687b4d89633fc59b1bd935955e71b7fc988</guid></item><item><title>$escape in filter.pm</title><link>https://sourceforge.net/p/dotiac/bug-reports/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;$escape is used instead of a 0 for the autoescape status in filter.pm's print() and string(), but the template-content should always be safe.&lt;/p&gt;
&lt;p&gt;It's done right in perlprint() and perlstring()&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Maluku</dc:creator><pubDate>Fri, 16 Jan 2009 23:03:38 -0000</pubDate><guid>https://sourceforge.net3ac797e4bf47411f31b806b86c4e2a0a7702a877</guid></item></channel></rss>