cvs commit: modperl-2.0 Changes

2003-10-07 Thread stas
stas2003/10/07 11:28:38

  Modified:lib/ModPerl BuildOptions.pm
   .Changes
  Log:
  fix the Makefile.PL option parser to support overriding of certain
  build options, in addition to appending to them (.e.g. now MP_LIBNAME
  is overridable)
  Submitted by: Andrew Wyllie <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.22  +35 -25modperl-2.0/lib/ModPerl/BuildOptions.pm
  
  Index: BuildOptions.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -u -r1.21 -r1.22
  --- BuildOptions.pm   13 Aug 2003 22:54:10 -  1.21
  +++ BuildOptions.pm   7 Oct 2003 18:28:38 -   1.22
  @@ -83,10 +83,12 @@
   }
   }
   
  -if ($self->{$key}) {
  -$self->{$key} .= ' ';
  +if ($table->{$key}->{append}){
  +$self->{$key} = join " ", grep $_, $self->{$key}, $val;
  +}
  +else {
  +$self->{$key} = $val;
   }
  -$self->{$key} .= $val;
   
   print "   $key = $val\n" if $opts & VERBOSE;
   }
  @@ -137,7 +139,7 @@
   
   sub usage {
   my $table = table();
  -my @opts = map { "$_ - $table->{$_}" } sort keys %$table;
  +my @opts = map { "$_ - $table->{$_}->{val}" } sort keys %$table;
   join "\n", @opts;
   }
   
  @@ -151,8 +153,8 @@
   s/^\s+//; s/\s+$//;
   next if /^\#/ || /^$/;
   last if /^__END__/;
  -my($key, $val) = split /\s+/, $_, 2;
  -$table{'MP_' . $key} = $val;
  +my($key, $append, $val) = split /\s+/, $_, 3;
  +$table{'MP_' . $key} = { append => $append, val => $val };
   }
   
   return \%table;
  @@ -166,24 +168,32 @@
   
   1;
   
  +# __DATA__ format:
  +# keyappend description
  +# where:
  +# key:is the option name
  +# append: is whether we want to replace a default option (0)
  +# or append the arg to the option (1)
  +# desc:   description for this option
  +
   __DATA__
  +USE_GTOP   0Link with libgtop and enable libgtop reporting
  +DEBUG  0Turning on debugging (-g -lperld) and tracing
  +MAINTAINER 0Maintainer mode: DEBUG=1 -DAP_DEBUG -Wall ...
  +CCOPTS 1Add to compiler flags
  +TRACE  0Turn on tracing
  +USE_DSO0Build mod_perl as a dso
  +USE_STATIC 0Build mod_perl static
  +INST_APACHE2   0Install *.pm relative to Apache2/ directory
  +PROMPT_DEFAULT 0Accept default value for all would-be prompts
  +OPTIONS_FILE   0Read options from given file
  +STATIC_EXTS0Build Apache::*.xs as static extensions
  +APXS   0Path to apxs
  +AP_PREFIX  0Apache installation or source tree prefix
  +APR_CONFIG 0Path to apr-config
  +XS_GLUE_DIR1Directories containing extension glue
  +INCLUDE_DIR1Add directories to search for header files
  +GENERATE_XS0Generate XS code based on httpd version
  +LIBNAME0Name of the modperl dso library (default is  mod_perl)
  +COMPAT_1X  0Compile-time mod_perl 1.0 backcompat (default is  on)
   
  -USE_GTOP Link with libgtop and enable libgtop reporting
  -DEBUGTurning on debugging (-g -lperld) and tracing
  -MAINTAINER   Maintainer mode: DEBUG=1 -DAP_DEBUG -Wall ...
  -CCOPTS   Add to compiler flags
  -TRACETurn on tracing
  -USE_DSO  Build mod_perl as a dso
  -USE_STATIC   Build mod_perl static
  -INST_APACHE2 Install *.pm relative to Apache2/ directory
  -PROMPT_DEFAULT   Accept default value for all would-be prompts
  -OPTIONS_FILE Read options from given file
  -STATIC_EXTS  Build Apache::*.xs as static extensions
  -APXSPath to apxs
  -AP_PREFIXApache installation or source tree prefix
  -APR_CONFIG   Path to apr-config
  -XS_GLUE_DIR Directories containing extension glue
  -INCLUDE_DIR Add directories to search for header files
  -GENERATE_XS Generate XS code based on httpd version
  -LIBNAME Name of the modperl dso library (default is mod_perl)
  -COMPAT_1X   Compile-time mod_perl 1.0 backcompat (default is on)
  
  
  
  1.229 +4 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.228
  retrieving revision 1.229
  diff -u -u -r1.228 -r1.229
  --- Changes   7 Oct 2003 01:04:13 -   1.228
  +++ Changes   7 Oct 2003 18:28:38 -   1.229
  @@ -12,6 +12,10 @@
   
   =item 1.99_11-dev - 
   
  +fix the Makefile.PL option parser to support overriding of certain
  +build options, in addition to appending to them (.e.g. now MP_LIBNAME
  +is overridable) [Andrew Wyllie <[EMAIL PROTECTED]>]
 

cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2003-10-07 Thread geoff
geoff   2003/10/07 12:09:05

  Modified:lib/ModPerl Code.pm
   t/response/TestApache conftree.pm
   xs/tables/current/ModPerl FunctionTable.pm
  Added:   t/hooks  default_port.t
   t/hooks/TestHooks default_port.pm
  Log:
  add PerlDefaultPortHandler
  
  Revision  ChangesPath
  1.108 +2 -2  modperl-2.0/lib/ModPerl/Code.pm
  
  Index: Code.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- Code.pm   1 Oct 2003 19:53:05 -   1.107
  +++ Code.pm   7 Oct 2003 19:09:05 -   1.108
  @@ -18,7 +18,7 @@
   my %handlers = (
   Process=> [qw(ChildInit ChildExit)], #Restart PreConfig
   Files  => [qw(OpenLogs PostConfig)],
  -PerSrv => [qw(PostReadRequest Trans)],
  +PerSrv => [qw(PostReadRequest Trans DefaultPort)],
   PerDir => [qw(HeaderParser
 Access Authen Authz
 Type Fixup Response Log Cleanup
  @@ -217,7 +217,7 @@
   my $ix = $self->{handler_index}->{$class}->[$i];
   
   if ($callback =~ m/modperl_callback_per_(dir|srv)/) {
  -if ($ix =~ m/AUTH|TYPE|TRANS/) {
  +if ($ix =~ m/AUTH|TYPE|TRANS|PORT/) {
   $pass =~ s/MP_HOOK_RUN_ALL/MP_HOOK_RUN_FIRST/;
   }
   }
  
  
  
  1.1  modperl-2.0/t/hooks/default_port.t
  
  Index: default_port.t
  ===
  use strict;
  use warnings FATAL => 'all';
  
  # force use of Apache:TestClient, which doesn't
  # require us to set a port in the URI
  BEGIN { $ENV{APACHE_TEST_PRETEND_NO_LWP} = 1 }
  
  use Apache::Test;
  use Apache::TestUtil;
  use Apache::TestRequest;
  
  plan tests => 4;
  
  {
  Apache::TestRequest::module("TestHooks::default_port");
  
  my $uri = '/TestHooks__default_port';
  my $response = GET $uri;
  ok t_cmp(80, $response->content, "$uri, default Apache hook");
  }
  
  {
  Apache::TestRequest::module("TestHooks::default_port");
  
  my $uri = '/TestHooks__default_port';
  my $response = GET "$uri?362";
  ok t_cmp(362, $response->content, "$uri, PerlDefaultPortHandler");
  }
  
  {
  Apache::TestRequest::module("TestHooks::default_port2");
  my $hostport = Apache::TestRequest::hostport(Apache::Test::config());
  my $port = (split ':', $hostport)[1];
  
  my $uri = '/TestHooks__default_port2';
  my $response = GET $uri;
  ok t_cmp($port, $response->content, "$uri, no PerlDefaultHandler configured");
  }
  
  {
  Apache::TestRequest::module("TestHooks::default_port3");
  my $hostport = Apache::TestRequest::hostport(Apache::Test::config());
  my $port = (split ':', $hostport)[1];
  
  my $uri = "http://$hostport/";;
  
  my $response = GET $uri;
  ok t_cmp($port, $response->content, "$uri, no PerlDefaultHandler configured");
  }
  
  
  
  1.1  modperl-2.0/t/hooks/TestHooks/default_port.pm
  
  Index: default_port.pm
  ===
  package TestHooks::default_port;
  
  use strict;
  use warnings FATAL => 'all';
  
  use Apache::Test;
  
  use APR::Table ();
  use Apache::RequestRec ();
  use Apache::RequestIO ();
  
  use Apache::Const -compile => qw(OK DECLINED);
  
  sub handler {
  my $r = shift;
  
  my $port = $r->args || Apache::OK;
  
  return int $port;
  }
  
  sub response {
  my $r = shift;
  
  $r->content_type('text/plain');
  
  $r->print($r->get_server_port);
  
  return Apache::OK;
  }
  
  1;
  __DATA__
  # create a new virtual host so we can put the
  # PerlDefaultPortHandler on a per-server level
  # and it doesn't muck with existing tests
  
  
  # this ServerName overrides the configured ServerName
  # hope that doesn't change someday...
  ServerName foo.example.com
  UseCanonicalName Off
  PerlModule TestHooks::default_port
  PerlDefaultPortHandler TestHooks::default_port
  PerlResponseHandler TestHooks::default_port::response
  SetHandler modperl
  
  
  # make sure that default mod_perl behavior
  # (DECLINED) doesn't mess up everyone else
  
  UseCanonicalName Off
  PerlResponseHandler TestHooks::default_port::response
  SetHandler modperl
  
  
  # make sure that default mod_perl behavior
  # (DECLINED) doesn't mess up everyone else (again)
  
  UseCanonicalName On
  PerlResponseHandler TestHooks::default_port::response
  SetHandler modperl
  
  
  
  
  
  1.6   +6 -0  modperl-2.0/t/response/TestApache/conftree.pm
  
  Index: conftree.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/conftree.pm,v
  retrieving re

cvs commit: modperl-2.0 Changes

2003-10-07 Thread geoff
geoff   2003/10/07 12:14:31

  Modified:.Changes
  Log:
  add PerlDefaultPortHandler
  
  Revision  ChangesPath
  1.230 +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.229
  retrieving revision 1.230
  diff -u -r1.229 -r1.230
  --- Changes   7 Oct 2003 18:28:38 -   1.229
  +++ Changes   7 Oct 2003 19:14:31 -   1.230
  @@ -12,6 +12,8 @@
   
   =item 1.99_11-dev - 
   
  +add PerlDefaultPortHandler [Geoffrey Young]
  +
   fix the Makefile.PL option parser to support overriding of certain
   build options, in addition to appending to them (.e.g. now MP_LIBNAME
   is overridable) [Andrew Wyllie <[EMAIL PROTECTED]>]
  
  
  


cvs commit: modperl-2.0/src/modules/perl modperl_callback.c

2003-10-07 Thread geoff
geoff   2003/10/07 12:16:13

  Modified:src/modules/perl modperl_callback.c
  Log:
  alter modperl_callback so that return values are propagated
  to Apache just as they were returned from the Perl callback -
  no second-guessing the status the callback wanted to return.
  
  Revision  ChangesPath
  1.61  +2 -3  modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- modperl_callback.c2 Oct 2003 17:45:52 -   1.60
  +++ modperl_callback.c7 Oct 2003 19:16:13 -   1.61
  @@ -82,9 +82,8 @@
   /* ModPerl::Util::exit doesn't return an integer value */
   status = OK; 
   }
  -/* assume OK for non-http status codes and for 200 (HTTP_OK) */
  -if (((status > 0) && (status < 100)) ||
  -(status == 200) || (status > 600)) {
  +/* assume OK for 200 (HTTP_OK) */
  +if ((status == 200)) {
   status = OK;
   }
   }
  
  
  


cvs commit: modperl-2.0/t/htdocs .cvsignore

2003-10-07 Thread stas
stas2003/10/07 14:48:15

  Modified:t/htdocs .cvsignore
  Log:
  don't ignore perlio, as it now has its own ignore list
  
  Revision  ChangesPath
  1.3   +1 -2  modperl-2.0/t/htdocs/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/t/htdocs/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- .cvsignore17 Feb 2003 09:03:17 -  1.2
  +++ .cvsignore7 Oct 2003 21:48:15 -   1.3
  @@ -1,5 +1,4 @@
   index.html
  -perlio
   testdirective
   util
  -hooks
  \ No newline at end of file
  +hooks
  
  
  


cvs commit: modperl/lib mod_perl.pm

2003-10-07 Thread gozer
gozer   2003/10/07 21:34:02

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.681 +1 -1  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.680
  retrieving revision 1.681
  diff -u -r1.680 -r1.681
  --- Changes   2 Oct 2003 21:30:35 -   1.680
  +++ Changes   8 Oct 2003 04:34:02 -   1.681
  @@ -8,7 +8,7 @@
   
   =over 3
   
  -=item 1.28_01-dev
  +=item 1.29 - Oct 7, 2003
   
   Add a workaround for the 'rand' bug for perl 5.8.1 (compiled with
   either -DUSE_HASH_SEED or -DUSE_HASH_SEED_EXPLICIT, which is the
  
  
  
  1.58  +1 -1  modperl/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl/lib/mod_perl.pm,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- mod_perl.pm   2 Jul 2003 13:24:58 -   1.57
  +++ mod_perl.pm   8 Oct 2003 04:34:02 -   1.58
  @@ -4,7 +4,7 @@
   use DynaLoader ();
   
   BEGIN {
  -$mod_perl::VERSION = "1.2801";
  +$mod_perl::VERSION = "1.29";
   }
   
   sub boot {
  
  
  


cvs commit: modperl/lib mod_perl.pm

2003-10-07 Thread gozer
gozer   2003/10/07 21:37:10

  Modified:.Changes STATUS
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.682 +2 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.681
  retrieving revision 1.682
  diff -u -r1.681 -r1.682
  --- Changes   8 Oct 2003 04:34:02 -   1.681
  +++ Changes   8 Oct 2003 04:37:10 -   1.682
  @@ -8,6 +8,8 @@
   
   =over 3
   
  +=item 1.29_01-dev
  +
   =item 1.29 - Oct 7, 2003
   
   Add a workaround for the 'rand' bug for perl 5.8.1 (compiled with
  
  
  
  1.39  +3 -3  modperl/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/modperl/STATUS,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- STATUS12 Sep 2003 21:38:14 -  1.38
  +++ STATUS8 Oct 2003 04:37:10 -   1.39
  @@ -3,8 +3,8 @@
   
   
   Release:
  -
  -   1.29-dev: In development.
  +   1.30-dev: In development.
  +   1.29: Released Oct 7, 2003
  1.28: Released July 2, 2002.
  1.27: Released June 1, 2002.
  1.26: Released July 11, 2001.
  
  
  
  1.59  +1 -1  modperl/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl/lib/mod_perl.pm,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- mod_perl.pm   8 Oct 2003 04:34:02 -   1.58
  +++ mod_perl.pm   8 Oct 2003 04:37:10 -   1.59
  @@ -4,7 +4,7 @@
   use DynaLoader ();
   
   BEGIN {
  -$mod_perl::VERSION = "1.29";
  +$mod_perl::VERSION = "1.2901";
   }
   
   sub boot {
  
  
  


cvs commit: modperl STATUS

2003-10-07 Thread gozer
gozer   2003/10/07 21:41:20

  Modified:.STATUS
  Log:
  Fixed typo'ed release date for 1.28
  
  Revision  ChangesPath
  1.40  +2 -2  modperl/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/modperl/STATUS,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- STATUS8 Oct 2003 04:37:10 -   1.39
  +++ STATUS8 Oct 2003 04:41:20 -   1.40
  @@ -5,7 +5,7 @@
   Release:
  1.30-dev: In development.
  1.29: Released Oct 7, 2003
  -   1.28: Released July 2, 2002.
  +   1.28: Released July 2, 2003.
  1.27: Released June 1, 2002.
  1.26: Released July 11, 2001.