[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GT] Re: Re: DBI and Mysql problems
Tielman,
could you please write up your experience of connecting to MySQL as a
little tutorial. We can add this into the documentation, and it will
greatly help subsequent users?
RAS,
yes, a good error message here would be beneficial....
Th.
Robert A. Schmied wrote:
> 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.
>
>
> 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;
> }
>
>
>