in reply to Re^4: Catching closures
in thread Catching closures
Note that potential problems with persistent data in mod_perl aren't limited to closures. All kinds of bugs can creep in if you're not taking the persistent nature of mod_perl into account. If you've done mostly CGI programming it can take a while to get comfortable with that, but it's really not much different from writing any other persistent program.
Detecting unintended closures may be a good thing, but I suggest you just use it in development and turn it off in production and in situations where you may actually want to use closures. That way you can write and test with all kinds of (inefficient) hand holding, and run the code with good performance when it's tested.
In any case, it's useful to have a good understanding of closures, firstly just because they're a very powerful tool, and secondly because if you know how closures work you're not very likely to make the kinds of mistakes you're detecting here.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Catching closures
by bduggan (Pilgrim) on Mar 06, 2008 at 15:17 UTC |