Perl DBI Module fails to install correctly from RPM

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Perl DBI Module fails to install correctly from RPM
Date: 2001-07-07 00:54:48
Message-ID: 200107070054.f670smS06070@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Chris Carkner (almohada(at)hotmail(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Perl DBI Module fails to install correctly from RPM

Long Description
I installed version 7.1.2 from RPMs from your FTP site specifically with the following files (not necessarily in this order):

postgresql-7.1.2-4PGDG.i386.rpm
postgresql-docs-7.1.2-4PGDG.i386.rpm
postgresql-libs-7.1.2-4PGDG.i386.rpm
postgresql-perl-7.1.2-4PGDG.i386.rpm
postgresql-server-7.1.2-4PGDG.i386.rpm

After copying the Pg.pm file to the appropriate DBD subdirectory (which it wasn't in with the rest of the drivers) which I assumed was the problem I tried to run a perl script which is trying to connect. This script worked on Red Hat 6.2 just fine, but when I tried to bring it to 7.1 and connect, I got the following (spelling errors and typos are not mine):

DBD::Pg initialisation failed: Can't locate object method "driver" via package "DBD::Pg" at /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm line 511.
Perhaps the capitalisation of DBD 'Pg' isn't right. at perlfile.pl line 141.

The line it is complaining about it a straight copy of the test.pl file contained with the module. And yes, the database does exist, I double checked.

I included the snippet of perl to which the above error belongs.

Sample Code
use DBI;
use Cwd;

$dir = cwd();

$connect_string = "dbi:Pg:dbname=foo";

my $dbh = DBI->connect($connect_string, '', '', {AutoCOmmit => 1})
or die "Couldn't connect to database: " . DBI->errstr;

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-07-07 01:31:30 can't create timestamp field (only timestamp with time zone)
Previous Message José María Fernández González 2001-07-06 19:29:09 Re: Referential Integrity corrupted sometimes by Rules