use Exporter q{import};
our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match
bestlink htmllink readfile writefile pagetype srcfile pagename
+ displaytime
%config %links %renderedfiles %pagesources);
our $VERSION = 1.00;
sub abs2rel ($$) { #{{{
# Work around very innefficient behavior in File::Spec if abs2rel
# is passed two relative paths. It's much faster if paths are
- # absolute!
+ # absolute! (Debian bug #376658)
my $path="/".shift;
my $base="/".shift;
HTML::Template->new(template_params(@_));
} #}}}
-sub misctemplate ($$) { #{{{
+sub misctemplate ($$;@) { #{{{
my $title=shift;
my $pagebody=shift;
indexlink => indexlink(),
wikiname => $config{wikiname},
pagebody => $pagebody,
- baseurl => baseurl(),
+ baseurl => baseurl(),
+ @_,
);
+ run_hooks(pagetemplate => sub {
+ shift->(page => "", destpage => "", template => $template);
+ });
return $template->output;
}#}}}