http://qs1969.pair.com?node_id=687756


in reply to Re: Calling different methods based on a CGI parameter
in thread Calling different methods based on a CGI parameter

Thankyou, but I was more interested to find out the way to build the dispatch hash in a dynamic way using an array of table names.
  • Comment on Re^2: Calling different methods based on a CGI parameter

Replies are listed 'Best First'.
Re^3: Calling different methods based on a CGI parameter
by wfsp (Abbot) on May 21, 2008 at 12:52 UTC
    I had a feeling you'd say that. :-)

    You would be generating code based on user input (data from outside). Most monks will argue quite strenuously that this is a bad idea. Really.

    You will be tempted to turn off strict and warnings, you will probably have to turn off taint mode too.

    Your code should decide which sub to run, not the the user. Have a look at the Tutorials on web programing (particularly Security in CGI Programming) and, please, take another look at dispatch tables.

    update: added link