The DBD::DB2 driver is developed and maintained by IBM. The source is available from CPAN under an open-source license.
DBD::DB2 closely follows the DBI standard, with a few extensions:
Cataloged connection with DBD::DB2
#!/usr/bin/perl
use DBI;

my $username = 'lynn';
my $password = '5tuff';
my $database = 'MYDB';
my $conn = DBI->connect("dbi:DB2:$database", $username, $password,
	{ AutoCommit => 1} );
Uncataloged connection with DBD::DB2
#!/usr/bin/perl
use DBI;

my $username = 'lynn';
my $password = '5tuff';
my $hostname = 'localhost';
my $port = 1527;
my $database = 'MYDB';

my $DSN = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;"
	. "HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP";
my $conn = DBI->connect("dbi:DB2:$DSN", $username, $password,
	{ AutoCommit => 1} );