Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: CGI::Application design strategy

by zby (Vicar)
on Mar 02, 2004 at 12:21 UTC ( [id://333228]=note: print w/replies, xml ) Need Help??


in reply to CGI::Application design strategy

In my app I just call the other mode from inside of my analog of login_submit:
sub login_submit{ my $self = shift; . . . if(badlogin()){ return $self->login(); } }
Update: Added 'return' (following rchiav).

Replies are listed 'Best First'.
Re: Re: CGI::Application design strategy
by rchiav (Deacon) on Mar 02, 2004 at 15:13 UTC
    Since your login_submit sub has to return what's to be displayed to the browser, don't you have to do
    if(badlogin()){ return $self->login(); }
    ?
      No, not necessarilly, if $self->login returns to a place where at some later point the output is returned to CGI::A then the return is not strictly necessary.

      Believe me, I know, I got bitten by that one yesterday.

      jdtoronto

      Yeah - you are right. That's how I did that. I can't comment on what jdtoronto wrote.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://333228]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2025-03-18 14:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (57 votes). Check out past polls.