[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GT] Re: DBI and Mysql problems
- To: devel
AT
geniustrader.org
- Subject: [GT] Re: DBI and Mysql problems
- From: "Robert A. Schmied" <ras
AT
acm.org>
- Date: Mon, 09 Nov 2009 11:55:01 -0800
- Dkim-signature: v=1; q=dns/txt; d=flash.net; s=dkim01; i=uwppp
AT
flash.net; a=rsa-sha256; c=relaxed/relaxed; t=1257796504; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:To:MIME-Version:From:Date:Message-ID; bh=tE4eMmUZnYUkucuLRK Eg/JM30hOQQyBVj951QElW16E=; b=iuKzDw7SR40cRmfA7g491DSA6VC968gKPsPHM kiTTSJeRqvatAZKxUh8LvysZdgfR3j6HfBfniTcxA/V9wVOrA==
- In-reply-to: <4AF72579.5010505
AT
eirteic.com>
- Message-id: <4AF87395.2070803@acm.org> (sfid-20091109_210510_661079_35B7D1CA)
- Reply-to: devel
AT
geniustrader.org
- User-agent: Mozilla/5.0 (X11; U; xxxxx xxxxx; en-US; rv:1.7) Gecko/20060629
Tielman Esterhuizen wrote:
Thanks again Thomas.
SOLVED> Problem was that I did not have "DB::module genericdbi" in my options
file. I picked this up while reading through Conf.pm.
Can anyone contribute to the documentation? What is the process?
aloha Tielman
you can post any changes you'd like to see to the list either as actual
diffs of the current pod or text that you think is better than the
current doc text.
alternatively or in addition, the gt wiki (see gt home page, box in
upper right for the url) can be edited by anyone, just register and
login, the only prerequisite (iirc) is that you must also be on a gt
list. the wiki user config page has an example with a beancounter db
module and does show the required key-value pair "DB::module bean"
directive.
i did a quick looksee but
a) didn't see anything that specifically indicated the key "DB::module"
was only needed for Text, but may have missed it, and
b) on the other hand i also didn't see any thing that adequately noted
that this key is required for every database interface.
certainly this documentation needs to be improved, but in addition,
i'd argue that the gt tool kit could/should be made smart enough to
detect this missing requirement and give the user useful feedback.
looks like the place for this could be GT::Eval::create_db_object
and or GT::Eval::create_standard_object ...
maybe something like
our $db;
sub create_db_object {
my $db_module = GT::Conf::get("DB::module");
unless ( defined $db_module ) {
GT::Conf::load();
}
unless ( defined ( $db_module = GT::Conf::get("DB::module") ) ) {
my $msg = join "", "$::prog_name: Error: ",
"gt configuration error: key \"DB::module\" not found.\n",
"this key must be defined with a value ",
"that names the GT DB module name you are using.\n",
"examples\n\"DB::module genericdbi\"\n",
"\"DB::module Text\"",
"\n";
die "$msg";
}
unless ( defined $db ) {
$db = create_standard_object("DB::" . GT::Conf::get("DB::module"));
}
return $db;
}
aloha
ras
<< snip >>
--
Tielman Esterhuizen
Consultant
Eirteic Consulting (Australia) Pty Ltd
Mobile: +61 (0) 406 538534
Office: +61 (0) 299 400288
Fax: +61 (0) 299400478
email: tielman.esterhuizen
AT
eirteic.com
web: http://www.eirteic.com