httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm
Date Tue, 11 Dec 2001 05:08:13 GMT
stas        01/12/10 21:08:13

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfig.pm
  Log:
  - add as_string config method, ala ModPerl::Config::as_string
  
  Revision  Changes    Path
  1.94      +23 -0     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- TestConfig.pm	2001/12/11 04:08:55	1.93
  +++ TestConfig.pm	2001/12/11 05:08:13	1.94
  @@ -1192,6 +1192,29 @@
       close $fh or die "failed to write $file: $!";
   }
   
  +sub as_string {
  +    my $cfg = '';
  +    my $command = '';
  +
  +    # httpd opts
  +    my $test_config = Apache::TestConfig->new;
  +    if (my $httpd = $test_config->{vars}->{httpd}) {
  +        $command = "$httpd -V";
  +        $cfg .= "\n*** $command\n";
  +        $cfg .= qx{$command};
  +    } else {
  +        $cfg .= "\n\n*** The httpd binary was not found\n";
  +    }
  +
  +    # perl opts
  +    my $perl = $^X;
  +    $command = "$perl -V";
  +    $cfg .= "\n\n*** $command\n";
  +    $cfg .= qx{$command};
  +
  +    return $cfg;
  +}
  +
   1;
   
   =head1 NAME
  
  
  

Mime
View raw message