This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Exim, .forward and DBD::Oracle


Greg Matheson wrote:
On Sun, 13 Apr 2003, Dmitry Melekhov wrote:


Another problem is with perl in cygwin.
On Linux I can set
$ENV{PATH} and $ENV{ORACLE_HOME} inside
perl script, but in cygwin I had to write shell script to call perl script:


Does it work in Linux if you DON'T set $ENV{PATH} and
$ENV{ORACLE_HOME} inside your program? Are you sure they are
not set elsewhere in your environment?


Yes ans yes. Moreover, I don't need to have ORACLE_HOME/bin in PATH on Linux.
May be this is DBD::Oracle problem?



#!/bin/sh
PATH=/cygdrive/c/oracle/ora81/bin ORACLE_HOME='c:\oracle\ora81'
/home/tabel/test.pl


or I received following error:


install_driver(Oracle) failed: Can't load
'/usr/lib/perl5/site_perl/5.8.0/cygwin-multi-64int/auto/DBD/Oracle/Oracle.dl
l' for module DBD::Oracle: dlopen: Win32 error 126 at
/usr/lib/perl5/5.8.0/cygwin-multi-64int/DynaLoader.pm line 232


if I try to call perl script from .forward.


This is thing I still don't understand. :-(


Does it work in cygwin if you set them in a BEGIN { } block at
the top of the script. Quoting perlmod,

A "BEGIN" subroutine is executed as soon as possible, that is, the
moment it is completely defined, even before the rest of the containing
file is parsed. ... Because a "BEGIN" block executes
immediately, it can pull in definitions of subroutines and such from
other files in time to be visible to the rest of the file.


I thought the problem might be setting environmental variables in
perl perhaps only passes them to children of the process, but:

greg at 7106 ~
$ perl -e '$ENV{hey}="what?"; print $ENV{hey}'
what?
greg at 7106 ~
$


shows this is not so.


All I can say right now:


OKtabel at kettle:~> ./test.pl
OKtabel at kettle:~>
use DBI;
$ENV{ORACLE_HOME}="/opt/oracle/product/8.1.7";
$user = "tabel";
$passwd = "";
$host = "oracle.belkam.com";
$sid = "TABEL";
$dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $user, $passwd) or die;
print "OK";



If I comment out : #$ENV{ORACLE_HOME}="/opt/oracle/product/8.1.7";

I get:

tabel at kettle:~> ./test.pl
ORACLE_HOME environment variable not set!



I'll try to do more test on cygwin today.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]