At 08:31 PM 6/13/01 +0200, Evgeny Goldin (aka Genie) wrote:

>1) "print header" is the only print statement in your response ..
>May be I'm wrong but did you mean to print anything at all ?
>I thought the CGI script should give some meaningful response.

This is true, HOWEVER, the object methods invokde by the script generate 
data that is then sent to the browser.

>2)
>...
>'browser' => $q->param("browser"),
>'os' => $q->param("os"),
>'bugtrack_status' => $q->param("bugtrack_status"),
>...
>
>Yak ! Wasn't it too hard to retype all those params ? What about hash slices ?

It is a bit of a pain :-)


>CGI.pm, FETCHING THE PARAMETER LIST AS A HASH :
>$params = $q->Vars;
>print $params->{'address'};
>
>And in your case it may be :
>
>my @param_list       = qw ( request_id request_priority request_title .. );
>my %hash             = (); # the hash we gonna fill up and send to the 
>function
>@hash{ @param_list } = @{ $q->Vars }{ @param_list }
>BugTrack->update_request ( %hash );
>
>That's it ! Much shorter and arguments list can be controlled by
>changing @param_list only.
Excellent, I will give this a go.  Definitely looks easier than what I've 
been doing.

Thanks!
Peter Cline
Inet Developer
New York Times Digital

Reply via email to