Hi,
I am trying to write plugin that does DB lookup and want to use the same db
connection in more than 1 plugins.
Somwhere I read that we can save DB connection in qp->config(). But it is
not working in my case.
Here is what I did:
######################
#create db connection
1. my $db_data = DBI->connect('DBI:mysql:qpsmtp', 'db_qpsmtpd', 'xxxx');
2. $self->qp->config('db_data_conn', $db_data);
3. $db_data = $self->qp->config('db_data_conn');
#######################
$db_data is null at this point. I guess it is not the right way to use
qp->config().
If I skip line 2 and 3 then db query works, but what I am trying to do here
is save the db conn for further use in another plugin. May be it is not the
right way to do it.
Can someone please tell what I am missing here.
thanks :)