in reply to Re^4 (Third Time): mod_perl and cache?
in thread mod_perl and cache?
Look at your login sub. You use the variable %ARGS in it, but don't pass it to the sub. You are taking advantage of the fact that %ARGS is declared in a higher scope and is thus visible to your subroutine. However, after the first time this gets executed the %ARGS used in the login sub is private and will no longer change.
To fix this, you need to explicitly pass all variables to your subs. Instead of saying &login, say login(\%ARGS) and then read that in at the beginning of the login sub. This is a good programming practice, and you should be doing it anyway.
Note that all of this is explained in the documents that merlyn pointed out to you in the very first post in this thread. You can also read about it in the mod_perl guide.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6 (Third Time): mod_perl and cache?
by Flame (Deacon) on Mar 03, 2003 at 20:17 UTC | |
by perrin (Chancellor) on Mar 03, 2003 at 20:24 UTC | |
by Aristotle (Chancellor) on Mar 04, 2003 at 08:35 UTC | |
by perrin (Chancellor) on Mar 04, 2003 at 21:25 UTC | |
by Flame (Deacon) on Mar 03, 2003 at 22:17 UTC | |
by perrin (Chancellor) on Mar 03, 2003 at 22:30 UTC | |
by Flame (Deacon) on Mar 03, 2003 at 22:39 UTC | |
|