[cgiapp] params, params, params...

Ron Savage ron at savage.net.au
Fri Feb 8 18:56:51 EST 2008


On Thu, 2008-02-07 at 10:34 +0000, Mark Knoop wrote:

Hi Mark

> Also I see that CGI::Application has its own params - am I right in thinking 
> these are completeley different to the query params? Is there any 
> relationship between the two? Should I just be using these for 'global' 
> values?
> 
> It also looks like I will be using the session plugin and the session object 
> also has its own params, some of which I would set with the 
> global/query/params that I am interested in.

Perhaps it's clearer if you think in terms of the context of these
various params():

o Query params carry temporary data from the web client to the web
server (i.e. from the user to your app)

o CGI::App params hold temporary data in your app for the duration of
its instantiation

o CGI::Session params hold permanent data (within reason) outside and
beyond the lifetime of one instantiation of your app. Hence they can be
used to pass data from one instantiation to the next, with access keyed
by session id. Hence you need to pass the session key from one
instantiation to the next. Hence our discussion of the various ways in
passing that session id (cookies, hidden form data, rewriting URLs)

So, these params() are not directly related to each other at all.
-- 
Ron Savage
ron at savage.net.au
http://savage.net.au/index.html




More information about the cgiapp mailing list