Subject: | Form input methods are inconsistent |
Some of the form methods have confusingly inconsistent behavior. These
should be normalized if feasible. I would prefer that none of them die,
but instead return empty on failure. However, any consistent behavior
would be an improvement.
The field() method dies if passed the name of a non-existent input. It
has no documented return value. It accesses $self->{form}.
The select() method returns boolean indicating whether the value was
set. It accesses $self->{form}.
The set_fields() method dies if any of the passed input names do not
exist. It accesses $self->current_form() or dies.
The set_visible() method returns the number of inputs set. It does not
die if there are too few form inputs. It accesses $self->current_form()
The tick() method dies if the named input does not exist. It has no
defined return value. It accesses $self->current_form()
The value() method dies if the named input does not exist. It accesses
$self->{form}.
Thanks,
Chris