Subject: | Mishandling of BUILD_ZLIB=0 option |
Date: | Tue, 21 May 2013 12:05:45 -0400 |
To: | bug-Compress-Raw-Zlib [...] rt.cpan.org |
From: | "Daniel Macks" <dmacks [...] netspace.org> |
Compress-Raw-Zlib-2.060 Makefile.PL seems to allow over-riding of config.in values with shell env variables (falling back to config.in if no shell env passed). For example lines 237-238,
$ZLIB_INCLUDE = $ENV{'ZLIB_INCLUDE'} || $Info{'INCLUDE'} ;
$ZLIB_LIB = $ENV{'ZLIB_LIB'} || $Info{'LIB'} ;
and line 248:
my $x = $ENV{'BUILD_ZLIB'} || $Info{'BUILD_ZLIB'} ;
That latter one is broken because the value itself is a boolean, so the logic falls through to config.in if I explicitly set a value that is false. Compress-Raw-Bzip2-2.060 handles these correctly, checking for them via defined(). For example,
my $x = defined($ENV{'BUILD_ZLIB'}) || $Info{'BUILD_ZLIB'} ;
would be the analogous solution for the latter case.
dan
--
Daniel Macks
dmacks@netspace.org