]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Render.pm
* Centralised all calls to HTML::Template and force all the templates
[git.ikiwiki.info.git] / IkiWiki / Render.pm
index 54e409040ad119b8e6adf9bba850dbf21a255090..3be8e1c53ff96973891c758875b93d9ac3cc2bfc 100644 (file)
@@ -25,11 +25,13 @@ sub htmlize ($$) { #{{{
        my $content=shift;
        
        if (! $INC{"/usr/bin/markdown"}) {
+               # Note: a proper perl module is available in Debian
+               # for markdown, but not upstream yet.
                no warnings 'once';
                $blosxom::version="is a proper perl module too much to ask?";
                use warnings 'all';
                do "/usr/bin/markdown";
-               use Encode;
+               require Encode;
        }
        
        if ($type eq '.mdwn') {
@@ -171,8 +173,7 @@ sub genpage ($$$) { #{{{
 
        my $title=pagetitle(basename($page));
        
-       my $template=HTML::Template->new(blind_cache => 1,
-               filename => "$config{templatedir}/page.tmpl");
+       my $template=template("page.tmpl", blind_cache => 1);
        my $actions=0;
 
        if (length $config{cgiurl}) {