After download Config::General module from CPAN, I decided to install it to my own directory(just copy Config::General.pm to the directory,I didn't do normal install procedure)
I write a simple test script. It can execute in unix shell.But it can't work when access it by http.Apache will report
Can't locate Config/General.pm in @INC (@INC contains: ../lib /usr/loc
+al/lib/per
l5/5.8.2/sun4-solaris /usr/local/lib/perl5/5.8.2 /usr/local/lib/perl5/
+site_perl/
5.8.2/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib
+/perl5/sit
e_perl .) at /data/zht/perl/cgi-bin/config line 3.
BEGIN failed--compilation aborted at /data/zht/perl/cgi-bin/config lin
+e 3.
[Fri Apr 16 09:31:06 2004] [error] [client 99.1.64.71] Premature end o
+f script h
eaders: /data/zht/perl/cgi-bin/config
But why it can find the pm when execute at unix shell ?
So are there any special when script execute at cgi envionment?
thanks!
$ pwd
/data/zht/perl/cgi-bin
$ config
Content-type: text/html
ok$ more config
#!/usr/bin/perl
use lib '../lib';
use Config::General;
print "Content-type: text/html\n\n";
print "ok";
$
$ ls ../lib
Cisco Config Sharefunc.pm
$ ls ../lib/Config
General General.pm
thanks!