2 # (c) Petr Baudis <pasky@suse.cz>
14 # Ultra-trivial templating engine
17 my $pathinfo = $ENV{PATH_INFO
};
19 my $gcgi = Girocco
::CGI
->new('HTML Templater');
20 print "<p>Hi, this is your friendly HTML templater speaking. Pass me template name.</p>\n";
24 unless ($pathinfo !~ m
#\./# and open(TEMPLATE, "$basedir/html/$pathinfo")) {
25 my $gcgi = Girocco
::CGI
->new('HTML Templater');
26 print "<p>Invalid template name.</p>\n";
30 my ($gcgi, $section, $heading);
34 if (s/^\@section=//) {
37 } elsif (s/^\@heading=//) {
40 } elsif (s/^\@header//) {
41 $gcgi = Girocco
::CGI
->new($heading, $section);
50 $gcgi and $gcgi->srcname("html/$pathinfo");