On 2/27/06, John Siracusa <[EMAIL PROTECTED]> wrote: > On 2/27/06, Rob Kinyon <[EMAIL PROTECTED]> wrote: > > On 2/27/06, John Siracusa <[EMAIL PROTECTED]> wrote: > >> Yeah, that's what I planned. Although the APIs will have "cgi" in > >> their names, all that will be requires is a param() method that works > >> like CGI's. > > > > You should probably elaborate here. CGI.pm has a TON of dwimmery that > > isn't immediately obvious. > > > > What exactly is the behavior that Rose expects from a CGI.pm-like > > param() method? Are there any other expectations, such as a new() > > method or an expected set of DESTROY semantics? > > Yeah, I'll spell it out in the docs. Basically, all I need to for > consumption by Rose::HTML::Form is build is a structure like this: > > { > name => 'John', # param with single value > color => [ 'red', 'green' ], # param with multiple values > ... > } > > I think all I need is: > > * $o->param() in list context returns a list of param names > * $o->param('foo') in list context returns a list of values > > for any object $o. CGI.pm fits the bill, as do most other modules > that imitate CGI.pm's param() method, even minimally.
It's absolutely critical to note that you view param() as a readonly method. That's what I meant about the dwimmery - CGI.pm's param() is also a mutator and it mutates according to which part of the HTTP request the parameter originated (GET vs. POST vs. whatever). If you needed that functionality, then I'd doubt the ability of anyone other than maybe a handful of programmers to get it right. Rob ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object