Subject: | Loose regex matching against $^O sometimes makes the wrong choice |
This appears on line 75 of Validator.pm:
my $gentmp = $ENV{TEMP} || ($^O =~ /Win/i) ? "c:/temp/" : '/tmp/';
Unfortunately, $^O on Mac OS X contains the word "Darwin", which matches /Win/i. Consequently, Validator.pm makes the wrong choice and tries to create c:/temp/, which fails on a UNix-like system like Mac OS X.
I recommend using File::Temp to create temporary files in a platform independent manner. Failing that, File::Spec could be used to build platform-dependent file paths.