After doing some additional testing it appears that this problem only
occurs on my Windows machine with Apache 2.0.  I tried it on my Linux
box Apache 1.3 and things worked fine.  Since I am not using Windows in
a production environment I will be OK.

Thanks anyway.



-----Original Message-----
From: Jim Schueler [mailto:jschueler@;tqis.com] 
Sent: Tuesday, November 12, 2002 9:02 PM
To: Justin Luster
Subject: RE: Using Perl END{} with Apache::Registry


Pity that the module doesn't help.

I spent many hours testing END {} block behavior in Apache::Registry and
relied heavily on logged error messages.  I cannot confirm your
hypothesis
that END {} blocks affect error reporting.

When testing code, reliable failures are important.  If it won't fail
predictably, it won't run predictably.  I recommend you double check
your assumption that "It seems to be working fine."

Apache::Registry is tricky because it's there's so much uncertainty
about
the state of a process.  For example, it's impossible to determine which
sequence various scripts will run in.  One of the reasons I recommend my
Apache::ChildExit module is because otherwise, all of a process's
encountered END {} blocks are run at the end of a request, including END
{} blocks from other scripts and all modules that have been imported
over
the lifetime of the process.  Apache::ChildExit eliminates the
possibility
that unexpected or unknown END {} blocks will impact the process state
because it ensures that END {} blocks are only run when the process
terminates.

 -Jim


On Tue, 12 Nov 2002, Justin Luster wrote:

> Thanks for the reply.  Unfortunately I need the END block to run for
> every request.  I just was wondering why it altered the way error
> messages were logged.
> 
> Thanks.
> 
> -----Original Message-----
> From: Jim Schueler [mailto:jschueler@;tqis.com] 
> Sent: Tuesday, November 12, 2002 2:41 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Using Perl END{} with Apache::Registry
> 
> Hello Justin.
> 
> I've done a little work on a similar problem due to Apache::Registry's
> unusual treatment of END {} blocks.  You may want to take a look at
> the module I recently submitted:
> 
> http://www.cpan.org/authors/id/T/TQ/TQISJIM/ChildExit_0-1.tar.gz
> 
>  -Jim
> 
> > Hi, I'm trying to use the END{ } block in my Perl Scripts to do some
> > code clean up (making sure files are not locked) at the end of each
> > request.  It seems to be working fine.  I'm using Apache::Registry
to
> > run a regular Perl script.  I'm having a problem with error
messages.
> 
> > 
> >  
> > 
> > I have an included file that I'm requiring:
> > 
> >  
> > 
> > require "test.pl";
> > 
> >  
> > 
> > Without the END { } block if the script cannot find test.pl I get a
> > Server error 500 and an appropriate error message in the log file.
> When
> > I include the END{ } block I get no Server Error and no message in
the
> > log file.  It is almost as if the END{ } is overwriting the
> > ModPerlRegistry error system.  
> > 
> >  
> > 
> > Any ideas?
> > 
> >  
> > 
> > Thanks.
> 
> 
> 




Reply via email to