Re: [patch@35050] replace pathify_dirspec in VMS with new version

[email protected] ("Craig A. Berry")
Newsgroups perl.perl5.porters,perl.vmsperl
Message-ID <[email protected]>
On Dec 7, 2008, at 12:46 PM, John E. Malmberg wrote:

> Nicholas Clark wrote:
>> On Sun, Dec 07, 2008 at 08:46:52AM -0600, John E. Malmberg wrote:
>>> An additional note, this patch may cause some tests in vmsfspec.t  
>>> to fail.  That is because the old behavior of pathfiy_dirspec()  
>>> was inconsistent with vmsify().
>> On Sun, Dec 07, 2008 at 10:15:39AM -0600, John E. Malmberg wrote:
>>> This is all needed for me to proceed with the testing of VMS perl  
>>> in a UNIX compatible mode.  Currently most of the tests are passing.
>> My view (and on matters VMS specific I'm going to defer to Craig,  
>> if he
>> differs) is that if a needed change temporarily makes a known  
>> subset of
>> tests fail, then it should include a patch to make exactly those  
>> tests
>> TODO tests.

I don't differ, except what I think we're seeing here is a change in  
behavior, not temporary TODOs.

> Point taken,
>
> Attached is vms/ext/filespec.t that changes those tests to be passing.

The documentation for VMS::Filespec::pathify says, "the file type and  
version, if specified, must be .DIR;1. For compatibility with Unix  
usage, the type and version may also be omitted."  The tests have  
enforced this behavior since before 5.004.  You're proposing to change  
the behavior so that a file type that is not .DIR is no longer  
considered a file type at all and the dot would then be considered  
part of the filename rather than the start of the type field.  That  
could easily break existing code and doesn't seem to me like the way  
to go.

Now if the dot is escaped and is thus unambiguously just an actual dot  
rather than a directory or file type delimiter that's a different  
story.  We should support and test for those cases, something like:

__path_^.actualdot pathify __path_.actualdot/


> --- /rsync_root/perl/vms/ext/filespec.t	Thu Mar 15 20:43:30 2007
> +++ /ref1_root/perl/vms/ext/filespec.t	Sun Dec  7 12:35:53 2008
> @@ -100,14 +100,14 @@
> __down_:[__the_.__garden_]__path_      pathify __down_: 
> [__the_.__garden_.__path_]
> __down_:[__the_.__garden_]__path_.     pathify # N.B. trailing . ==>  
> null type
> __down_:[__the_]__garden_.__path_      pathify undef
> -/__down_/__the_/__garden_/__path_.     pathify # N.B. trailing .  
> ==> null type
> -/__down_/__the_/__garden_.__path_      pathify undef
> +/__down_/__the_/__garden_/__path_.     pathify /__down_/__the_/ 
> __garden_/__path__/
> +/__down_/__the_/__garden_.__path_      pathify /__down_/__the_/ 
> __garden____path_/
> __down_:[__the_.__garden_]__path_.dir;2        pathify #N.B. ;2
> __path_        pathify __path_/
> /__down_/__the_/__garden_/.    pathify /__down_/__the_/__garden_/./
> /__down_/__the_/__garden_/..   pathify /__down_/__the_/__garden_/../
> /__down_/__the_/__garden_/...  pathify /__down_/__the_/__garden_/.../
> -__path_.notdir pathify undef
> +__path_.notdir pathify __path__notdir/
>
> # Both VMS/Unix and file/path conversions
> __down_:[__the_.__garden_]__path_.dir;1        unixpath        / 
> __down_/__the_/__garden_/__path_/

________________________________________
Craig A. Berry
mailto:[email protected]

"... getting out of a sonnet is much more
  difficult than getting in."
                  Brad Leithauser
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.