run options can be given to pvpgnreport
[perl/schtarr.git] / pvpgnreport
index 8ca1a6f960a126dcdd726eec31a26247b448afbf..fc0a038032e956dd4aed7574fe7348bebf47aa42 100755 (executable)
@@ -5,9 +5,17 @@ use warnings;
 use Data::StarCraft::PvPGN::Report;
 use Data::Dumper;
 
+our $VERSION = '1.00';
+
 our $DBG = 0;
 our $TEST = 0;
 
+use Getopt::Long qw(:config bundling auto_version auto_help);
+GetOptions(
+       "verbose|v!" => \$DBG,
+       "test|t!" => \$TEST,
+);
+
 my $path = $ARGV[0] or die "Usage: $0 FILE\n";
 my ($name) = $path =~ m{([^/]+)$};
 my $report = Data::StarCraft::PvPGN::Report->open("$path.txt")