#!/usr/bin/perl # A really simple template engine # (c) 2004 Martin Mares use strict; use warnings; use Getopt::Long; use UCW::Temple; my $out; GetOptions('out|o=s' => \$out) or die "Usage: temple [-o ] ..."; if (defined $out) { close STDOUT; open STDOUT, ">$out" or die "Cannot open $out: $!"; } if (!@ARGV) { push @ARGV, "-"; } UCW::Temple::start(); foreach (@ARGV) { UCW::Temple::parse_file($_); } UCW::Temple::finish();