Re: device name problems with extended charset and File::Spec

"John E. Malmberg" <[email protected]>
Newsgroups gmane.comp.lang.perl.ports.vms
Message-ID <[email protected]>
John E. Malmberg wrote:
> Craig A. Berry wrote:
>> With current blead, if I define both DECC$EFS_CHARSET and 
>> DECC$EFS_FILENAME_UNIX_REPORT, I see the following:
>>
>> $ perl -"MFile::Spec::Functions" -e "print 
>> catfile(File::Spec->tmpdir(), 'bar');"
>> ./bar
>>
>> Obviously it should be giving me '/sys$scratch/bar'.
>>
>> With only DECC$EFS_CHARSET defined, I get:
>>
>> $ perl -"MFile::Spec::Functions" -e "print 
>> catfile(File::Spec->tmpdir(), 'bar');"
>> [.sys$scratch:]bar
>>
>> where it's apparently failed to recognize 'sys$scratch:' as a device 
>> name.  The colon is not escaped, so the result is not even a valid 
>> filespec, much less the correct one.
>>
>> Are there changes to File::Path kicking around somewhere that are not 
>> yet in blead, or is this still a todo?
> 
> The bug is in vms.c, not File::Spec.  These two one liners demonstrate it:
> 
> EAGLE> perl  -e "print 'true' if -w '/sys$scratch'"
> EAGLE> perl  -e "print 'true' if -w 'sys$scratch:'"
> true
> 
> Something is wrong with the stat code.  I will try to look at it tonight.

To be more precise, the problem has to be in the perl_cando code.

> In file::spec->_tmpdir() the -w test is used to make sure that the temp 
> directory is writable, and it falls back to "." if it can not find one 
> of '/tmp', '/sys$scratch', or $ENV{tempdir} as writable.


-John
[email protected]
Personal Opinion Only
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.