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.
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 ?
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.
Here's another example of copying two hashes without typing too much :
C:\>perl -w
my %hash1 = ( a => 1, b => 2, c => 3, d => 4 );
my @list = qw( a c );
my %hash2 = ();
@hash2{ @list } = @hash1{ @list }; # Copying values we need ( set by @list ) from
@hash1
print keys %hash2, "\n";
print values %hash2, "\n";
^Z
ac
13
C:\>