Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Framing my scripts

by dsheroh (Monsignor)
on Jul 27, 2007 at 02:15 UTC ( [id://629039]=note: print w/replies, xml ) Need Help??


in reply to Framing my scripts

I typically handle that sort of thing with an 'action' parameter on the CGI request and a dispatch table to call the corresponding code:
my $default_action = 'dothis'; my %actions = ( dothis => \&do_this, dothat => \&do_that, dosomethingelse => \&do_something_else, ); my $action = param('action'); $action = $default{action} unless defined $actions{$action}; &{$actions{$action}}();

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found