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

Re: [Omaha.pm] Ow!! || bit me



Code:

$res->set_child_qty ($cookie->{child_qty} || $q->param('child_qty'));

New code:

  if (defined $cookie->{child_qty}) {
     $res->set_child_qty($cookie->{child_qty})
  } else {
     $res->set_child_qty($q->param('child_qty'))
  }

On Sep 20, 2005, at 4:06 PM, Miller, Scott L (Omaha Networks) wrote:
What if both are undef? Given the snippet so far, that would seem to be
a valid possibility...

Both would have executed $res->set_child_qty(undef).

j