Randal L. Schwartz skribis 2006-09-15 9:15 (-0700):
> The thing that CGI.pm does is put in one place everything you need for a
> simple web form. And there's an amazing number of applications for
> this... putting a "contact us" page on an otherwise static site comes to mind
> immediately.
Yes, it's great to have a standard toolkit. It's also totally acceptable
that a single thing exports several task related things at once.
use Web;
my $web = Web::Request.new does HTML::Generator;
HTML::Generator can be smart enough to realise that when it's used as a
role to extend Web::Request, it can provide stickiness for form
elements.
In fact, if you want to build a newbie friendly thing, just export a
pre-built $web, much like LWP::Simple can export a $ua:
use Web::Simple :html :cookies :sessions;
> But don't throw out the simplicity of CGI.pm's basic task handling: parsing
> the incoming parameters (including file upload), and generating sticky forms
> and other common HTML elements.
Don't thow out the simplicity, but do severely re-model things!
--
korajn salutojn,
juerd waalboer: perl hacker <[EMAIL PROTECTED]> <http://juerd.nl/sig>
convolution: ict solutions and consultancy <[EMAIL PROTECTED]>