On Thu, 2004-04-08 at 18:04, Kemin Zhou wrote:
> The bug is the classical problem with named subroutin inside another subroutine.
> 
> This is one shortcoming of mod_perl.  PHP would not have such a problem.

It doesn't actually have much to do with mod_perl.  It's just a coding
mistake, tripping over perl's scoping rules.  It's still a mistake when
writing for CGI, but you wouldn't see it because the interpreter exits
after every request.

PHP has unusual scoping rules.  In order to access a variable declared
in a higher scope in PHP, you have to make the variable global.  If you
were to use a global variable in perl, that would also avoid the closure
issue.

Glad to hear you fixed the problem.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to