I found something a bit curious that I was wondering if someone could
explain. I have the following apache::registry script I called test.reg:

#!/usr/bin/perl
 
use strict;
if($test){
# do stuff
}
 
 
print qq|HTTP/1.1 200 OK\r\n|;
print "HELLO WORLD\n\n";


I ran my server in single-user mode (httpd -X) and requested the page
which causes an internal server error because I didn't declare '$test'. 
I next commented out the three conditional lines:

#if($test){
# do stuff
#}

Then requested the page a second time, which executed just fine. I
uncommented those three lines and requested the page a third time, which
strangely enough actually works.  Registry stats pages to see if they
change and recompiles pages I believe.  So I am wondering why isn't an
exception raised on the third request about not declaring '$test'?  Did
the first request put '$test' in the symbol table?

thanks,

--eric

Reply via email to