Re: File::Spec catfile etc.
[email protected] (Chris Nandor)
| Newsgroups | perl.perl5.porters,perl.macperl.porters,perl.vmsperl |
|---|---|
| Message-ID | <p05100300b7c7cb6906ce@[10.62.2.43]> |
At 10:21 -0400 2001.09.14, Barrie Slaymaker wrote:
>> 2. if the first argument is something denoting a root-level item ('/',
>> 'HD:', 'C:')
>
>When on that platform. This is so non-portable that I think we should
>emit warnings, so that code written on Win32, say, that calls
>
> $path = "C:\foo" ;
> $fullpath = File::Spec->catfile( $path, "bar" ) ;
>
>emits a warning about non-portable usage. However, I'd prefer that
>
> $fullpath = File::Spec::Win32->catfile( $path, "bar" ) ;
>
>not warn, though it's not a big deal to me.
>
>> or an empty string (''), then the behavior should be some sort
>> of platform-specific absolute path
>
>This should probably warn too, since it's non-portable, especially on
>volume oriented machines, where MacOS has a documented fallback for the
>root, Win32 could reasonably use either "C:\" or the current selected
>volume for the root (which is what "\" is).
I understand what you are saying; I don't have strong feelings either way
about warnings.
>If folks agree to the warnings, than once the MacOS and VMS code, tests, and
>docs settle down, I'll patch in the warnings and do doc cleanup.
>
>Sound reasonable?
Yep.
>P.S. Just a note to disavow ownership of File::Spec. Contrary to
>published reports, I don't accept/deny patches to File::Spec nor control
>it's destiny. I just help out with it, like everyone...
Sure. But you are most involved with it, and as such, probably have the
best big-picture view of it. So if you think something is best, I am
perfectly happy to defer to you, unless I am convinced you are wrong. :)
--
Chris Nandor [email protected] http://pudge.net/
Open Source Development Network [email protected] http://osdn.com/