Skip Menu |

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 33934
Status: resolved
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: ajr [...] ippimail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Possibly incorrect use of local @INC
Date: Sun, 9 Mar 2008 20:14:26 -0000 (UTC)
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: ajr [...] ippimail.com
I'm using Strawberry Perl (build information attached in build.txt) on Windows XP to test Parrot's Configure code. Running tests which pass on the Linux install, I experience the following failure condition: C:\parrot>perl t/postconfigure/03-revision.t 1..8 ok 1 - Changed to temporary directory for testing ok 2 - Able to make libdir ok 3 - Able to make Parrot dir Can't locate Config_heavy.pl in @INC (@INC contains: C:\DOCUME~1\aa\LOCALS~1\Temp\q8q_5de3Tr/lib) at C:/strawberry/perl/lib/Config.pm line 66. cannot remove directory for C:\DOCUME~1\aa\LOCALS~1\Temp\q8q_5de3Tr: Permission denied at C:/strawberry/perl/lib/File/Temp.pm line 901 # Looks like you planned 8 tests but only ran 3. # Looks like your test died just after 3. (A similar problem occurs with the following test.) The problem appears to be caused by the use of a "local @INC" which has the temporary directory unshifted into it. Removing the (apparently pointless) code makes the problem go away, but should the underlying modules be at the mercy of application-level fiddling with @INC? (Unlike the Linux behaviour.) -- Email and shopping with the feelgood factor! 55% of income to good causes. http://www.ippimail.com

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #33934] Possibly incorrect use of local @INC
Date: Sun, 9 Mar 2008 17:23:28 -0400
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On Sun, Mar 9, 2008 at 4:16 PM, ajr@ippimail.com via RT <bug-Perl-Dist-Strawberry@rt.cpan.org> wrote: Show quoted text
> Can't locate Config_heavy.pl in @INC (@INC contains: > C:\DOCUME~1\aa\LOCALS~1\Temp\q8q_5de3Tr/lib) at > C:/strawberry/perl/lib/Config.pm line 66. > cannot remove directory for C:\DOCUME~1\aa\LOCALS~1\Temp\q8q_5de3Tr: > Permission denied at C:/strawberry/perl/lib/File/Temp.pm line 901 > # Looks like you planned 8 tests but only ran 3. > # Looks like your test died just after 3.
This looks like a bug in the test file with the use of "local @INC". It should probably be "local @INC = @INC" instead so that regular Perl libraries (e.g. Config_heavy.pl) can be loaded on demand at runtime. If you fix that bug, it will either pass or you'll see the actual errors that are Win32 specific. The "can't remove directory" bit is probably unrelated. The program probably died while the current directory was the temp one and the File::Temp destructor tried to remove the directory. Windows doesn't allow you to remove the current directory. David
Subject: Re: [rt.cpan.org #33934] Possibly incorrect use of local @INC
Date: Mon, 10 Mar 2008 21:44:12 -0000 (UTC)
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: ajr [...] ippimail.com
Show quoted text
> > This looks like a bug in the test file with the use of "local @INC". >
Yes, that code was not only wrong, as far as I can tell it was unnecessary, (the test works perfectly without it). The reason I contacted you is that (as far as I know) the same code passes the test on Linux, and I thought you might like to know about the difference in behaviour. I don't know which one is more correct, though. :-)* -- Email and shopping with the feelgood factor! 55% of income to good causes. http://www.ippimail.com
Subject: Re: [rt.cpan.org #33934] Possibly incorrect use of local @INC
Date: Mon, 10 Mar 2008 21:01:50 -0400
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On Mon, Mar 10, 2008 at 5:44 PM, ajr@ippimail.com via RT <bug-Perl-Dist-Strawberry@rt.cpan.org> wrote: Show quoted text
> The reason I contacted you is that (as far as I know) the same code passes > the test on Linux, and I thought you might like to know about the > difference in behaviour. I don't know which one is more correct, though. > :-)*
I don't think it's a matter of correctness. Some dependency somewhere must have a code branch specific to Win32 -- which happens to pull in another dependency at that point, which hits the empty @INC and dies. If you eliminate the @INC fiddling, you should be able to trace the code path and see where that happens if you're really curious. Regards, David
This is not Strawberry-specific. I believe the issues around deletion of the current directory are known and gradually being addressed in other places.