473,408 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Compiling perl 5.8.8 for using DBI

Hi,
I am compiling perl 5.8 on i386-linux architecture,every thing went fine
and I am able to execute normal perl scripts thorugh this newly built perl.
But when I try to execute script which has postgres database access statement it gives me following error :

"Can't locate object method "connect" via package "DBI" (perhaps you forgot to load "DBI"?)"

Note that I have DBI and DBD modules installed and I able able to access postgress database through the perl which comes default with fedora core 6 installation.
The perl which I have built is giving the error.
Please let me know what I need to build extra to acces database.
Would appriciate if anyone can post all the steps to build perl (including configuration parameteres and make options).

Thanks,
Dec 19 '07 #1
2 1852
eWish
971 Expert 512MB
Did you include the following in your script?
Expand|Select|Wrap|Line Numbers
  1. use DBI;
--Kevin
Dec 19 '07 #2
Hi Kevin,
Following is the script which I am trying to use:
Expand|Select|Wrap|Line Numbers
  1. use DBI;
  2.  
  3. $user     = "emulator";
  4. $password = "";
  5. $dbname   = "nocc532";
  6. #$ENV{PGHOST} = 'delphi.medic.chalmers.se';
  7.  
  8. $dbh = DBI->connect("dbi:Pg:dbname=$dbname", $user, $password);
  9. $sth  = $dbh->prepare("select * from dictionary");
  10. $sth->execute;
  11.  
  12. while ( @row = $sth->fetchrow_array ) {
  13.          print "@row\n";
  14.        }
  15.  
  16. $dbh->disconnect;
  17.  
Regards
Dec 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jo Vermeulen | last post by:
Hello, I was wondering if Java supports a feature of C# (or .NET in general), namely compiling code at runtime. This is nice for scripting purposes. Users can script the application in real...
29
by: Maurice LING | last post by:
Hi, I remembered reading a MSc thesis about compiling Perl to Java bytecodes (as in java class files). At least, it seems that someone had compiled scheme to java class files quite successfully....
0
by: marko sarunac | last post by:
After much playing around a looking on groups i still can't find how to fix this problem. I have an AIX 5.1.0.0 with gcc 3.3.2 installed The gcc is the AIX build obtained at UCLA...
1
by: Marco A. Cruz Q. | last post by:
I tried to compile Perl 5.6.n in win32 with BCC 5.5 and nmake, as suggested in the Perl package but it gives lots of errors!. The same package was compiled in Linux 2.2.17 and I had not any...
5
by: jose luis fernandez diaz | last post by:
Hi, When I compiling the program below: #include <map> using namespace std; template<typename td1, typename td2, typename td3,typename td4> class Tarificador
4
by: sujeetkuk | last post by:
I am trying to compile perl source (5.8.7) using GCC .But after the .Configure step as I run make command , I get a error that miniperl-gcc-3.3.2': No such file or directory" or it says gcc -b option...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
11
by: alnoir | last post by:
I'm using the Open Perl IDE to write perl scripts. Everytime I try to compile a script Open Perl will open another script called 'perl5db.pl' and find a compiling error in it. The result in the...
6
by: Keith Lee | last post by:
All: I am attempting to compile the perl module Device::SerialPort and get this error during make -- Manifying blib/man3/Device::SerialPort.3pm Can't open blib/man3/Device::SerialPort.3pm for...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.