Solved

can't locate object method "USE" via package  "strict"

Posted on 2003-11-01
17
2,046 Views
Last Modified: 2013-11-19
an't locate object method "USE" via package  "strict"  

when i am running script to connect oracle


pls help me to get rid of the problem

platform : linux 7.3
oracle 9.2
i installed oracle DBI driver



Javed
Riyadh
0
Comment
Question by:javeddba
  • 8
  • 4
  • 4
  • +1
17 Comments
 
LVL 10

Expert Comment

by:rj2
ID: 9665460
Change use to lowercase
use strict;
0
 

Author Comment

by:javeddba
ID: 9665548
Can't  locate DBD/Oracle.pm

what are the requiremnts for perl driver installation . i installed DBD-Oracle-1.14.
i followed the following steps


perl Makefile.pl
make test
make install


pls suggest me what is the problem. mention what is to be considered.

awaiting for your reply

Javed
0
 
LVL 10

Expert Comment

by:rj2
ID: 9665554
Try to download and install DBI first and then reinstall DBD-Oracle-1.14
http://search.cpan.org/~timb/DBI-1.38/
http://search.cpan.org/~timb/DBD-Oracle-1.14/
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 10

Expert Comment

by:rj2
ID: 9665562
Run these commands as root after you have downloaded
perl Makefile.pl
make
make test
make install
0
 
LVL 1

Expert Comment

by:seesik
ID: 9668922
Javed, you don't need to explictly "use DBD::Oracle"; just use DBI, and it will automagically load the driver that you specify in your connect() parameters.
0
 

Author Comment

by:javeddba
ID: 9669147
when i am installing DBI-1.38 i am getting following errors

the optional PlRPC-modules are not installed


0
 
LVL 10

Expert Comment

by:rj2
ID: 9669265
That doesn't really sound like an error, more like information.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9669385
could you please post the error message verbatim
and the program/script which produces this message
0
 

Author Comment

by:javeddba
ID: 9669394
when i am runing perl script following error

can;t locate DBD/oracle.pm

perhaps DBD::oracle perl module hasn't  fully installed .

pls specify how to deintall DBD and DBI  . i installed both on the serevr (test) . i want to de install and i will try installing fresh.

and pls specify how to install successfully and what are the pre-requisites.

Javed
0
 

Author Comment

by:javeddba
ID: 9669437
My error Messages are

" can't locate DBD/oracle.pm ........ line 3"

perhaps DBD::oracle perl module hasn't  fully installed
or perhaps the capitalization of  'oracle' isn't right .
available drivers ExampleP,Oracle,Proxy.Sponge
at line 3"

my code to test is

use strict;
use DBI;
my $dbh=DBI->connect('DBI:oracle:HAIF','system','manager') || die " Database connection not made: $DBI::errstr";
$dbh->disconnect;
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9669439
you don't need to deinstall.
I'd simply do folloing:

perl -MCPAN -eshell
  cpan> install DBI
  cpan> install DBI::Oracle
0
 

Author Comment

by:javeddba
ID: 9669447
perl -MCPAN -eshell
 not getting accessed pls specify how to do

Javed
0
 

Author Comment

by:javeddba
ID: 9669488
you can come on chat with me on yahoo : javedocp@hotmail.com     MSN: haifdba@hotmail.com
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9669556
> not getting accessed
what does this mean?
please post anything you type and anything the system responds verbatim
copy&paste could not be that complicated
Makes things simple here.
0
 

Author Comment

by:javeddba
ID: 9669604
actually i not having the net connection from the server.:

install_driver(oracle) failed : Can't locate DBD/oracle.pm in @INC( @INC contains : /usr/lib/perl5/5.6.1......)

at (eval) line 3
perhaps DBD::oracle perl module hasn't  fully installed
or perhaps the capitalization of  'oracle' isn't right .
available drivers ExampleP,Oracle,Proxy.Sponge
at line 3"

Javed
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 125 total points
ID: 9669722
the error sounds like you used:
  use DBI::oracle;
as said before: you don't need that.
Or you used 'oracle' as driver name, then try 'Oracle'
0
 

Author Comment

by:javeddba
ID: 9677499
Thanks ahoffmann
i resolved the issue  . thanks for yoyr support.


if any problem i will contact you pls mention your mail id .
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Web Application Architecture 6 78
Perl script to find new files and compress those new files 5 106
Problem to Popup 2 86
Stupid git question 2 101
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question