[Melbourne-pm] Subclassing DBI
serg.belokamen at gmail.com
Sat Feb 11 18:21:41 PST 2006
I am trying to extend DBI or subclass it, what ever the term is...
Base example is;
>>> START <<<
our @ISA = qw(DBI);
my ($self, $db_type, $db_name, $db_user, $db_pass, $db_host, $db_port) = @_;
my $dsn = qq/DBI:$db_type:database=$db_name;host=$db_host;port=$db_port/;
$self->connect($dsn, $db_user, $db_pass);
>>> END <<<
When I run the driver that uses TestLib::DBConn I get an error:
DBI subclasses 'TestLib::DBConn::db' and ::st are not setup, RootClass
ignored at ./test.pl line 98
Any ideas as to how I could fix this?
More information about the Melbourne-pm