in reply to puzzled by CGI::FormBuilder (?) errors?
http://search.cpan.org/dist/CGI-FormBuilder/lib/CGI/FormBuilder.pod#fieldsubs# Try to catch $form->$fieldname usage if ((! exists($self->{$name}) || @_) && ! $CGI::FormBuilder::Util: +:OURATTR{$name}) { if ($self->{fieldsubs}) { return $self->field(name => $name, @_); } else { belch "Possible field access via \$form->$name() - see 'fi +eldsubs' option" }
This allows autoloading of field names so you can directly access them as:
$form->$fieldname(opt => 'val');
Instead of:
$form->field(name => $fieldname, opt => 'val');
Warning: If present, it will hide any attributes of the same name. For example, if you define "name" field, you won't be able to change your form's name dynamically. Also, you cannot use this format to create new fields. Use with caution.
|
|---|