Subject: RE: Perl pathname parsing, File::Spec, proposed fix
From: "linda w \(cyg\)" <[email-masked]>
To: "'Gerrit P. Haase'" <[email-masked]>
Cc: <[email-masked]>
Date: Fri, 3 Jan 2003 11:30:01 -0800

It handles forward slash the same as back slash, so 
/usr/local/bin would get parsed as (d,p,f)=(,/usr/local,bin) as one
would expect w/o adding a trailing slash.

There are various shortcomings in the current cygwin as well as the
current win32 and unix implementations that are not addressed.

In some cases there are references to other OS's interacting with the OS
for "semantic" meaning/parsing.  There is also, though, the idea of "syntactic -
only" parsing which is what I feel is the original intent of the File::Spec
module for Unix.

Originally I started to argue for the need for a semantic parsing, but on
further study of the manpage, I gathered that as the original module was
implemented, no semantic parsing was intended or included.  

It is unfortunate, but it seems the apple and vms implementations are faulty
in this respect.  If I am running on linux and want to construct/deconstruct
apple or VMS filenames, results will be unpredictable.  As the code stands,
the Win32 module would perform correctly -- within the limits of syntactic
analysis.

The current implementation attempts to use unix-only name parsing which
doesn't handle the full range of cygwin-supported filenames.

Linda

> -----Original Message-----
> From: Gerrit P. Haase [mailto:[email-masked]] 
> Sent: January 03, 2003 02:40a
> To: linda w (cyg)
> Cc: [email-masked]
> Subject: Re: Perl pathname parsing, File::Spec, proposed fix
> 
> 
> Hallo linda,
> 
> Am Dienstag, 31. Dezember 2002 um 03:18 schriebst du:
> 
> > Does anyone see a problem with the following proposed change in the 
> > Perl lib dir?
> 
> Have not tried it yet.
> 
> > It seems the Win32 handles both forward and backward slashes and no 
> > special module for Cygwin is needed.
> 
> What about the usual Cygwin path semantics like /, /lib, 
> /usr/local/bin?  Is it handled too?  I will try to build 
> bleadperl and run the tests with this included.
> 
> 
> Gerrit
> -- 
> =^..^=
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/