Link to home
Start Free TrialLog in
Avatar of javeddba
javeddba

asked on

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

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
Avatar of rj2
rj2

Change use to lowercase
use strict;
Avatar of javeddba

ASKER

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
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/
Run these commands as root after you have downloaded
perl Makefile.pl
make
make test
make install
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.
when i am installing DBI-1.38 i am getting following errors

the optional PlRPC-modules are not installed


That doesn't really sound like an error, more like information.
could you please post the error message verbatim
and the program/script which produces this message
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
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;
you don't need to deinstall.
I'd simply do folloing:

perl -MCPAN -eshell
  cpan> install DBI
  cpan> install DBI::Oracle
perl -MCPAN -eshell
 not getting accessed pls specify how to do

Javed
you can come on chat with me on yahoo : javedocp@hotmail.com     MSN: haifdba@hotmail.com
> 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.
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
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks ahoffmann
i resolved the issue  . thanks for yoyr support.


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