package OpenGuides::Template; use strict; use vars qw( $VERSION ); $VERSION = '0.17'; use Carp qw( croak ); use CGI; # want to get rid of this and put the burden on the templates use OpenGuides; # for $VERSION for template variable use OpenGuides::CGI; use Template; use URI::Escape; use Data::Validate::URI qw( is_web_uri ); =head1 NAME OpenGuides::Template - Do Template Toolkit related stuff for OpenGuides applications. =head1 DESCRIPTION Does all the Template Toolkit stuff for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers. =head1 SYNOPSIS use OpenGuides::Config; use OpenGuides::Utils; use OpenGuides::Template; my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); print OpenGuides::Template->output( wiki => $wiki, config => $config, template => "", vars => { foo => "bar" } ); =head1 METHODS =over 4 =item B print OpenGuides::Template->output( wiki => $wiki, config => $config, template => "", content_type => "text/html", cookies => $cookie, vars => {foo => "bar"}, noheaders => 1 ); Returns everything you need to send to STDOUT, including the Content-Type: header. Croaks unless C