[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] CGI.pm param() gotcha



20 bonus points to anyone who can tell me why I made this change:

255,261c255,261
<   $res->set_address    (address1     => $q->param('gst_addr1'),
<                         address2     => $q->param('gst_addr2'),
<                         address3     => $q->param('gst_addr3'),
<                         city         => $q->param('gst_city'),
<                         state        => $q->param('gst_state'),
<                         postal       => $q->param('gst_zipcode'),
< country_code => $q->param('gst_country_code'));
---
> $res->set_address (address1 => scalar($q->param('gst_addr1')), > address2 => scalar($q->param('gst_addr2')), > address3 => scalar($q->param('gst_addr3')),
>                         city         => scalar($q->param('gst_city')),
> state => scalar($q->param('gst_state')), > postal => scalar($q->param('gst_zipcode')), > country_code => scalar($q->param('gst_country_code')));

j

Hint: $q->param('gst_addr3') is undefined.