Perl searching in wrong path for modules?

Reini Urban rurban@x-ray.at
Fri Sep 3 15:56:00 GMT 2004


Gerrit P. Haase schrieb:
>>perl looks in the wrong folder for the Perl Modules, for example if i
>>want to load Archive::Zip, it trys to load it from 
>>D:\usr\lib\perl5\site_perl\5.8.5\XML\Simple.pm instead of 
>>D:\cygwin(\usr)\lib\perl5\site_perl\5.8.5\XML\Simple.pm. So i wonder if
>>this is a bug in cygwin perl or rather a bug in Apache (or a error from
>>my side even?). I attached the cygcheck output, if it matters. My OS is
>>Windows 2000, Apache was 2.0.50, Cygwin is 1.5.10-cr-0x5e6.

no bug at all.

> You may try to install Cygwin in the root of a drive instead of a
> subdirectory and see if it works then.  Basically Cygwin applications
> use the Cygwin mount system where Windows applicatoins know nothing
> about, so this problem is by design.

I used to solve the mod_perl or CGI problems with apache by
subst'ing x:\cygwin to a letter, and install apache there.

n:/Apache
n:/bin
n:/lib ...

then you can safely use #!/bin/perl in your she-bang lines,
using the cygwin perl and any unix perl also.
with activeperl see below.

the win32 module builds fine on cygwin, besides Win32::OLE. you can also 
  copy the win32 libs from 5.8.2 to 5.8.5. don't forget archlib then.

instead of a new cygwin install, you can also try the subst trick
with the activestate perl. this need much less time.

you can also always fool activestate perl @INC with certain registry 
entries.
I for example have this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Perl]
"lib-5.00502"="D:\\perl\\5.00502\\lib"
"sitelib-5.00502"="D:\\perl\\site\\5.00502\\lib"
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list