cvs commit: modperl-2.0/lib/ModPerl Config.pm

2001-04-20 Thread sbekman

sbekman 01/04/20 11:25:49

  Modified:lib/ModPerl Config.pm
  Log:
  use strict
  
  Revision  ChangesPath
  1.2   +2 -1  modperl-2.0/lib/ModPerl/Config.pm
  
  Index: Config.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Config.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Config.pm 2001/04/20 18:08:03 1.1
  +++ Config.pm 2001/04/20 18:25:45 1.2
  @@ -1,5 +1,6 @@
   package ModPerl::Config;
   
  +use strict;
   use lib qw(Apache-Test/lib);
   
   use Apache::Build ();
  @@ -19,7 +20,7 @@
   
   my $test_config = Apache::TestConfig->new;
   my $httpd = $test_config->{vars}->{httpd};
  -$command = "$httpd -v";
  +my $command = "$httpd -v";
   $cfg .= "\n\n*** $command\n";
   $cfg .= qx{$command};
   
  
  
  



cvs commit: modperl-2.0/util bugreport.pl config.pl

2001-04-20 Thread sbekman

sbekman 01/04/20 11:08:09

  Modified:util config.pl
  Added:   lib/ModPerl Config.pm
   util bugreport.pl
  Log:
  * moving the code from util/config.pl into a new lib/ModPerl/Config.pm
  * now util/config.pl uses lib/ModPerl/Config.pm
  * a new bugreport util uses lib/ModPerl/Config.pm
  
  Revision  ChangesPath
  1.1  modperl-2.0/lib/ModPerl/Config.pm
  
  Index: Config.pm
  ===
  package ModPerl::Config;
  
  use lib qw(Apache-Test/lib);
  
  use Apache::Build ();
  use Apache::TestConfig ();
  
  sub config_as_str{
  my $build_config = Apache::Build->build_config;
  
  my $cfg = '';
  
  $cfg .= "*** using $INC{'Apache/BuildConfig.pm'}\n";
  
  $cfg .= "*** Makefile.PL options:\n";
  $cfg .= join '',
  map {sprintf "%-20s => %s\n", $_, $build_config->{$_}}
  grep /^MP_/, sort keys %$build_config;
  
  my $test_config = Apache::TestConfig->new;
  my $httpd = $test_config->{vars}->{httpd};
  $command = "$httpd -v";
  $cfg .= "\n\n*** $command\n";
  $cfg .= qx{$command};
  
  my $perl = $build_config->{MODPERL_PERLPATH};
  $command = "$perl -V";
  $cfg .= "\n\n*** $command\n";
  $cfg .= qx{$command};
  
  return $cfg;
  
  }
  
  1;
  __END__
  
  =pod
  
  =head1 NAME - ModPerl::Config
  
  =head1 DESCRIPTION
  
  Functions to retrieve mod_perl specific env information.
  
  =cut
  
  
  
  
  1.2   +6 -24 modperl-2.0/util/config.pl
  
  Index: config.pl
  ===
  RCS file: /home/cvs/modperl-2.0/util/config.pl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- config.pl 2001/04/20 17:07:47 1.1
  +++ config.pl 2001/04/20 18:08:06 1.2
  @@ -1,27 +1,9 @@
  -use lib qw(lib);
  -use lib qw(Apache-Test/lib);
  +#!/usr/bin/perl -w
   
  -use Apache::Build ();
  -use Apache::TestConfig ();
  +use strict;
  +use FindBin qw($Bin);
  +use lib "$Bin/../lib";
   
  -my $build_config = Apache::Build->build_config;
  +use ModPerl::Config ();
   
  -print "using $INC{'Apache/BuildConfig.pm'}\n";
  -
  -print "Makefile.PL options:\n";
  -for (sort keys %$build_config) {
  -next unless /^MP_/;
  -printf "%-20s => %s\n", $_, $build_config->{$_};
  -}
  -
  -my $test_config = Apache::TestConfig->new;
  -my $httpd = $test_config->{vars}->{httpd};
  -
  -print "\n$httpd -V:\n";
  -system "$httpd -V";
  -
  -my $perl = $build_config->{MODPERL_PERLPATH};
  -
  -print "\n$perl -V:\n";
  -system "$perl -V";
  -
  +print ModPerl::Config::config_as_str();
  
  
  
  1.1  modperl-2.0/util/bugreport.pl
  
  Index: bugreport.pl
  ===
  #!/usr/bin/perl -w
  
  use strict;
  use FindBin qw($Bin);
  use lib "$Bin/../lib";
  
  use ModPerl::Config ();
  
  my $env = ModPerl::Config::config_as_str();
  {
  local $/ = undef;
  my $template = ;
  $template =~ s/\[CONFIG\]/$env/;
  print $template;
  }
  
  __DATA__
  
  -8<--Start Bug Report 8<--
  1. Problem Description:
  
[DESCRIBE THE PROBLEM HERE]
  
  2. Used Components and their Configuration:
  
  [CONFIG]
  
  3. This is the core dump trace: (if you get a core dump):
  
[CORE TRACE COMES HERE]
  
  -8<--End Bug Report --8<--
  
  Note: Complete the rest of the details and post this bug report to
  [EMAIL PROTECTED] as is. To subscribe to the list send an empty
  email to [EMAIL PROTECTED]
  
  
  



cvs commit: modperl-2.0/lib/ModPerl WrapXS.pm

2001-04-20 Thread dougm

dougm   01/04/20 11:03:49

  Modified:lib/ModPerl WrapXS.pm
  Log:
  use thr corrent lib path
  
  Revision  ChangesPath
  1.8   +1 -1  modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WrapXS.pm 2001/04/20 03:07:53 1.7
  +++ WrapXS.pm 2001/04/20 18:03:45 1.8
  @@ -283,7 +283,7 @@
   print $fh <{noedit_warning_hash}
   
  -use lib qw(../../lib); #for Apache::BuildConfig
  +use lib qw(../../../lib); #for Apache::BuildConfig
   use ModPerl::MM ();
   
   ModPerl::MM::WriteMakefile(
  
  
  



cvs commit: modperl-2.0 Makefile.PL

2001-04-20 Thread dougm

dougm   01/04/20 10:43:04

  Modified:.Makefile.PL
  Log:
  need to push tables_dir into @INC when xs is not generated
  
  Revision  ChangesPath
  1.34  +11 -5 modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Makefile.PL   2001/04/12 16:03:55 1.33
  +++ Makefile.PL   2001/04/20 17:42:57 1.34
  @@ -73,7 +73,14 @@
   generate_script($_);
   }
   
  -generate_xs($httpd_version) if $build->{MP_GENERATE_XS};
  +my $tables_dir = tables_dir($httpd_version);
  +
  +unshift @INC, $tables_dir;
  +
  +if ($build->{MP_GENERATE_XS}) {
  +print "generating XS code using $tables_dir...\n";
  +generate_xs($httpd_version);
  +}
   }
   
   sub post_configure {
  @@ -97,7 +104,7 @@
   $build->save;
   }
   
  -sub generate_xs {
  +sub tables_dir {
   my $httpd_version = shift;
   
   my $tables_version = 'current';
  @@ -105,10 +112,9 @@
   #$httpd_version =~ /-dev$/ ? 'current' : $httpd_version;
   
   my $tables_dir = "xs/tables/$tables_version";
  -unshift @INC, $tables_dir;
  -
  -print "generating XS code using $tables_dir...\n";
  +}
   
  +sub generate_xs {
   require ModPerl::WrapXS;
   
   my $xs = ModPerl::WrapXS->new;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-04-20 Thread dougm

dougm   01/04/20 10:09:20

  Modified:lib/Apache Build.pm
  Log:
  prevent warning
  
  Revision  ChangesPath
  1.42  +1 -0  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Build.pm  2001/04/10 22:52:36 1.41
  +++ Build.pm  2001/04/20 17:09:16 1.42
  @@ -440,6 +440,7 @@
$self->default_dir,
'../httpd-2.0')
 {
  +  next unless $src_dir;
 next unless (-d $src_dir || -l $src_dir);
 next if $seen{$src_dir}++;
 push @dirs, $src_dir;
  
  
  



cvs commit: modperl-2.0/util config.pl

2001-04-20 Thread dougm

dougm   01/04/20 10:07:49

  Added:   util config.pl
  Log:
  add util/config.pl script to report configuration
  
  Revision  ChangesPath
  1.1  modperl-2.0/util/config.pl
  
  Index: config.pl
  ===
  use lib qw(lib);
  use lib qw(Apache-Test/lib);
  
  use Apache::Build ();
  use Apache::TestConfig ();
  
  my $build_config = Apache::Build->build_config;
  
  print "using $INC{'Apache/BuildConfig.pm'}\n";
  
  print "Makefile.PL options:\n";
  for (sort keys %$build_config) {
  next unless /^MP_/;
  printf "%-20s => %s\n", $_, $build_config->{$_};
  }
  
  my $test_config = Apache::TestConfig->new;
  my $httpd = $test_config->{vars}->{httpd};
  
  print "\n$httpd -V:\n";
  system "$httpd -V";
  
  my $perl = $build_config->{MODPERL_PERLPATH};
  
  print "\n$perl -V:\n";
  system "$perl -V";
  
  
  
  



cvs commit: modperl-2.0/util config.pl

2001-04-20 Thread dougm

dougm   01/04/20 09:50:57

  Modified:pod  modperl_dev.pod
  Added:   util config.pl
  Log:
  add util/config.pl script to report configuration
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  



cvs commit: modperl-2.0/Apache-Test/lib/Apache TestConfig.pm

2001-04-20 Thread dougm

dougm   01/04/20 09:46:52

  Modified:Apache-Test/lib/Apache TestConfig.pm
  Log:
  deal properly with args
  
  Revision  ChangesPath
  1.10  +5 -2  modperl-2.0/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===
  RCS file: /home/cvs/modperl-2.0/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestConfig.pm 2001/04/19 21:21:16 1.9
  +++ TestConfig.pm 2001/04/20 16:46:50 1.10
  @@ -74,9 +74,12 @@
   }
   
   sub new {
  -my($class, $args) = @_;
  +my $class = shift;
  +my $args;
   
  -$args = ($args and ref($args)) ? {%$args} : {@_}; #copy
  +$args = shift if $_[0] and ref $_[0];
  +
  +$args = $args ? {%$args} : {@_}; #copy
   
   my $thaw = {};