On Tue, May 07, 2002 at 07:08:22AM +0000, [EMAIL PROTECTED] wrote: > > Can't locate File/Glob.pm in @INC (@INC contains: C:\DOCUME~1\abcdef\LOCALS~1\Te > mp\69610000\ .) at gulp.pl line 264. > BEGIN failed--compilation aborted at gulp.pl line 264. > > > Do you know why the INC@ does not contain my c:\perl\lib directory? I have that >module installed on my machine but for some reason it is only looking in my temp >directory and it only happens on this program.
Does your program fiddle with @INC somewhere in the BEGIN{} block? If other scripts don't behave like this, the problem should be local this specific script. Start 'perl -V' and look at the bottom of the output to see what's compiled into your perl as '@INC'. Then compare that with your script and see if it differs. You can also put the following right at the start of your script to see when '@INC' gets modified - if that's the case. BEGIN { local $,="\n"; print @INC } ---------- perldoc perlmod ---------- A "BEGIN" subroutine is executed as soon as possible, that is, the moment it is completely defined, even before the rest of the containing file is parsed. You may have mul- tiple "BEGIN" blocks within a file--they will execute in order of definition. ---------- perldoc perlmod ---------- As you see, you can stuff that statement between the lines of your script header. Use multiple of these blocks spread over the initialization of your program to see if '@INC' gets clobbered somewhere. Something like this: ---------- snip ---------- #!/usr/bin/perl use strict; use warnings; BEGIN { local $"="\n"; print "1st: @INC\n"; } use lib qw{/tmp}; BEGIN { local $"="\n"; print "2nd @INC\n"; } local $"="\n"; print "3rd @INC\n"; ---------- snip ---------- -- If we fail, we will lose the war. Michael Lamertz | +49 221 445420 / +49 171 6900 310 Nordstr. 49 | [EMAIL PROTECTED] 50733 Cologne | http://www.lamertz.net Germany | http://www.perl-ronin.de -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]