package Games::StarCraft::DB;

use strict;
use warnings;
use DBIx::Simple;
use Carp;
use base 'DBIx::Simple';

our $VERSION = '1.00';
our @Conf;  # database connect options

sub connect {
	my $self = shift;
	eval { require Games::StarCraft::DB::Local };  # local @Conf overrides
	my @options = @Conf;
	if (@_ >= 1 and ref (my $manual = shift) eq "HASH") {
		while (my ($key, $value) = each %$manual) {
			$options[3]->{$key} = $value;
		}
	}
	return $self->SUPER::connect(@options);
}

1;

