Skip Menu |

This queue is for tickets about the HTML-Validator CPAN distribution.

Report information
The Basics
Id: 2489
Status: new
Priority: 0/
Queue: HTML-Validator

People
Owner: Nobody in particular
Requestors: siracusa [...] mindspring.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



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.