in reply to Learning mod_perl
this means your subs runs as closures (this is very well explained into modperl docs)#mod_perl_handler sub handler { sub your_sub() {}.. ...your script.... }
instead of :our $myvar;
so that vars behave correctly inside your_sub() i.e. they become globals which is good for memory-conserving tehnique, but can be nasty if reused for other purposes by accident. In one email in the past I proposed to Stas Beckman, to use "goto"-variant instead of encompasing mod_perl_sub() so that this become non-issue.my $myvar;
#mod_perl-handler package Blah; sub handler { ....house keeping code... goto MYCODE } sub your_sub { .... } MYCODE: ...your code here....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Learning mod_perl
by adrianh (Chancellor) on Jul 11, 2003 at 23:09 UTC | |
by bugsbunny (Scribe) on Jul 12, 2003 at 08:39 UTC | |
by adrianh (Chancellor) on Jul 12, 2003 at 15:16 UTC | |
by bugsbunny (Scribe) on Jul 15, 2003 at 11:33 UTC | |
by adrianh (Chancellor) on Jul 15, 2003 at 12:54 UTC |