On Mon, 22 May 2000, Peter Haworth wrote:

> That's fairly likely. How about this kind of interface?
> 
>   my $form=CGI::Form->new($r); # Except for the name. See below
>   # Or: my $form=CGI::Form->new($cgi);
> 
>   print $form->textfield(name => 'name', size => '60', default => 'Peter');

yup, looks good.

> In light of the non-dependency on mod_perl, the
> Apache::Request::Form name is also out. I'd still rather
> not use the CGI::Form name, in case there are any
> current users whose interface would change, which is a
> shame, because that seems like the most appropriate
> name. Erk, any ideas, or proof that no-one uses the
> existing CGI::Form?

HTML::Form? :)

> I'd prefer to stick with one style of interface, to keep
> things small and simple. Named parameters as above seem
> most flexible, and allow for unexpected things like
> omMouseOver attributes to be added easily. I'm inclined
> to only allow method style calls, although I suppose
> there's nothing wrong with allowing people to import the
> methods and call them like this:
> 
>   print textfield($form,name => 'name', ...);

agree all the way.


Reply via email to