Hi All,
        This is one of those posts: 'How would I do this if I were a real perl
programmer...'
First, the problem. Windoz NT with  Apache server (windoze version) and
cygwin with perl 5.6.1 (NOT activestate).
Apache is configured for CGI and perl can find CGI.pm in cygwin and windoz
shell but not when executed as

use CGI;

in a perl script (residing in cgi-bin directory) Error log shows 'cant find
CGI.pm in @INC'
So I employed a begin block:
BEGIN {
        my $addinc;
        foreach (@INC) {
                if (m|^/usr(/.+)|) {
                        $addinc = "/cygdrive/d/cygwin".$1;
                        push @INC, $addinc;
                }
        }
}
which, in effect takes a path like /usr/local/lib/perl5
and changes it to /cygdrive/d/cygwin/local/lib/perl5
then adds the 'new' path to the end of the @INC array. This allows me to
'use CGI' from Apache
but there must be a better way! (I like ActiveState but this must be cygwin
perl, I like Linux
but this has to be WinNT) Any suggestions?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to