Sean Davis wrote:

On Jan 7, 2005, at 9:17 AM, Michael Peters wrote:

Sean Davis wrote:

For those of you using path_info parsing to get at run_modes, how do YOU deal with the dynamic run_mode changes? It is easy enough to return $self->other_run_mode, but in the setting of using path_info, that seems contradictory and may even defeat the apache-based authorization concept (if done carelessly). I'm just curious as to what, in practice, people are doing.


Like I mentioned in another thread, I usually put all of my functions that are performed by the same group of users into the same module. That way I know that if I return into another run mode in the same module that the user will have access to it. I don't know if I'm missing the point of your question or not, but this has never been an issue for me.

As a side note, when would you ever have mode1 return mode2 and the user not have permissions to run mode2?


Sorry to be so block-headed.

Good point. I guess what I find most bothersome is that I have mode2 output when my url looks like /mode1. That is my biggest stumbling block. Since I submit from a form back to itself and then do $self->next_run_mode, I always have a URL that points to the run_mode before. Minor point, especially if it works, but....

If it really bothers you, you could abstract the functionality that you want from the next_run_mode (probably loading a displaying a template) into a separate private sub. Then your mode1 and mode2 could both use that sub to generate the same output. So you wouldn't actually go to mode1 but still have the same output. Really just a semantic argument, but again, if it really bothers you...


--
Michael Peters
Developer
Plus Three, LP


--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to