Skip Menu |

This queue is for tickets about the ExtUtils-Install CPAN distribution.

Report information
The Basics
Id: 42150
Status: open
Priority: 0/
Queue: ExtUtils-Install

People
Owner: Nobody in particular
Requestors: wb8tyw [...] gmail.com
Cc:
AdminCc:

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



Subject: t/basic.pl - VMS do not change $ENV{BIN} unless you need to.
Do not add $ENV{'bin'} unless you need to because the change persists after the test exits. I have submitted patches for GNV to not create the BIN logical.
Subject: extutils_t_basic_pl.gdiff
Download extutils_t_basic_pl.gdiff
application/octet-stream 448b

Message body not shown because it is not plain text.

On Sun Jan 04 17:16:07 2009, malmberg@Encompasserve.org wrote: Show quoted text
> Do not add $ENV{'bin'} unless you need to because the change persists > after the test exits. > > I have submitted patches for GNV to not create the BIN logical.
This ought to do it. --- a/t/basic.t +++ b/t/basic.t @@ -32,7 +32,7 @@ my $perl = which_perl(); my $Is_VMS = $^O eq 'VMS'; # GNV logical interferes with testing -$ENV{'bin'} = '[.bin]' if $Is_VMS; +local $ENV{'bin'} = '[.bin]' if $Is_VMS; chdir 't';
Subject: Re: [rt.cpan.org #42150] t/basic.pl - VMS do not change $ENV{BIN} unless you need to.
Date: Wed, 01 Apr 2009 16:55:51 -0500
To: bug-ExtUtils-Install [...] rt.cpan.org
From: John Malmberg <wb8tyw [...] gmail.com>
Michael G Schwern via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=42150 > > > On Sun Jan 04 17:16:07 2009, malmberg@Encompasserve.org wrote:
>> Do not add $ENV{'bin'} unless you need to because the change persists >> after the test exits. >> >> I have submitted patches for GNV to not create the BIN logical.
> > This ought to do it. > > --- a/t/basic.t > +++ b/t/basic.t > @@ -32,7 +32,7 @@ my $perl = which_perl(); > my $Is_VMS = $^O eq 'VMS'; > > # GNV logical interferes with testing > -$ENV{'bin'} = '[.bin]' if $Is_VMS; > +local $ENV{'bin'} = '[.bin]' if $Is_VMS; > > chdir 't';
I will test this. I am not sure that it will work, as the issue is that we only need to change $ENV{'bin'} if it already exists, and currently Perl on VMS does not have a way to restore an $ENV value to what it was previously. If the local qualifier prevents the $ENV from modifying the logical name table, then an existing $ENV{bin} will still break the test, as the local effectively changes statement to a noop. If the local allows $ENV{bin} to modify the logical name table, then it will not be cleaned up when Perl exits, and will affect subsequent programs run from that shell. So the original change was to avoid setting a $ENV{'bin'} if we do not need to, since we can not clean it up. -John wb8tyw@qsl.net Personal Opinion Only
Subject: Re: [rt.cpan.org #42150] t/basic.pl - VMS do not change $ENV{BIN} unless you need to.
Date: Wed, 01 Apr 2009 22:01:01 -0500
To: bug-ExtUtils-Install [...] rt.cpan.org
From: "John E. Malmberg" <malmberg [...] Encompasserve.org>
Michael G Schwern via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=42150 > > > On Sun Jan 04 17:16:07 2009, malmberg@Encompasserve.org wrote:
>> Do not add $ENV{'bin'} unless you need to because the change persists >> after the test exits. >> >> I have submitted patches for GNV to not create the BIN logical.
> > This ought to do it.
Unfortunately not. A local definition does not cover up the logical name BIN that is causing the problem. The old code correctly covered up the logical name, however it is not possible to clean up the logical name created by the test, because Perl does not have proper built in support for VMS logical names. So the patch I submitted is a compromise, not to create the BIN logical name to cover up the bad one if we do not need to, because leaving a BIN logical name behind will victimized other applications that run from the same shell instance. Show quoted text
> --- a/t/basic.t > +++ b/t/basic.t > @@ -32,7 +32,7 @@ my $perl = which_perl(); > my $Is_VMS = $^O eq 'VMS'; > > # GNV logical interferes with testing > -$ENV{'bin'} = '[.bin]' if $Is_VMS; > +local $ENV{'bin'} = '[.bin]' if $Is_VMS; > > chdir 't';
-John malmberg@encompasserve.org
No file named either 't/basic.pl' or 't/basic.t' still exists within the ExtUtils::Install CPAN distribution. So this ticket should either be closed or moved to the queue of another, more relevant CPAN distribution. Thank you very much. Jim Keenan