* Randal L. Schwartz <merlyn@stonehenge.com> [2006-09-20 19:30]:
> To get this to work right, whatever I use for HTML generation
> needs to know how to get incoming params. Admittedly, the
> interface is simple, but it would have to know if I'm using a
> functional form with a hidden object (use CGI qw/param/)

Which is seriously awful anyway. Have you read the
`self_or_default` sub in CGI.pm? I’d never put such a thing in my
own code.

CGI::Simple does this correctly – the default interface is OO
only, and if you want exports then you use CGI::Simple::Standard.

> or an explicit object (my $q = CGI->new). And if it's an
> explicit object, how will the HTML generation find it?  This
> works even for select-multiple forms, which is very nice.

Uuuuhhhh… maybe you’d just pass the query object to the form
generator constructor? You’ve seen HTML::FillInForm and
HTML::Template, haven’t you?

With roles in P6, you can even make this even simpler. You could
make the HTML generator a role which can be composed onto any
object that `does ParamQuery`.

> That's why the *tight* integration of incoming parameters and
> HTML form generation is a Good Thing.  90% of the time, it just
> Works.

You keep stating this as if it were true despite conclusive
evidence to the opposite. I don’t know what you are trying to
achieve.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to