You say: DBI docs suggest this format for the data structure
$data_source = dbi:DriverName:database=database_name;host=hostnameSo, I have set up the connection to look like this:
my $data_source = 'DBI:mysql:'. $self->config_param('mysql.database').':'. $self->config_param('mysql.host');
However the first part suggests it should rather look like this (note also the semicolon in the string):
my $data_source = 'DBI:mysql:database='. $self->config_param('mysql.database').';host='. $self->config_param('mysql.host');
So maybe you should try that first.
In fact I'd probably prefer to construct a string like that with sprintf:
my $data_source = sprintf 'DBI:mysql:database=%s;host=%s', $self->config_param('mysql.database'), $self->config_param('mysql.host');
In reply to Re: What is the proper data structure for CAP::DBH?
by hv
in thread What is the proper data structure for CAP::DBH?
by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |