Subject: | wish: smarter, simpler fill() syntax |
The syntax for fill() is more complex than necessary for the common case. This
is all that should be necessary:
HTML::FillInForm->fill($html,$data);
Calling fill() as a class method should be the same as calling new() with no
args and then calling fill().
The software can easil figure out what to do with $html:
- Check to see whether it is a scalarref or arrayref, otherwise assume it's a filename.
Likewise with $data:
- check to see if it's hashref or an object that supports param().
Finally, as a sensible default, allow this:
# default to getting data from CGI.pm param().
HTML::FillInForm->fill($html);
Many trips to the man page will be saved, wording if 'fdat' was really 'fdata'
or 'data' or 'dat'.
Thank for the great module!
(And the help you gave me with DFV in the beginning!)
See Also:
http://twiki.med.yale.edu/twiki2/bin/view/CGIapp/HtmlFillInForm