ok, this is the problem i am having. i am trying to run Perl on Windows, so i installed ActiveState Perl. so i ran a small Hello World program and it worked fine. But then i needed to pull data from an Oracle database, so installed the DBI and DBD:Oracle modules from the CPAN site. i followed the instructions in the README files, but i must have done something wrong because i am the getting the foloowing error in a small Perl program for accessing an Oracle db:
can't locate object method "connect" via package "DBI"
and here is the source of the program:
use lib "/DBI/DBI-1.45/DBI";
#database connection variables;
my $dbname = "dbname";
my $user = "username";
my $password = "password";
#connection string for the database, change this with change of db;
$connect_string = "dbi:Oracle:$dbname";
#the actual connection string for the database;
$dbh = DBI->connect($connect_string, "$user", "$password")
or die "Could not open database: " . $DBI::errstr;
#disconnecting the database handle;
or print ERROR "Error disconnecting: $DBI::errstr";
print "end program\n";
On line 2 i have 'use lib "/DBI/DBI-1.45/DBI"' instead of 'use DBI' because that's the directory i installed DBI in.
any ideas what the problem could be?