httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <>
Subject Re: CGI Tweak Take III
Date Sat, 03 Oct 1998 12:19:03 GMT
>  Here's my beefed-up cgi-bin/printenv again.

Sorry, but it needs more work.  A few things need to be done.

 1. All the comments should be at the bottom of the file, prefaced
    by a single __END__ on a line by its own (saves parser time)

 2. Many of the print statements can be condensed into a single print.
    There is no sense teaching CGI authors bad habits.

 3. The script doesn't check the HTTP method first.

 4. bogus bits

>print "<link rev=\"made\" href=\"mailto:wsanchez\\">"; # Author

 5. The original

   while (($key, $val) = each %ENV) {

    is considerably more efficient perl than

>foreach $key (keys %ENV)
> {
>  $var = $key;
>  $val = $ENV{$key};


View raw message