|Bracing against the wind|
Thursday, February 12, 2009
File-scoped lexicals, when used in subroutines, are bound to the first-occurrence of the variable. Because of the way mod_perl works, this means that the first time you run a CGI program *within a given Apache process* it will work as expected.
The second time and thereafter, those file-scoped lexicals will be bound to previous instances, and will contain previous values.
OUCH! So code like this won't work:
Note to self: NEVER use file-scoped lexicals in mod_perl unless you want to risk suicide and sleepless nights.
[View/Post Comments] [Digg] [Del.icio.us] [Stumble]
| Bloghop: | Blogarama | Technorati | Blogwise