> Ron Goral wrote:
> > Greetings -
> >
> > I am having trouble locating and using modules that are not in the
> > current directory of a cgi script.  For this test, I know the
> > directory structure looks like this:
> >
> > cgi-bin/test/test.cgi
> > cgi-bin/lib/DGStanLib.pm
>
> From: Bob Showalter [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 07, 2004 10:39 AM
> To: 'Ron Goral'; Perl Beginners
> Subject: RE: Trying to locate module in parallel directory
>
>
>
> Why not the straightforward:
>
>        use FindBin;
>        use lib "$FindBin::Bin/../lib";
>
> (lifted directly from the FindBin docs)
>
> Or why not allow the sysadmin to place the libs wherever he wants
> and use a
> SetEnv directive in the web server config to pass PERL5LIB to the CGI
> scripts and forego use lib altogether?
>

This is obviously a case of me trying to make this too complex.  Thank you
Bob for showing me that simpler is always better.  My "ass"umption was that
$FindBin::Bin was going to locate a directory BELOW cgi-bin/test.  The
straight forward method worked just fine.

Thank you.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to