cvs commit: modperl-2.0/xs/maps apr_functions.map modperl_functions.map

2003-12-18 Thread geoff
geoff   2003/12/18 10:53:50

  Modified:xs/APR/Finfo APR__Finfo.h
   xs/Apache/RequestRec Apache__RequestRec.h
   xs/maps  apr_functions.map modperl_functions.map
  Log:
  move r->finfo accessor function from APR::Finfo to Apache::RequestRec
  
  Revision  ChangesPath
  1.2   +0 -5  modperl-2.0/xs/APR/Finfo/APR__Finfo.h
  
<>
  
  
  1.7   +6 -0  modperl-2.0/xs/Apache/RequestRec/Apache__RequestRec.h
  
  Index: Apache__RequestRec.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestRec/Apache__RequestRec.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Apache__RequestRec.h  14 Mar 2003 05:34:24 -  1.6
  +++ Apache__RequestRec.h  18 Dec 2003 18:53:50 -  1.7
  @@ -53,3 +53,9 @@
   return modperl_table_get_set(aTHX_ r->subprocess_env,
key, val, TRUE);
   }
  +
  +static MP_INLINE
  +apr_finfo_t *mpxs_Apache__RequestRec_finfo(request_rec *r)
  +{
  +return &r->finfo;
  +}
  
  
  
  1.65  +0 -3  modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- apr_functions.map 8 Dec 2003 19:31:53 -   1.64
  +++ apr_functions.map 18 Dec 2003 18:53:50 -  1.65
  @@ -302,9 +302,6 @@
   -apr_lstat
apr_stat
   
  -PACKAGE=Apache::RequestRec
  - mpxs_Apache__RequestRec_finfo
  -
   !MODULE=APR::String
apr_collapse_spaces
   -apr_cpystrn
  
  
  
  1.62  +1 -0  modperl-2.0/xs/maps/modperl_functions.map
  
  Index: modperl_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- modperl_functions.map 1 Dec 2003 17:14:16 -   1.61
  +++ modperl_functions.map 18 Dec 2003 18:53:50 -  1.62
  @@ -15,6 +15,7 @@
mpxs_Apache__RequestRec_content_type   | | r, type=Nullsv
mpxs_Apache__RequestRec_proxyreq   | | r, val=Nullsv
mpxs_Apache__RequestRec_subprocess_env | | r, key=NULL, val=Nullsv
  + mpxs_Apache__RequestRec_finfo
   
   MODULE=Apache::RequestUtil   PACKAGE=guess
mpxs_Apache__RequestRec_push_handlers
  
  
  


cvs commit: modperl-2.0/t/response/TestAPI show.pm

2003-12-18 Thread stas
stas2003/12/18 11:04:23

  Modified:t/response/TestAPI show.pm
  Log:
  remove a stray warning
  
  Revision  ChangesPath
  1.2   +0 -2  modperl-2.0/t/response/TestAPI/show.pm
  
  Index: show.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/show.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- show.pm   1 Dec 2003 17:14:16 -   1.1
  +++ show.pm   18 Dec 2003 19:04:23 -  1.2
  @@ -16,8 +16,6 @@
   
   my $mpm = Apache::Test::config->{server}->{mpm};
   
  -warn " trying now***";
  -
   ok t_cmp(qr!$mpm!i,
Apache::MPM->show(),
'Apache::MPM->show()');
  
  
  


cvs commit: modperl-2.0/xs/APR/Finfo APR__Finfo.h

2003-12-18 Thread geoff
geoff   2003/12/18 11:04:52

  Removed: xs/APR/Finfo APR__Finfo.h
  Log:
  move r->finfo accessor function from APR::Finfo to Apache::RequestRec


cvs commit: modperl-2.0/todo release

2003-12-18 Thread gozer
gozer   2003/12/18 17:17:32

  Modified:.Changes
   lib/Apache PerlSections.pm
   src/modules/perl modperl_cmd.c modperl_util.c modperl_util.h
   t/conf   extra.last.conf.in
   t/directive perl.t
   t/response/TestDirective perldo.pm
   todo release
  Added:   t/conf   perlsection.conf
  Log:
   are now evaluating code into one distinct namespace per
  container, similar to ModPerl::Registry scripts. This finally gets
  rid of the many problems reported with recursive perlsections and
  infinite recursion.
  
  Revision  ChangesPath
  1.289 +3 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.288
  retrieving revision 1.289
  diff -u -r1.288 -r1.289
  --- Changes   18 Dec 2003 00:43:44 -  1.288
  +++ Changes   19 Dec 2003 01:17:31 -  1.289
  @@ -12,6 +12,9 @@
   
   =item 1.99_12-dev
   
  + are now evaluating code into one distinct namespace per
  +container, similar to ModPerl::Registry scripts. [Philippe M. Chiasson]
  +
   Fix ModPerl::MM::WriteMakefile to use the MODPERL_CCOPTS entry from
   Apache::BuildConfig, as it contains some flags added by mod_perl,
   which aren't in perl_ccopts and ap_ccopts. [Stas]
  
  
  
  1.2   +21 -16modperl-2.0/lib/Apache/PerlSections.pm
  
  Index: PerlSections.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/PerlSections.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PerlSections.pm   20 Oct 2003 17:44:48 -  1.1
  +++ PerlSections.pm   19 Dec 2003 01:17:31 -  1.2
  @@ -13,6 +13,7 @@
   use Apache::Const -compile => qw(OK);
   
   use constant SPECIAL_NAME => 'PerlConfig';
  +use constant SPECIAL_PACKAGE => 'Apache::ReadConfig';
   
   sub new {
   my($package, @args) = @_;
  @@ -54,24 +55,28 @@
   sub symdump {
   my($self) = @_;
   
  -my $pack = $self->package;
  -
   unless ($self->{symbols}) {
  -$self->{symbols} = [];
  -
   no strict;
  -
  -#XXX: Shamelessly borrowed from Devel::Symdump;
  -while (my ($key, $val) = each(%{ *{"$pack\::"} })) {
  -local (*ENTRY) = $val;
  -if (defined $val && defined *ENTRY{SCALAR}) {
  -push @{$self->{symbols}}, [$key, $ENTRY];
  -}
  -if (defined $val && defined *ENTRY{ARRAY}) {
  -push @{$self->{symbols}}, [$key, [EMAIL PROTECTED];
  -}
  -if (defined $val && defined *ENTRY{HASH} && $key !~ /::/) {
  -push @{$self->{symbols}}, [$key, \%ENTRY];
  +
  +$self->{symbols} = [];
  +
  +#XXX: Here would be a good place to warn about NOT using 
  +# Apache::ReadConfig:: directly in  sections
  +foreach my $pack ($self->package, $self->SPECIAL_PACKAGE) {
  +#XXX: Shamelessly borrowed from Devel::Symdump;
  +while (my ($key, $val) = each(%{ *{"$pack\::"} })) {
  +#We don't want to pick up stashes...
  +next if ($key =~ /::$/);
  +local (*ENTRY) = $val;
  +if (defined $val && defined *ENTRY{SCALAR}) {
  +push @{$self->{symbols}}, [$key, $ENTRY];
  +}
  +if (defined $val && defined *ENTRY{ARRAY}) {
  +push @{$self->{symbols}}, [$key, [EMAIL PROTECTED];
  +}
  +if (defined $val && defined *ENTRY{HASH} && $key !~ /::/) {
  +push @{$self->{symbols}}, [$key, \%ENTRY];
  +}
   }
   }
   }
  
  
  
  1.52  +22 -11modperl-2.0/src/modules/perl/modperl_cmd.c
  
  Index: modperl_cmd.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- modperl_cmd.c 17 Nov 2003 01:11:06 -  1.51
  +++ modperl_cmd.c 19 Dec 2003 01:17:31 -  1.52
  @@ -361,8 +361,11 @@
   apr_table_t *options = NULL;
   const char *handler_name = NULL;
   modperl_handler_t *handler = NULL;
  -const char *package_name = NULL;
  +const char *pkg_base = NULL;
  +const char *pkg_namespace = NULL;
  +const char *pkg_name = NULL;
   const char *line_header = NULL;
  +ap_directive_t *directive = parms->directive;
   int status = OK;
   AV *args = Nullav;
   SV *dollar_zero = Nullsv;
  @@ -397,17 +400,25 @@
   
   handler = modperl_handler_new(p, handler_name);
   
  -if (!(package_name = apr_table_get(options, "package"))) {
  -package_name = apr_pstrdup(p, 

cvs commit: modperl-2.0/ModPerl-Registry/t perlrun_require.t

2003-12-18 Thread stas
stas2003/12/18 18:11:35

  Modified:ModPerl-Registry/t perlrun_require.t
  Log:
  cleanup and speling
  
  Revision  ChangesPath
  1.5   +1 -3  modperl-2.0/ModPerl-Registry/t/perlrun_require.t
  
  Index: perlrun_require.t
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/perlrun_require.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- perlrun_require.t 22 Nov 2003 07:38:48 -  1.4
  +++ perlrun_require.t 19 Dec 2003 02:11:35 -  1.5
  @@ -5,8 +5,6 @@
   use Apache::TestUtil;
   use Apache::TestRequest qw(GET);
   
  -# XXX: use the same server setup to test
  -
   plan tests => 2;
   
   my $url = "/same_interp/perlrun/perlrun_require.pl";
  @@ -19,7 +17,7 @@
   !defined($res),
   "1",
   $res,
  -"PerlRun requiering and external lib with subs",
  +"PerlRun requiring an external lib with subs",
   );
   }
   
  
  
  


cvs commit: modperl-2.0 Changes

2003-12-18 Thread stas
stas2003/12/18 18:25:43

  Modified:ModPerl-Registry/lib/ModPerl RegistryCooker.pm PerlRun.pm
   .Changes
  Log:
  Restore a proper behavior of all Registry handlers, but PerlRun, not
  to reset %INC to forget any .pl files required during the script's
  execution.
  
  Revision  ChangesPath
  1.39  +25 -6 modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
  
  Index: RegistryCooker.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -u -r1.38 -r1.39
  --- RegistryCooker.pm 23 Nov 2003 21:26:01 -  1.38
  +++ RegistryCooker.pm 19 Dec 2003 02:25:43 -  1.39
  @@ -177,7 +177,10 @@
   
   my $cv = \&{"$package\::handler"};
   
  -my %orig_inc = %INC;
  +my %orig_inc;
  +if ($self->should_reset_inc_hash) {
  +%orig_inc = %INC;
  +}
   
   { # run the code and preserve warnings setup when it's done
   no warnings;
  @@ -185,11 +188,16 @@
   ModPerl::Global::special_list_call(END => $package);
   }
   
  -# %INC cleanup in case .pl files do not declare package ...;
  -for (keys %INC) {
  -next if $orig_inc{$_};
  -next if /\.pm$/;
  -delete $INC{$_};
  +if ($self->should_reset_inc_hash) {
  +# to avoid the bite of require'ing a file with no package delaration
  +# Apache::PerlRun in mod_perl 1.15_01 started to localize %INC
  +# later on it has been adjusted to preserve loaded .pm files,
  +# which presumably contained the package declaration
  +for (keys %INC) {
  +next if $orig_inc{$_};
  +next if /\.pm$/;
  +delete $INC{$_};
  +}
   }
   
   $self->flush_namespace;
  @@ -457,6 +465,17 @@
   sub should_compile_once {
   not shift->is_cached;
   }
  +
  +#
  +# func: should_reset_inc_hash
  +# dflt: FALSE
  +# desc: decide whether to localize %INC for required .pl files from the script
  +# args: $self - registry blessed object
  +# rtrn: TRUE if should reset
  +#   FALSE otherwise
  +#
  +
  +*should_reset_inc_hash = \&FALSE;
   
   #
   # func: flush_namespace
  
  
  
  1.8   +1 -0  modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm
  
  Index: PerlRun.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- PerlRun.pm23 Nov 2003 21:26:01 -  1.7
  +++ PerlRun.pm19 Dec 2003 02:25:43 -  1.8
  @@ -42,6 +42,7 @@
   get_mark_line   => 'get_mark_line',
   compile => 'compile',
   error_check => 'error_check',
  +should_reset_inc_hash => 'TRUE',
   strip_end_data_segment => 'strip_end_data_segment',
   convert_script_to_compiled_handler => 'convert_script_to_compiled_handler',
   );
  
  
  
  1.290 +4 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.289
  retrieving revision 1.290
  diff -u -u -r1.289 -r1.290
  --- Changes   19 Dec 2003 01:17:31 -  1.289
  +++ Changes   19 Dec 2003 02:25:43 -  1.290
  @@ -12,6 +12,10 @@
   
   =item 1.99_12-dev
   
  +Restore a proper behavior of all Registry handlers, but PerlRun, not
  +to reset %INC to forget any .pl files required during the script's
  +execution. [Stas]
  +
are now evaluating code into one distinct namespace per
   container, similar to ModPerl::Registry scripts. [Philippe M. Chiasson]
   
  
  
  


cvs commit: modperl-2.0 Changes

2003-12-18 Thread stas
stas2003/12/18 18:40:43

  Modified:lib/Apache compat.pm
   t/response/TestAPI uri.pm
   t/response/TestCompat apache_uri.pm
   .Changes
  Log:
  APR::URI::unparse joins the crowd of the overridable compat functions
  this allows us to get rid of forcing the reloading of compat and real packages in
  the tests
  
  Revision  ChangesPath
  1.93  +20 -16modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -u -r1.92 -r1.93
  --- compat.pm 17 Dec 2003 19:59:47 -  1.92
  +++ compat.pm 19 Dec 2003 02:40:42 -  1.93
  @@ -119,6 +119,26 @@
   }
   EOI
   
  +'APR::URI::unparse' => <<'EOI',
  +{
  +require APR::URI;
  +my $orig_sub = *APR::URI::unparse{CODE};
  +*APR::URI::unparse = sub {
  +my($uri, $flags) = @_;
  +
  +if (defined $uri->hostname && !defined $uri->scheme) {
  +# we do this only for back compat, the new APR::URI is
  +# protocol-agnostic and doesn't fallback to 'http' when the
  +# scheme is not provided
  +$uri->scheme('http');
  +}
  +
  +$orig_sub->(@_);
  +};
  +$orig_sub;
  +}
  +EOI
  +
   );
   
   my %overridden_mp2_api = ();
  @@ -659,22 +679,6 @@
   $uri ||= $r->construct_url;
   
   APR::URI->parse($r->pool, $uri);
  -}
  -
  -{
  -my $sub = *APR::URI::unparse{CODE};
  -*APR::URI::unparse = sub {
  -my($uri, $flags) = @_;
  -
  -if (defined $uri->hostname && !defined $uri->scheme) {
  -# we do this only for back compat, the new APR::URI is
  -# protocol-agnostic and doesn't fallback to 'http' when the
  -# scheme is not provided
  -$uri->scheme('http');
  -}
  -
  -$sub->(@_);
  -};
   }
   
   package Apache::Table;
  
  
  
  1.13  +0 -8  modperl-2.0/t/response/TestAPI/uri.pm
  
  Index: uri.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/uri.pm,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -u -r1.12 -r1.13
  --- uri.pm3 Oct 2003 00:49:31 -   1.12
  +++ uri.pm19 Dec 2003 02:40:43 -  1.13
  @@ -19,14 +19,6 @@
   sub handler {
   my $r = shift;
   
  -# since Apache::compat redefines APR::URI::unparse and the test for
  -# backcompat Apache::URI forces redefinition of APR::URI::unparse
  -# (to get the right behavior during the test),
  -# we need to force reload of APR::URI
  -delete $INC{"APR/URI.pm"};
  -no warnings 'redefine';
  -require APR::URI;
  -
   plan $r, tests => 15;
   
   $r->args('query');
  
  
  
  1.3   +2 -9  modperl-2.0/t/response/TestCompat/apache_uri.pm
  
  Index: apache_uri.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/apache_uri.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- apache_uri.pm 10 Mar 2003 01:25:26 -  1.2
  +++ apache_uri.pm 19 Dec 2003 02:40:43 -  1.3
  @@ -13,9 +13,6 @@
   use Apache::compat ();
   use Apache::Constants qw(OK);
   
  -
  -
  -
   sub handler {
   my $r = shift;
   
  @@ -39,12 +36,7 @@
   #}
   
   {
  -# since Apache::compat redefines APR::URI::unparse and the test for
  -# real APR::URI forces reload of APR::URI (to get the right behavior),
  -# we need to force reload of Apache::compat
  -delete $INC{"Apache/compat.pm"};
  -require Apache::compat;
  -
  +Apache::compat::override_mp2_api('APR::URI::unparse');
   # test the segfault in apr < 0.9.2 (fixed on mod_perl side)
   # passing only the /path
   my $parsed = $r->parsed_uri;
  @@ -53,6 +45,7 @@
   $parsed->port($r->get_server_port);
   #$parsed->scheme('http'); # compat defaults to 'http' like apache-1.3 did
   ok t_cmp($r->construct_url, $parsed->unparse);
  +Apache::compat::restore_mp2_api('APR::URI::unparse');
   }
   
   OK;
  
  
  
  1.291 +3 -3  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.290
  retrieving revision 1.291
  diff -u -u -r1.290 -r1.291
  --- Changes   19 Dec 2003 02:25:43 -  1.290
  +++ Changes   19 Dec 2003 02:40:43 -  1.291
  @@ -27,9 +27,9 @@
   Apache::Connection::remote_addr to the Apache::compat overridable
   functions. [Stas]
   
  -Apache::compat's implementation of Apache::RequestRec::finfo and
  -Apache::RequestRec::notes is now overridable and not enabled by
  -default. [St

cvs commit: modperl-2.0/ModPerl-Registry/lib/ModPerl RegistryCooker.pm

2003-12-18 Thread stas
stas2003/12/18 22:32:28

  Modified:ModPerl-Registry/lib/ModPerl RegistryCooker.pm
  Log:
  remove devel kraft
  
  Revision  ChangesPath
  1.40  +0 -3  modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
  
  Index: RegistryCooker.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -u -r1.39 -r1.40
  --- RegistryCooker.pm 19 Dec 2003 02:25:43 -  1.39
  +++ RegistryCooker.pm 19 Dec 2003 06:32:28 -  1.40
  @@ -10,9 +10,6 @@
   use strict;
   use warnings FATAL => 'all';
   
  -# we try to develop so we reload ourselves without die'ing on the warning
  -no warnings qw(redefine); # XXX, this should go away in production!
  -
   our $VERSION = '1.99';
   
   use Apache::Response ();