W
use Template;
use Template::Stash;
use Getopt::Long;
my $OUTPUT = shift(@ARGV);
my $INPUT = $OUTPUT . ".tt";
my $TO_STDOUT = undef;
GetOptions(
"stdout|o!" => \$TO_STDOUT,
) or die("Error in command line arguments");
$OUTPUT = undef if $TO_STDOUT;
$Template::Stash::SCALAR_OPS->{ us2cc } = sub {
my $str = "_" . shift;
$str =~s/_([a-z])/\U$1/g;
return $str;
};
my $tt = Template->new({PRE_PROCESS => 'tt/pre.tt'});
$tt->process($INPUT, undef, $OUTPUT);