common/tools/populateziptemplate.pl
changeset 84 fcf94a72b33e
parent 76 a115d49b621f
child 88 28463bb10fde
--- a/common/tools/populateziptemplate.pl	Tue May 05 13:26:31 2009 +0100
+++ b/common/tools/populateziptemplate.pl	Tue May 05 14:21:55 2009 +0100
@@ -4,14 +4,12 @@
 use Text::CSV;
 require XML::Simple;
 
-# Raw inputs (should probably come in as parameters to the script)
+# Raw inputs come in as parameters to the script
+# TODO: Use a proper option parsing module
 my $sourcesCSV = shift or die "First arg must be source csv file";
 my $template = shift or die "Second arg must be template file";
-
-# Derived values
-my ($ftl) = $template =~ m{(.*)\.template$};
-#$ftl =~ m{[^/\\]+$};
-#$ftl = $1;
+my $ftl = shift or die "Third arg must be output file";
+shift and die "No more than three arguments please";
 
 # Load CSV
 open my $csvText, "<", $sourcesCSV or die;