tomasz konefal wrote:
> 
> the example you gave is what i'm currently implementing, but it just doesn't
> seem right because it looks as though i'm not actually changing run modes,
> but i'm nesting into another method temporarily, and then jumping out.  is
> this a correct interpretation, or am i way off base here?

Since DifferentMode is "returned", when you "jump out" of it, you don't 
come back to the context of the current run mode, but rather whatever
called 
the current run mode. In short, DifferentMode is returned the same way
Start would be, 
and I think it considered "good style" to use this kind of construct. (I
use it myself frequently). 

  -mark 

> 
> thanks,
>   twkonefal
> 
> --- Kenny Pyatt <[EMAIL PROTECTED]> wrote:
> > Can you tell us more about what you are doing. CGI::App offers a
> > framework that helps you handle which run-mode (state) you want the
> > application to be in. This may answer your question but I don't think it
> > is really what you want.
> >
> > sub Start
> > {
> > my $self = shift;
> >
> > if ($foo)
> > {
> > return $self->DifferentMode();
> > }
> > else
> > {
> > # Get a template and display it.
> > my $template->load_tmpl('template.html');
> > return $template->output();
> > }
> > }
> 
> ______________________________________________________________________
> Web-hosting solutions for home and business! http://website.yahoo.ca
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
 . . . . . . . . . . . . . . . . . . . . . . . . . .
   Mark Stosberg              Principal Developer  
   [EMAIL PROTECTED]       Summersault, LLC     
   765-939-9301 ext 223       website development  
 . . . . . http://www.summersault.com/ . . . . . . .

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to