At 11:56 AM 5/29/2002 -0400, John Peacock wrote:
>Craig A. Berry wrote:
>>>FWIW, I am using the generate PERL_SETUP.COM (slightly modified) to test the perl 
>build without installing it.
>>
>>That should work, though you may have to define PERL_CORE in the environment for 
>some tests.  To run the whole test suite you can of course just do MM(S|K) TEST.  The 
>canonical way to run individual tests is
>>$ @[.vms]test .exe "" -"v" [-.lib.File.Spec.t]rel2abs2rel.t
>
>I just changed the following in PERL_SETUP.COM:

>-$ define/translation=concealed perl_root DKA0:[USER.JPEACOCK.PERLSRC.PERL.]
>+$ define/translation=concealed perl_root DKA0:[USER.JPEACOCK.PERLSRC.PERL_ROOT.]

>so I am not using TEST.COM at all (since none of _my_ scripts will be using it 
>either).  

Looks good.  I do that all the time.  Just be aware though, that there are 
some tests that need what test.com does for them, such as quieting the 
messaging facility.

>It still seems to me that safe_rel() should not choke on rooted logicals.

I can reproduce the problem, and yes, something is not working right when 
the current default directory has a concealed device name in it.  I don't 
think it's safe_rel(), though, but rather File::Spec->abs2rel() and its 
interaction with $^X.  Since $^X is absolute based on the physical device 
name, relativizing it makes it relative to the top-level directory on that 
device regardless of whether the current default directory contains a 
concealed device name (rooted logical).  For all practical purposes we're 
asking for a relative path to a file on a different device, which is of 
course impossible.  I'm not sure what to do about this; trying to smarten up 
$^X might cause more problems than it solves.  Simple reproducer below:

$ show default
  PERL_SRC:[T]
$ perl -"MFile::Spec" -e "print File::Spec->abs2rel($^X);"
[-.craig.perl]perl.exe;1
$ dir [-.craig.perl]perl.exe;1
%DIRECT-E-OPENIN, error opening PERL_SRC:[CRAIG.PERL]PERL.EXE;1 as input
-RMS-E-DNF, directory not found
-SYSTEM-W-NOSUCHFILE, no such file




Reply via email to