> -----Original Message----- > From: Christian Walde [mailto:mitha...@yahoo.de] > Sent: 30 March 2011 10:40 > To: activeperl@listserv.activestate.com; Brian Raven > Subject: Re: PERL5LIB env variable import possibly broken for large > contents on Win32? ( Was: Re: Your CPAN smoker is misconfigured? ) > > On Wed, 30 Mar 2011 11:30:59 +0200, Brian Raven <bra...@nyx.com> wrote: > > >> Of note: The test ( https://gist.github.com/893981#L225 ) clearly > has a > >> whole battery of directories in $ENV{PERL5LIB} ( > >> https://gist.github.com/893981#L247 ) which the perl executable can > >> obviously see, including the Params::Classify dir as the very first; > >> since that's a Data::Dumper output of %ENV. However @INC remains > >> unchanged by that. ( https://gist.github.com/893981#L579 ) > >> > >> This seems to indicate to me that the perl executable itself is, for > >> whatever reason, flat out ignoring the PERL5LIB and/or failing to > >> inject it into @INC. Other possibilities include Module::Build > messing > >> things up or the Windows Perl executable exclusively having issues. > > > > I don't know if this is your problem, but a bit of googling found > this. > > > > http://support.microsoft.com/kb/830473 > > > > Especially the part about cmd ignoring variables that are longer than > its limit. > > > > HTH > > > > P.S. I have not replied to the lists that don't know me from Adam. > > At first i thought that was the case too. But the fact that the perl > executable knows that value is in %ENV makes me think it's something > else going on, as i'd expect that to be empty as well then.
Maybe so, but spawning a sub process with large environment variables does seem to cause problems. For example, running the following ... --------------------------------------------------------- use strict; use warnings; my $var = "SOMEVAR"; my $check = "check"; my $addthis = "x" x 500; if (@ARGV > 0) { if ($ARGV[0] eq $check) { print "$var is ", length($ENV{$var}), " bytes long\n"; } else { print "What '$ARGV[0]'?\n"; } } else { for my $i (1..1000) { $ENV{$var} .= ";$addthis$i"; system "perl $0 $check"; # system "cmd /c perl $0 $check"; exit if $?; } } --------------------------------------------------------- ... on an XP box, ends as follows... SOMEVAR is 27153 bytes long SOMEVAR is 27656 bytes long SOMEVAR is 28159 bytes long SOMEVAR is 28662 bytes long Can't spawn "cmd.exe": No such file or directory at t4.pl line 19. The contents of PERL5LIB in your link seems to be 46647 bytes long. The link I gave mentions that the win32 limit is 32767. This would suggest that it is unlikely that perl inherited an environment variable that long from its parent process. It seems more likely that perl constructs PERL5LIB, but fails to pass it on to a child process. Of course, I could be wrong. HTH -- Brian Raven Please consider the environment before printing this e-mail. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs