perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0 Changes
Date Tue, 23 Dec 2003 00:34:36 GMT
stas        2003/12/22 16:34:36

  Modified:    src/modules/perl modperl_config.c
               t/hooks/TestHooks cleanup.pm
               .        Changes
  Log:
  Make sure that pnotes are destroyed after PerlCleanup handlers are
  finished and not before + test.
  
  Revision  Changes    Path
  1.72      +2 -2      modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -u -r1.71 -r1.72
  --- modperl_config.c	23 Oct 2003 18:34:51 -0000	1.71
  +++ modperl_config.c	23 Dec 2003 00:34:36 -0000	1.72
  @@ -288,12 +288,12 @@
       apr_status_t retval;
       MP_dRCFG;
   
  +    retval = modperl_callback_per_dir(MP_CLEANUP_HANDLER, r, MP_HOOK_RUN_ALL);
  +
       if (rcfg->pnotes) {
           SvREFCNT_dec(rcfg->pnotes);
           rcfg->pnotes = Nullhv;
       }
  -
  -    retval = modperl_callback_per_dir(MP_CLEANUP_HANDLER, r, MP_HOOK_RUN_ALL);
   
       /* undo changes to %ENV caused by +SetupEnv, perl-script, or
        * $r->subprocess_env, so the values won't persist  */
  
  
  
  1.4       +8 -3      modperl-2.0/t/hooks/TestHooks/cleanup.pm
  
  Index: cleanup.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/cleanup.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- cleanup.pm	7 Aug 2003 18:58:54 -0000	1.3
  +++ cleanup.pm	23 Dec 2003 00:34:36 -0000	1.4
  @@ -25,7 +25,7 @@
   
       $r->content_type('text/plain');
       $r->print('ok');
  -
  +    $r->pnotes(items => ["cleanup"," ok"]);
       $r->push_handlers(PerlCleanupHandler => \&cleanup2);
   
       return Apache::OK;
  @@ -34,8 +34,11 @@
   sub cleanup1 {
       my $r = shift;
   
  +    my $items = $r->pnotes('items');
  +    die "no items" unless $items;
  +    my $item = $items ? $items->[0] : '';
       #warn "cleanup CALLED\n";
  -    t_write_file(get_file(), "cleanup");
  +    t_write_file(get_file(), $item);
   
       return Apache::OK;
   }
  @@ -43,8 +46,10 @@
   sub cleanup2 {
       my $r = shift;
   
  +    my $items = $r->pnotes('items');
  +    my $item = $items ? $items->[1] : '';
       #warn "cleanup2 CALLED\n";
  -    t_append_file(get_file(), " ok");
  +    t_append_file(get_file(), $item);
   
       return Apache::OK;
   }
  
  
  
  1.294     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.293
  retrieving revision 1.294
  diff -u -u -r1.293 -r1.294
  --- Changes	22 Dec 2003 20:16:27 -0000	1.293
  +++ Changes	23 Dec 2003 00:34:36 -0000	1.294
  @@ -12,6 +12,9 @@
   
   =item 1.99_13-dev
   
  +Make sure that pnotes are destroyed after PerlCleanup handlers are
  +finished and not before + test. [Stas]
  +
   =item 1.99_12 - Decemeber 22, 2003
   
   Restore a proper behavior of all Registry handlers, but PerlRun, not
  
  
  

Mime
View raw message