> I don't understand how environment variables and @INC play > together on Win32. I have an IIS server (5.0 I believ), with > a system environment variable > > PERL5LIB=c:/agdata/libperl > > Given a simple CGI script, run under IIS: > > print <<HTML; > content-type: text/plain > > PERL5LIB=$ENV{PERL5LIB} > HTML > print "inc=$_\n" for @INC > __END__ > > I get the following output: > PERL5LIB=C:/agdata/libperl > inc=C:/Perl/lib > inc=C:/Perl/site/lib
I don't think this is an IIS thing.. I don't have a PERL5LIB Environment Variable defined on my system at all. (ActivePerl 5.8.6 Build 811) However, you should be able to push the path to @INC from your script (I think it needs to be in a BEGIN block, but I'm not sure). I've never really found a need to include a path that is not in the normal Win32 paths since everything I do is via PPM (and it throws the module in the lib or site\lib folders -- PPM makes for easy installs and versioning) -- with the exception of Mail-SpamAssassin, and it installs to the site\lib folder as well. Good Luck. Steven > > I would have expected that the directory pointed to by > PERL5LIB would be listed in the @INC array, but it's not (and > a module that appears in said directory cannot be found). On > a Unix machine, I get something like the following: > > % perl -I/tmp/libperl -le 'print for @INC' > /tmp/libperl > /usr/local/lib/perl5/site_perl/5.8.6/mach > /usr/local/lib/perl5/site_perl/5.8.6 > /usr/local/lib/perl5/site_perl/5.8.3 > /usr/local/lib/perl5/site_perl > /usr/local/lib/perl5/5.8.6/mach > /usr/local/lib/perl5/5.8.6 > _______________________________________________ Perl-Win32-Web mailing list Perl-Win32-Web@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs