Karunakar Komirishetty wrote:
> Hello Michael - 
> 
> I sent you an email yesterday regarding the dispatcher. I wanted to clarify 
> more in this email. This is what I am trying to do. My basic URL would look 
> like one of these:
> 
> http://test.net:8080/gigservices/Brand?132022
> http://test.net:8080/gigservices/Device?ID=10&name=apple

Are you using mod_perl or plain CGI? If mod_perl, then you have move flexibility
 for setting some things up.

> In the above URL, Brand and Device are perl modules. 

Then they are your ":app" in Dispatch rules. And are the module's packages
really "Brand" and "Device"? No other project specific namespace?

>"gigservices" is not a directory.

If you are under mod_perl, then you can just make "gigservices" your <Location>
block from which you serve. Otherwise you'll need to do some mod_rewrite magic
stuff. Of if you aren't even using Apache or can't control your configuration
then I'm not sure Dispatch can be of much help. Translating URLs to resources is
part of the web server's job. Dispatch just helps to translate the rest of the
url into something C::A can use.

> I just wanted the URL to be that way. I don't have a run mode in the URL. 
> Based
> on the request being a GET or POST, I want to pass it to get and post run 
> modes 
> inside respective perl modules.
> 
> How can I achieve your Dispatcher module? Any help on this would be great. 

I would think a dispatch table like this (untested) would do what you want
(minus the "gigservices" bit. That will depend on how you have your web server
configured as I said above):

':app[get]'  => { rm => 'get_rm' },
':app[post]' => { rm => 'post_rm' },

> I tried to use CPAN to install "CGI::Application::Dispatch 2.13_01" on one my 
> other machine. For some reason it errored out. Do you recommend a manual 
> installation i.e downloading and unzipping the file manually?

"errored out" is not very descriptive. It's hard to give advice on what to do
next without knowing more.

-- 
Michael Peters
Plus Three, LP


#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to