Sorry... I've since discovered that my approach in fact DID NOT solve my
problem.... I inadvertently place my perl module in the SAME directory
as my CGI file and of course that would always work. So it looks like
I'm back to square one. Still looking for a zimple solution to avoid
explicitly naming the path to the directory where my perl modules reside....
I still DO NOT understand why the shell variable definition method
(.bash_profile and .bashrc) DID NOT work.... Anyone?
Perhaps I'd also better investigate the 'export PERL5LIB' method that
Tom suggested.
Thanks
Tony Frasketi
Hello Tom
I've been successful in getting my use lib statment to work by inserting
the following statments in my .bash_profile file as follows....
CGIDIR=$HOME/cgi-bin
PMDIR=$CGIDIR/pm
export CGIDIR PMDIR
Then in my CGI script I have...
-------------------------------------------------
use lib "$PMDIR";
use WSP qw(%WSP); # My web site parameter definitions
print "Content-type: text/html\n\n";
foreach $name (sort keys(%WSP)) {
print "$name = $WSP{$name}<br>\n";
}
-------------------------------------------------
Where WSP is where I've define my web site parameters. I then print out
those parameters and it all works.
However there is something that I don't understand.... Since I've
defined CGIDIR and PMDIR shell variables in .bash_profile and exported
them, they are available to be used in my CGI applications according to
what I've read. And this is certainly true because my 'use lib "$PMDIR"
' statement has successfully utilized the PMDIR definition. What I
don't understand then is why when I use the following print statements,
I don't get the expected values. I get nothing....
print "CGIDIR [$CGIDIR]<br>";
print "PMDIR [$PMDIR]<br>";
Can you shed some light on this for me?
Thanks
Tony
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>