cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:
Why does CGI.pm not store a null value in param() if one is sent?
eg,
All well and good, but if the field sent contains an empty value, it doesn't appear when looping through param().my $q = new CGI; my %conf = ... hash defined elsewhere for ( $q->param() ) { $conf{$_} = $q->param($_); }
So for each conf var that *can* be empty, I'm having to add:
explicitly.$conf{'var_name'} = $q->param('var_name');
Or am I missing some hidden feature of CGI.pm that covers this? It's just getting a little messy and umm i don't like that much...
.02 please :)
cLive ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(crazyinsomniac) Re: CGI.pm and blank form fields
by crazyinsomniac (Prior) on Nov 28, 2001 at 12:50 UTC | |
|
Re: CGI.pm and blank form fields
by tachyon (Chancellor) on Nov 28, 2001 at 16:42 UTC | |
by cLive ;-) (Prior) on Nov 28, 2001 at 23:49 UTC | |
|
Re: CGI.pm and blank form fields
by tstock (Curate) on Nov 28, 2001 at 12:07 UTC | |
|
Re: CGI.pm and blank form fields
by rob_au (Abbot) on Nov 28, 2001 at 15:18 UTC |