Skip Menu |

This queue is for tickets about the Compress-Raw-Zlib CPAN distribution.

Report information
The Basics
Id: 85492
Status: resolved
Priority: 0/
Queue: Compress-Raw-Zlib

Owner: Nobody in particular
Requestors: dmacks [...]

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

Subject: Mishandling of BUILD_ZLIB=0 option
Date: Tue, 21 May 2013 12:05:45 -0400
To: bug-Compress-Raw-Zlib [...]
From: "Daniel Macks" <dmacks [...]>
Download (untitled) / with headers
text/plain 795b
Compress-Raw-Zlib-2.060 Makefile.PL seems to allow over-riding of values with shell env variables (falling back to 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 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
Subject: Re: [ #85492] Fixed solution
Date: Tue, 21 May 2013 12:29:00 -0400
To: bug-Compress-Raw-Zlib [...]
From: "Daniel Macks" <dmacks [...]>
Download (untitled) / with headers
text/plain 212b
Show quoted text
>     my $x = defined($ENV{'BUILD_ZLIB'}) || $Info{'BUILD_ZLIB'} ;
Er, make that: my $x = defined($ENV{'BUILD_ZLIB'}) ? $ENV{'BUILD_ZLIB'} : $Info{'BUILD_ZLIB'} ; dan -- Daniel Macks
Thanks Daniel, change applied. Paul

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to