This is the mail archive of the
mailing list for the Cygwin project.
Re: Perl package File::Spec confused under cygwin
- From: Michael A Chase <mchase at ix dot netcom dot com>
- To: cygwin at cygwin dot com, "linda w (cyg)" <cygwin at tlinx dot org>
- Date: Sat, 21 Dec 2002 18:59:49 -0800 (PST)
- Subject: Re: Perl package File::Spec confused under cygwin
- References: <email@example.com>
- Reply-to: Michael A Chase <mchase at ix dot netcom dot com>
On Sat, 21 Dec 2002 17:36:58 -0800 "linda w (cyg)" <firstname.lastname@example.org> wrote:
>> Note that Cygwin, like Unix, doesn't have a concept of
>> volume. Everything except network paths (//host/dir) are
>> based on a single root directory.
> But Unix does have a concept of a mount point (device) and
> path from the mount point. Conceivably, one could view the
> mount point itself as a local host name for the "volume" (local, remote or a
> device) with path being location on the mounted fs.
device != volume. For the purposes of File::Spec, it would be better to
leave the directory structure as a single tree.
> It is arbitrary to choose to see the /fs as one giant undifferentiated
But that is the convention used by Unix and hence Cygwin. You can
distinguish which device a file or directory is in by using the first
element returned by stat(), but that doesn't affect the file spec.
>> You can always call File::Spec::Win32 -> splitpath() to get
>> that behavior.
> Well, for 'portability' one shouldn't call ::<OS> anything.
> The purpose of File::Spec was to provide a OS independent way to
> deconstruct/construct pathnames into their separate components.
Portability is a worthy goal, but sometimes you have to accomodate your
specific environment, that's why $^O is available.
>> It does, but File::Spec::Cygwin is very close to File::Spec::Unix.
> Yeah...got that. I guess most immediate fix would be to fix
> the Cygwin version to differentiate things... then if it was
> important, one could split the path to mount:path for more useful, yet
> spec-compatible functionality.
If you submit a Perl bug report with a patch that does what you want and
explains why you want it, it is likely to get included in the next release
of Perl. If you talk nice to Gerrit, you may even get it in the next build
of Cygwin Perl pending a change to the base source. Borrowed code from
File/Spec/Win32.pm may provide a start.
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html