I'm using DBIx::Simple with SQL::Abstract in my application. This is database connection code:
my $nms_host = 'mysql.server.com';
my $nms_base = 'mydb';
my $nms_user = 'myuser';
my $nms_pass = 'password123';
my $nms_dsn = "DBI:mysql:$nms_base:$nms_host";
# Initialize connection
# NMS
my $db_nms = DBIx::Simple->connect($nms_dsn, $nms_user, $nms_pass, {
RaiseError => 1,
mysql_enable_utf8 => 1
}) or die DBIx::Simple->error;
$db_nms->abstract = SQL::Abstract->new(
case => 'lower',
logic => 'and'
);
For now I need to use DBIx::Connector but I don't understand how I should make a connection.
DBIx::Connector creates your database handle, which you can then pass directly to DBIx::Simple. So, for your purposes, something like this should work: