#!/usr/bin/perl
use strict;
use HTML::Mason;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $cgi = CGI->new();
my $fn = ( $cgi->param('fn') || 'list/list_items' ) . '.mas';
open(IN,"<",$fn) or die $!;
my $templateStr = join '',;
close IN;
my $interpreter = HTML::Mason::Interp->new( );
my $component = $interpreter->make_component(comp_source=>$templateStr);
my %args = $cgi->Vars;
print $cgi->header();
$interpreter->exec($component,%args);