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 {
     {   message => "Doing 2nd thing...",
         action  => sub {

             ### Something goes wrong here ....

     {   message => "Doing 3rd thing...",
         action  => sub {
 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:

    if ($step >= 1 and $step <= @steps) { # we got work to do
      if (defined (my $code = $steps[$step - 1]{action})) {
        $code->();        # run the action

   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) {
         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
cgi-prototype-users mailing list

Reply via email to