We don't bite newbies here... much | |
PerlMonks |
(jeffa) Re: CGI Buffer module will not return params.by jeffa (Bishop) |
on Nov 21, 2001 at 21:30 UTC ( [id://126797]=note: print w/replies, xml ) | Need Help?? |
I'm not sure i understand your param() method - what is
it's purpose? Wouldn't it be easier and more effective to
just use something like:
With your code, what happens if i send a query string like foo.cgi?foo=bar&foo=baz&foo=qux?
Style issues: Also note that i used the direct notation to instantiate the CGI object, this is not at all necessary, but it is a good habit to get into. In output(), since you are refering to $self->{r} multiple times, i recommend assigning it to a scalar:
Other than that it looks good - try mortis's suggestion, then test it with a query string that contains multilples values for one variable. Make sure you get an array back, otherwise you might want to just write a wrapper for the param method like i did. But, again, what is the purpose of this module, why would i want to use it instead of CGI.pm? jeffa
In Section
Seekers of Perl Wisdom
|
|