Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-Cover CPAN distribution.

Report information
The Basics
Id: 61775
Status: rejected
Priority: 0/
Queue: Devel-Cover

People
Owner: Nobody in particular
Requestors: spam-bitcard [...] yary.ack.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.65
Fixed in: 0.72



Subject: Clobbering %ENV variable 'PWD' (already fixed?)
Download (untitled) / with headers
text/plain 1.1k
Devel::Cover clobbers the contents of the environment variable PWD. Example using the attached "foo.pl" one-liner this is using Windows shell: Show quoted text
> set PWD=abcdefg > foo.pl
$ENV{PWD}='abcdefg' Show quoted text
>perl -MDevel::Cover foo.pl 2>&1 1>:NUL
$ENV{PWD}=D:/home/yhluc00/bin/OvottCode/DataExtract Seems to be fixed in 0.72? or is it because I'm using a different shell here? From bash on a netBSD system: $ PWD=abcde $ perl foo.pl $ENV{PWD}=abcde $perl -MDevel::Cover foo.pl 2>&1 1>/dev/null $ENV{PWD}=abcde Changing the environment variables can make tests fail, when the tester is meant to set them before running a test. I have a workaround for this on the Windows system already and will try to install 0.72 instead of 0.65 there. Thanks for your time and effort. Windows Server 2003, perl -v: This is perl, v5.10.0 built for MSWin32-x64-multi-thread (with 9 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 1005 [290470] provided by ActiveState http://www.ActiveState.com Built May 24 2009 12:09:06 NetBSD perl -v: This is perl, v5.10.1 (*) built for i386-netbsd Copyright 1987-2009, Larry Wall
Subject: foo.pl
Download foo.pl
text/x-perl 54b
#!/usr/local/perl warn '$ENV{PWD}=',$ENV{PWD},"\n";
Download (untitled) / with headers
text/plain 957b
Thanks very much for this report. I was able to repeat it on Windows, and narrowed it down to something which doesn't included Devel::Cover: K:\g\Devel--Cover>perl -v This is perl 5, version 16, subversion 0 (v5.16.0) built for MSWin32-x64-multi-thread K:\g\Devel--Cover>set PWD=plpl K:\g\Devel--Cover>echo %PWD% plpl K:\g\Devel--Cover>perl -E "say $ENV{PWD}" plpl K:\g\Devel--Cover>perl -MCwd -E "getcwd; say $ENV{PWD}" K:/g/Devel--Cover K:\g\Devel--Cover>echo %PWD% plpl K:\g\Devel--Cover> So $PWD is set when calling Cwd::getcwd(), which doesn't seem such a bad thing, I suppose. This function is called within Devel::Cover, hence the behaviour you are seeing. I suppose this could be deemed a bug in getwcd on Windows, but I don't know enough about the platform to say for sure. But if it is, it should be filed against the perl core rather than Devel::Cover. So I'm closing this ticket here. Thanks again for reporting the problem.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.