perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r280747 - /perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
Date Wed, 14 Sep 2005 02:58:23 GMT
Author: pgollucci
Date: Tue Sep 13 19:58:21 2005
New Revision: 280747

URL: http://svn.apache.org/viewcvs?rev=280747&view=rev
Log:
functionalize the ldd/otool output

Modified:
    perl/Apache-Test/trunk/lib/Apache/TestConfig.pm

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=280747&r1=280746&r2=280747&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Tue Sep 13 19:58:21 2005
@@ -1838,20 +1838,7 @@
         $cfg .= "\n*** $command\n";
         $cfg .= qx{$command};
 
-        my $command;
-        if (OSX) {
-            my $otool = Apache::TestConfig::which('otool');
-            $command = "$otool -L $httpd" if $otool;
-        }
-        elsif (!WIN32) {
-            my $ldd = Apache::TestConfig::which('ldd');
-            $command = "$ldd $httpd" if $ldd;
-        }
-
-        if ($command) {
-            $cfg .= "\n*** $command\n";
-            $cfg .= qx{$command};
-        }
+        $cfg .= ldd_as_string($httpd);
     } 
     else {
         $cfg .= "\n\n*** The httpd binary was not found\n";
@@ -1866,6 +1853,27 @@
     return $cfg;
 }
 
+sub ldd_as_string {
+    my $httpd = shift;
+
+    my $command;
+    if (OSX) {
+        my $otool = which('otool');
+        $command = "$otool -L $httpd" if $otool;
+    }
+    elsif (!WIN32) {
+        my $ldd = which('ldd');
+        $command = "$ldd $httpd" if $ldd;
+    }
+
+    if ($command) {
+        $cfg .= "\n*** $command\n";
+        $cfg .= qx{$command};
+    }
+
+    return $cfg;
+}
+  
 # make a string suitable for feed to shell calls (wrap in quotes and
 # escape quotes)
 sub shell_ready {



Mime
View raw message