Skip to content
This repository
Browse code

You cannot trust that a boolean function will return 1.

  • Loading branch information...
commit fce7c9ccdf619f70cbe9fb957b626cd420527102 1 parent 8b7add7
Michael G. Schwern authored February 03, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/Module/Build/Base.pm
2  lib/Module/Build/Base.pm
@@ -38,7 +38,7 @@ sub new {
38 38
 
39 39
   $self->check_manifest;
40 40
   $self->auto_require;
41  
-  if ( $self->check_prereq + $self->check_autofeatures != 2) {
  41
+  if ( !$self->check_prereq || !$self->check_autofeatures ) {
42 42
     $self->log_warn(<<EOF);
43 43
 
44 44
 ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions

3 notes on commit fce7c9c

Leon Timmermans
Owner

Both have the side-effect of outputting stuff to the user. Now that output may be incomplete if the dist is missing prerequisites.

Michael G. Schwern
Owner

Yep, I just fixed it. 8acbab6

The side effects are evil all the way down. I was particularly disheartened to see that they check for the word disabled in the formatted output.

David Golden
Owner

There is an insane amount of stuff like that in Module::Build. Things that seem simple refactoring/cleanup wind up having unexpected consequences.

Please sign in to comment.
Something went wrong with that request. Please try again.