This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
- From: Scott Bolte <listS+cygwin at niss dot com>
- To: Michael G Schwern <schwern at pobox dot com>
- Cc: Andrew Ho <andrew at tellme dot com>, "Gerrit P. Haase" <gerrit at familiehaase dot de>, cygwin at cygwin dot com, makemaker at perl dot org, perl5-porters at perl dot org, petdance at cpan dot org
- Date: Fri, 22 Jul 2005 15:16:29 -0500
- Subject: Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
On Thu, 21 Jul 2005 00:14:51 -0700, Michael G Schwern wrote:
>
> Its gotta be something about _default_inc(). Nothing looks wrong from
> here. My only guess is that local $ENV{PERL5LIB} is ineffective. That
> would account for the alternation.
It's not just the local scoping. There is something
seriously unexpected with environment variables, perl
and cygwin.
----- th4.pl
#!/usr/bin/perl
use strict;
use warnings;
$ENV{SHOULD_NEVER_BE_SEEN} = "hello world";
delete($ENV{SHOULD_NEVER_BE_SEEN});
system("printenv | grep SHOULD_NEVER_BE_SEEN");
On UNIX systems that script properly prints nothing. Not so
on my cygwin (on top of XP) system:
cygwin% perl ~/th4.pl
SHOULD_NEVER_BE_SEEN=hello world
It seems to imply that the results of unsetenv(3) are not
persistent across an exec(2).
Root cause aside, you nailed it with your suggestion.
> ....
>
> And then try changing "local $ENV{PERL5LIB}" to "local $ENV{PERL5LIB} = ''".
Explicitly setting $ENV{PERL5LIB} to '' before calling `perl ...`
in _default_inc() fixed the problem for me.
Scott
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/