]> mj.ucw.cz Git - temple.git/blob - temple
Converted to Perl module.
[temple.git] / temple
1 #!/usr/bin/perl
2 # A really simple template engine
3 # (c) 2004 Martin Mares <mj@ucw.cz>
4
5 use strict;
6 use warnings;
7
8 use UCW::Temple;
9
10 if (@ARGV == 1) {
11         UCW::Temple::process_file($ARGV[0]);
12 } elsif (@ARGV == 2) {
13         close STDOUT;
14         open STDOUT, ">$ARGV[1]" or die "Cannot open $ARGV[1]: $!";
15         UCW::Temple::process_file($ARGV[0]);
16 } else {
17         die "Usage: temple <in> [<out>]";
18 }