#!/usr/local/bin/perl -w

use strict;
use Template;
use CGI;

use lib qw(/virtual/twoshortplanks.com/www/lib);

# get the filename of our file
my $file = $ARGV[0];

# open the file 
open (FILE, $file) or die "File $file not there!";

# eat the line with the command '#!/usr/local/bin/wtpage' on it
<FILE>;

# print out the standard header
print "Content-Type: text/html\n\n";

# create a template processor 
my $template = Template->new({
    ABSOLUTE => 1,
    RELATIVE => 1,
    PLUGIN_BASE => 'Twoshortplanks::Template::Plugin'
});

# we`re dealing with this file
$template->process(\*FILE,{cgi => new CGI})|| die $template->error();




syntax highlighted by Code2HTML, v. 0.8.12