my $output = $template->output;
print header(-type=> $type, -charset => 'utf-8', -Content_Length => length $output);
print $output;
my $output = $template->output;
print header(-type=> $type, -charset => 'utf-8', -Content_Length => length $output);
print $output;