From: Ilya Zakharevich on
On 2010-08-05, Klaus <klaus03(a)gmail.com> wrote:
>> > unless ($^O eq 'MSWin32' or $^O eq 'linux') {
>> > � � die "Error-0010: File::Vctools can only run on \$^O = 'MSWin32' or
>> > 'linux', but found \$^O = '$^O'";
>> > }
>>
>> Why do you think so?!
>
> Well, the package "File::Vctools" installs some *.pl scripts that in
> turn, generate other *.pl scripts, these "other" *.pl scripts call
> system() with slashes (on Linux) or backslashes (on Windows) as a
> directory separator.

And system() calls WHAT? If used correctly [*], paths with slashes work
fine on Windows. As they do on hundreds of other OSes...

[*] Paths SHOULD be *quoted* (unless multi-arg system() is used)
anyway, right?

[If you KNOW that your system() uses some (broken) program which
bulks on /-paths on Windows, you can use \ on Windows, and /
otherwise. This would cover all but a handful of OSes.]

> It is difficult to control what separator has to be used. I managed to
> test successfully on Linux and on Windows, but I don't have any other
> operating system available, so guessing what separator works for which
> other operating system would certainly be a waste of testers time
> (even if it is just an automated test / test smoker)

Using catdir()/catfile() is bullet-proof, but one may need to get used
to the idea that directories and files may "live in different
namespace worlds".

Yours,
Ilya