Author: schwern
Date: Tue Sep 23 03:14:34 2008
New Revision: 11871

Modified:
   Module-Build/trunk/   (props changed)
   Module-Build/trunk/lib/Module/Build/Base.pm

Log:
 [EMAIL PROTECTED]:  schwern | 2008-09-23 03:14:19 -0700
 Quiet an uninit warning when using auto_features.


Modified: Module-Build/trunk/lib/Module/Build/Base.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Base.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Base.pm Tue Sep 23 03:14:34 2008
@@ -1084,10 +1084,10 @@
 
   $self->log_info("Checking features:\n");
 
-  my $max_name_len;
-  $max_name_len = ( length($_) > $max_name_len ) ?
-                    length($_) : $max_name_len
-    for keys %$features;
+  my $max_name_len = 0;
+  for my $name (keys %$features) {
+      $max_name_len = max( length($name), $max_name_len );
+  }
 
   while (my ($name, $info) = each %$features) {
     $self->log_info("  $name" . '.' x ($max_name_len - length($name) + 4));
@@ -1115,6 +1115,11 @@
   $self->log_warn("\n");
 }
 
+sub max {
+    my($a, $b) = @_;
+    return $a > $b ? $a : $b;
+}
+
 sub prereq_failures {
   my ($self, $info) = @_;
 

Reply via email to