stas        2004/03/10 15:19:44

  Modified:    ModPerl-Registry/lib/ModPerl RegistryCooker.pm
               .        Changes
  Log:
  Fix Registry handlers, not to lose the execution errors, when they
  include END blocks
  
  Revision  Changes    Path
  1.45      +13 -5     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.44
  retrieving revision 1.45
  diff -u -u -r1.44 -r1.45
  --- RegistryCooker.pm 10 Mar 2004 22:47:40 -0000      1.44
  +++ RegistryCooker.pm 10 Mar 2004 23:19:44 -0000      1.45
  @@ -194,11 +194,23 @@
           %orig_inc = %INC;
       }
   
  +    my $rc = Apache::OK;
       { # run the code and preserve warnings setup when it's done
           no warnings FATAL => 'all';
           #local $^W = 0;
           eval { $cv->($r, @_) };
  +
  +        # log script's execution errors
  +        $rc = $self->error_check;
  +
           ModPerl::Global::special_list_call(END => $package);
  +
  +        # log script's END blocks execution errors
  +        my $new_rc = $self->error_check;
  +
  +        # use the END blocks return status if the script's execution
  +        # was successful
  +        $rc = $new_rc if $rc != Apache::OK;
       }
   
       if ($self->should_reset_inc_hash) {
  @@ -217,11 +229,7 @@
   
       #XXX: $self->chdir_file("$Apache::Server::CWD/");
   
  -    if ( (my $err_rc = $self->error_check) != Apache::OK) {
  -        return $err_rc;
  -    }
  -
  -    return Apache::OK;
  +    return $rc;
   }
   
   
  
  
  
  1.347     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.346
  retrieving revision 1.347
  diff -u -u -r1.346 -r1.347
  --- Changes   9 Mar 2004 20:50:21 -0000       1.346
  +++ Changes   10 Mar 2004 23:19:44 -0000      1.347
  @@ -12,6 +12,9 @@
   
   =item 1.99_14-dev
   
  +Fix Registry handlers, not to lose the execution errors, when they
  +include END blocks [Stas]
  +
   
   
   =item 1.99_13 - March 8, 2004
  
  
  

Reply via email to