Subject: | 050interop-bzip2.t doesn't find bzip2.exe on Win32 |
Hi Paul,
I recently emailed you a patch for the same test file in IO-Compress-
Zlib-2.003. Similarly, the following patch enables bzip2.exe to be
found on Windows:
--- t\050interop-bzip2.t_orig 2006-12-28 06:17:42.000000000 +1100
+++ t\050interop-bzip2.t 2007-01-24 12:41:52.846375000 +1100
@@ -86,8 +86,9 @@
{
# Check external bzip2 is available
- my $name = 'bzip2';
- for my $dir (reverse split ":", $ENV{PATH})
+ my $name = $^O =~ /mswin/i ? 'bzip2.exe' : 'bzip2';
+ my $split = $^O =~ /mswin/i ? ';' : ':';
+ for my $dir (reverse split "$split", $ENV{PATH})
{
$BZIP2 = "$dir/$name"
if -x "$dir/$name" ;