> > General purpose output formatting: no, nyet, nein, non, "over
> > my dead body".
> I'm guessing you mean "nyet" to "general purpose formatting *only*". :-)
>
> After sending that last email, I was sitting here drinking a beer, and
> it occured to me that tons of headers all the use same format
>
> Tag-With-Hyphens: unspecified value of some type
>
> This is true for HTTP, Mail, and lots of other applications.
>
> Maybe what we need is a general "headers()" function, which could
> produce a stack of these headers, something like:
>
> @http_headers = headers(content-type => 'text/html',
> last-modified => $date);
>
> @mail_headers = headers(from => '[EMAIL PROTECTED]',
> to => '[EMAIL PROTECTED]');
>
> This function could always be present in Perl. I could see *lots* of
> uses for such a function. Then, perhaps the "use cgi" pragma could
> simply alter the semantics of this builtin to stack the headers given to
> it by the headers() function and auto-output them on print.
Well, if you think about it, that functionality kinda exists now,
tho not in the form we would want for CGI applications... I'm thinking
of formats, but do it without page breaks...
Perhaps something like:
$=0; # Assuming setting it to 0 means don't do page breaks. I dunno about
# this...
format STDOUT_TOP =
Content-Type: text/html