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")
my $place = $placetxt{$placeid} or die "Unknown place id: $placeid\n";
print "Resolved place '$placeid' to $place\n" if $DBG;
-use DBIx::Simple;
-my @dbinfo = do "dbinfo.inc.pl";
-my $Db = DBIx::Simple->connect(@dbinfo, {pg_enable_utf8 => 1})
+use Games::StarCraft::DB;
+my $Db = Games::StarCraft::DB->connect
or die "No database: $DBI::errstr\n";
$TEST and exit;