I've been playing around with the interstitial method a bit and it's working well for me. But, I've run into an issue where I need to bust out of the steps. Has any thought been given on how to do this?
For example: my $p = $self->interstitial( { message => "Doing 1st thing...", action => sub { $self->do_first_thing(); }, }, { message => "Doing 2nd thing...", action => sub { ### Something goes wrong here .... $self->do_second_thing(); }, }, { message => "Doing 3rd thing...", action => sub { $self->do_third_thing(); }, }, ); return $p if $p; If something goes on it step 2 and I don't want to proceed to step 3, how do I do that? One idea I had was that the interstitial method could check the result of the given action, and if there is a result, return it. That way my action could return a page object and I could send the user to any page I want. For example: change: if ($step >= 1 and $step <= @steps) { # we got work to do if (defined (my $code = $steps[$step - 1]{action})) { $code->(); # run the action } } to: if ( $step >= 1 and $step <= @steps ) { # we got work to do if ( defined( my $code = $steps[ $step - 1 ]{action} ) ) { my $action_result = $code->(); # run the action if ($action_result) { $self->CGI->delete($cip); return $action_result; } } } Any thoughts on this? Thanks for the help! -- Tom Adamo ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ cgi-prototype-users mailing list cgi-prototype-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cgi-prototype-users