On Sat Jun 03 13:09:21 2006, ADAMK wrote:
Show quoted text> You asked the following
>
> "File::Spec adds the current directory to the front of PATH if on Win32,
> VMS or MacOS. I have no knowledge of those so don't know if the current
> directory is searced first or not. Could someone please tell me?"
>
> It should be fairly easy to check this, using a program we know exists
> on the path, "perl" itself.
>
> So in the test script chdir to the test script directory, create a file
> called "perl" (or perl.exe, etc on Windows) and then call something like
> "perl -e 'exit(100)'" and see what happens.
>
> If it does to the current one first, your own file, which would return,
> say, 0 would be distinguishable from the "real" one.
>
> Then your test can validate that platform in comparison to your assumptions.
As far as VMS goes, I am not really sure what the "right" thing to do is, since VMS is not my area of expertise. I have access to VMS, but in order to run a .exe that isn't a registered command verb, you do something like this:
vms $ dir
Directory LDA1:[USERS.PLATYPUS.WHICH_TEST]
PERL.C;1
Total of 1 file.
vms $ cat perl.c
#include <stdio.h>
int
main(int argc, char *argv[])
{
printf("hello there\n");
}
vms $ cc perl.c
vms $ link perl.obj
vms $ run perl
hello there
vms $ perl -v
This is perl 5, version 20, subversion 0 (v5.20.0) built for VMS_IA64
Copyright 1987-2014, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at
http://www.perl.org/, the Perl Home Page.
My gut says that putting . at the start of the search order is wrong. But I am pretty sure that File::Which wouldn't work anyway because of the concept of a command verb, and the fact that there isn't really a search path to speak of.
Support for Mac OS (not OS X) is a pretty low priority for obvious reasons at this point. There is a comment in the POD for File::Which requesting information on this, if anyone is interested in supporting VMS (pretty low likelihood) they can contact me, I'd be receptive since I find VMS kind of interesting. I am going to close this though.