apache::registry + use strict curiosity

2001-04-26 Thread Eric Kolve

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



Re: apache::registry + use strict curiosity

2001-04-26 Thread Ken Williams

Yes, exactly.  After the first run, $test got an entry in the symbol
table.  Not usually an issue in CGI perl. =)


[EMAIL PROTECTED] (Eric Kolve) wrote:
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?

  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Re: apache::registry + use strict curiosity

2001-04-26 Thread newsreader


that's no apache::registry.  that's perl

there are big guns here who can answer
your questions but it am not one of them.


On Thu, Apr 26, 2001 at 02:25:17PM -0700, Eric Kolve wrote:
 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