my $cgi; if (eval { require CGI::Compress::Gzip; 1 } and exists $ENV{HTTP_ACCEPT_ENCODING} and $ENV{HTTP_ACCEPT_ENCODING} =~ /gzip/i) { $cgi = CGI::Compress::Gzip->new(); }else { $cgi = CGI->new(); }