Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <200301051902.h05J22p26110@smtp3.ActiveState.com> To: "LA Walsh" cc: perl5-porters AT perl DOT org, cygwin AT cygwin DOT com Subject: Re: Repost, different list...File::Spec, Cygwin, Syntactic vs. Semantic path analysis In-reply-to: Your message of "Sun, 05 Jan 2003 00:41:31 PST." <012901c2b496$3f4955e0$1403a8c0 AT sc DOT tlinx DOT org> Date: Sun, 05 Jan 2003 11:02:02 -0800 From: Gurusamy Sarathy On Sun, 05 Jan 2003 00:41:31 PST, "LA Walsh" wrote: >Syntactically, this can't be anticipated or interpreted and the use of a simpl >e, documented limitation -- the assumption of non-intermixing of \ and / as pa >thname component separators in the same pathname would be used. So the first >"/" sets the dir sep to "/" and "\" could signal a warning that the syntax is >unclear. But a pathname with "\" as the first dir sep, would throw an illegal >-filename exception if "/" was encountered, because in places where '\' is a >dirsep, '/' is a switch character. I agree with most of your points, and in particular with the one above. I consider File::Spec::Win32 currently broken because it hijacks all paths and turns them into the backslashed variety, which is completely wrong from the portability POV. (By which I mean that utilities written for UNIX that would otherwise work on windows are now broken because of this change.) As far as the Win32 native port goes (I'm not really that cygwin-savvy to comment on what should happen for that port) I like to see: * Where there is a prior hint for what the directory separator should be (either in the form of (0) an explicit argument specifying the separator, or failing that (1) a module/class variable, or failing that (2) a preexisting directory separator in one of the path arguments), File::Spec should use that for catenating/canonicalizing paths. * Where there is no such hint available, File::Spec should default to using '/' as the dirsep (which is the portable default and hence should always be the preferred one). Note that this was the situation in 5.6.1 and before, so I'm not really that much worried about "breaking" the new behavior/bugs. Thanks, Sarathy gsar AT ActiveState DOT com -- 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/