#!/usr/bin/perl -w use DBI; use strict; use CGI; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use HTML::Template; use HTML::Entities; use lib 'code'; use config; my $template = templates::loadTemplate('template'); my %T; my $innerTemplate; ## Security $CGI::DISABLE_UPLOADS = 1; # no uploads! $CGI::POST_MAX = 512*1024; # max 512k post my $q = new CGI; my $c; ## different stuff here ## Filling in the template here if($innerTemplate) { # load the template in, put it into %T. my $template = templates::loadTemplate('$innerTemplate'); $template->param($T{innerContent}) if $T{innerContent}; $T{content} = $template->output(); } print $q->header(); $template->param(%T); print $template->output();