Craig A. Berry wrote:
In [.vms]vms.c, do_tounixspec(), we now convert sys$scratch to tmp
using the code below. This breaks things that convert to unix specs
for convenience and then convert back to VMS specs. Such as:
$ perldoc -f opendir
Error in tempfile() using tmp:XXXXXXXXXX: Could not create temp file
tmp:x8rVYNDDzE: no such device or address at /perl_root/lib/Pod/Perldoc.
pm line 1507
%SYSTEM-F-ABORT, abort
There is no "tmp:" device so you can't create a temporary file there.
So, I'm curious, since /sys$scratch is just as valid a unix fiile
spec as /tmp, why replace it?
Good question.
Under normal conditions CRTL will internally translate /tmp to
SYS$SCRATCH: if the logical name "TMP:" does not exist.
Since Perl sometimes uses the CRTL translations, and sometimes uses it's
own, the UNIX to VMS translation needs to also do this, or we end up
with parts of Perl translating UNIX file specifications to VMS differently.
So /tmp/XXXXXXXX should work.
But the CRTL does not do the reverse translation, which will break tests
that assume that vmsify() will reverse a unixify().
Anything that is converting a VMS format specification to a UNIX
specification and then reversing it, is going to be broken for a number
of VMS file specifications. One of the things that I am working on is
removing all those double translation cases from the core modules, and
updating the documentation for vmsify and unixify as to why.
I am also trying to make sure that most of the common cases of
"vmsify(unixify($foo)) == $foo" and "unixify(vmsify($foo)) == $foo"
work, because the incorrect assumption that this can be done is so
prevalent. These problems especially show up when the EFS character set
is enabled.
It appears here that something in Perldoc translated a VMS specification
to UNIX, and then tried to treat portions of the UNIX specification as
VMS format instead of keeping the file specification in UNIX format.
That will only work with a subset of UNIX file specifications.
Most likely the vms specific code that is causing this problem
could/should simply be removed.
As of VMS 8.3, /tmp could be:
"^UP^/tmp"
tmp:
sys$scratch:
sys$posix_root:[tmp]
All depending on how the C feature logicals, the POSIX root, or the
logical names tmp or sys$posix_root are defined.
Consider also the cases are that "./foo" is sometimes "[]foo.*" where *
is based on the context of it being used by a VMS utility and other
times it is simply "[]foo." where sometimes the trailing "." is significant.
And "[]foo." needs to be translated to "./foo". "./foo." translates to
"[]foo^..".
-John
[EMAIL PROTECTED]
Personal Opinion Only