binmode $imgfile;
select $imgfile;
- use GD;
+ require GD;
my $ani = GD::Image->new($head->{width}, $head->{height});
my $bg = $ani->colorAllocate(0, 0, 0);
my @plot = (
select STDOUT;
}
-use Games::StarCraft::DB;
+if ($DBGAME or $DBNAME) {
+
+require Games::StarCraft::DB;
my $Db = Games::StarCraft::DB->connect({RaiseError => 1})
or die "No database: $DBI::errstr\n";
+
sub findaccount ($) {
my ($name) = @_;
my $query = $Db->query(q{
$Db->commit;
}
+}
+
if ($APMSVG) {
my @seq; # player => time (s) => actions
$seq[$_->[1]][$_->[0] * .042]++ for @$map;
}
BEGIN { unshift @INC, '.' }
- use SVG::TT::Graph::TimeSeries;
+ require SVG::TT::Graph::TimeSeries;
my $graph = SVG::TT::Graph::TimeSeries->new({
height => 1200,
width => 1600,