device name problems with extended charset and File::Spec

2009-06-02 Thread Craig A. Berry
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?



Craig A. Berry
mailto:craigbe...@mac.com

... getting out of a sonnet is much more
 difficult than getting in.
 Brad Leithauser



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

2009-06-02 Thread John E. Malmberg

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.

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
wb8...@qsl.net
Personal Opinion Only



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

2009-06-02 Thread John E. Malmberg

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
wb8...@qsl.net
Personal Opinion Only




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

2009-06-02 Thread Craig A. Berry


On Jun 2, 2009, at 8:39 AM, John E. Malmberg wrote:


John E. Malmberg wrote:




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.



Thanks.  The blead build is currently broken so don't synch first.   
Hopefully we'll get it all sorted out soonish.



Craig A. Berry
mailto:craigbe...@mac.com

... getting out of a sonnet is much more
 difficult than getting in.
 Brad Leithauser



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

2009-06-02 Thread John E. Malmberg

Craig A. Berry wrote:


On Jun 2, 2009, at 8:39 AM, John E. Malmberg wrote:


John E. Malmberg wrote:




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.



Thanks.  The blead build is currently broken so don't synch first.  
Hopefully we'll get it all sorted out soonish.


I am glad that I did not.  I am running a test build now.

It was in the EFS internal version of vmsify(/SYS$SCRATCH).  It was 
incorrectly translating it to SYS$SCRATCH:[00].


I am a bit surprised that this did not show up sooner.  In addition to 
the patch to VMS.C, I need to add a test for this.


-John
wb8...@qsl.net
Personal Opinion Only