Aankhen skribis 2006-09-20 18:32 (-0700):
> If those are modules to generate markup, I don't see why they should
> under the Web namespace.  There needs to be a Web.pm toolkit (or
> something similar), but that's mostly an amalgamation of other
> modules.

Because they speak the same language. That is: they know about arguments
passed via forms, and the preferred output language (xhtml? html?).

    use Web :type<xhtml> :html <$web>;
    ...;
    print img(...);   # <img .../>

I'm dreaming that :type<xhtml> does the following things:

    1. Set the MIME-type to application/xhtml+xml
    2. Set the output encoding to UTF-8 again, because application/*
       implied raw
    3. Make begin_html (or whatever it'll be called) smart enough to
       output the correct XML header doctype too
    4. Make all html generation methods (requested with ":html" in my
       example. Should perhaps be renamed to :htmlgen?) output XHTML
       compatible tags.

If Web::HTML (Web::HTMLgen) is a role to Web, all this can come
naturally. If it's a module somewhere else, it's not so obvious that
it'll play nicely with the rest. 

Putting it in the Web namespace, and making it use information from the
Web object (which mostly delegates to its .request and .response),
doesn't have to mean it can't be used stand-alone.
-- 
korajn salutojn,

  juerd waalboer:  perl hacker  <[EMAIL PROTECTED]>  <http://juerd.nl/sig>
  convolution:     ict solutions and consultancy <[EMAIL PROTECTED]>

Reply via email to