Hi Folks

I'm wondering how people handle this problem. I could not find any discussion on
the wiki: http://cgiapp.erlbaum.net/cgi-bin/cgi-app/index.cgi

I've used the word obsolete to avoid bringing in the CGI::Session V 4
terminology of empty and expired sessions.

One idea is to use this, where list_requestors is the run mode which must be run
first. BTW It relies on CGI::Session V 4's is_new() method:

sub cgiapp_prerun
{
        my($self, $run_mode) = @_;

        $self -> prerun_mode('list_requestors') if ($self -> session() -> 
is_new() &&
($run_mode ne 'list_requestors') );

}       # End of cgiapp_prerun.

The drawback of this method is that if the user has bookmarked the first form
(screen) of the app, and goes there via the bookmark with an expired (say)
session, this code will send them back to that form with a new session, so that
they'd have to resubmit that first form.

Is there a neater way of doing this?

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              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