Tracy Hughes wrote:
> Hi,
> I tried to add VMS::Filespec to the installed Win32 perl at my
> company (I read a rumour somewhere that this was straightforward...)
I posted a patch to the Win32 Makefiles that allowed for installation
of File::Spec::VMS.pm on Win32 but that is a module different from
VMS::Filespec. On the other hand perhaps you are simply interested in
a convenient way to convert "C:\\windows\\path\\specs" to
"C:[vms.path]specs"?
> Unfortunately I can't seem to get it working, and am hoping someone
> can point out what I missed.
>
> - The version of perl on the Win32 machine is 5.004_02 (I believe this
> was a precompiled version).
This might be a problem. GSAR's 5.004_02 binary has a lot of stuff, but
in order to fully exploit perl's ability to add modules and such you need
a C compilation environment. For money you can use MS VC++ and it's cl.exe
and nmake.exe command utilities (I've done this and it is very easy to
use). One could also use Borland C compiler and there is a dmake utility
that perl source supports as well. On the Freeware/GNU util front there
are ports of perl to cygwin32 and mingwin (which use gcc.exe and GNU make.exe).
On the other unix-on-NT front there is or was a port of perl to Wind/U,
and there is also MKS's port of perl and a slew of unix utilities, but I am not
sure how exntinsible the wind/u or mks perls are.
> - I couldn't find VMS::FILESPEC separate from the current
> perl distributionm so I pulled it from 500503 (which I
> happened to have laying around).
> - Simply copied [.VMS.EXT]FILESPEC.PM from the source to
> [.LIB.VMS] on the Win32 machine, since I couldn't find anything
> except this file and a test routine in the source...
>
> Now when I attempt to use a routine as follows:
> use VMS::Filespec;
> $filespec = shift;
> print vmsify($filespec);
> I get "Undefined subroutine VMS::Filespec::vmsify..." (it apparently
> happily finds the package).
Charles Bailey posted an example of the use of File::Spec to translate paths
to this list. His comments are in the web archive at:
http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/2000-03/msg00245.html
> Interestingly enough when I change the reference to be
> main::vmsify(..) I get the same error, VMS::Filespec::vmsify...
>
> I took a look at FILESPEC.PM and found one line which it says to
> uncomment when using on other machines, and uncommented:
> use AutoLoader;
>
> Then, I got the following errors:
> Cant locate auto/VMS/Filespec/autosplit.ix in @INC...
Yep. Installing a non-trivial (meaning at least Autosplit and perhaps
XS based) module requires the full four line perl module mantra:
perl Makefile.PL
make ! or mms or mmk or nmake or dmake or gmake or ...
make test ! "
make install ! "
The GSAR 5.004_02 binary may or may not be able to handle that with the
File::Spec package from perl 5.6.0. One thing it depends heavily on is
whether you even have a make utility on NT. However, getting that to
work for VMS::Filespec may be tricky since there are XS calls to RMS functions
IIRC. Hence it may not work at all on NT. On the other hand the File::Spec::*
pure perl abstraction in more recent perl's ought to work just fine.
HTH
Peter Prymmer