CGI::Compress::Gzip - CGI with automatically compressed output


LICENSE

Copyright Clotho Advanced Media Inc.

This software is released under the GNU Public License v2 by Clotho
Advanced Media, Inc.  See the "LICENSE" file, or visit
http://www.clotho.com/code/GPL

The definitive source of Clotho Advanced Media software is
http://www.clotho.com/code/

All of our software is also available under commercial license.  If
the GPL does not meet the needs of your project, please contact us at
info@clotho.com or visit the above URL.

We release open source software to help the world.  We hope that you
will enjoy this software, and we also hope and that you will hire us.
As authors of this software, we are best able to help you integrate it
into your project and to assist you with any problems.


ABOUT CLOTHO

"CAM" stands for Clotho Advanced Media Inc. (www.clotho.com) which
developed this module.  Contact us at info@clotho.com.


INSTALLATION

Install via one of the following:
  perl Makefile.PL
  make
  make test
  make install

or

  perl Build.PL
  perl Build
  perl Build test
  perl Build install


DESCRIPTION

CGI::Compress::Gzip extends the CGI infrastructure to compresses
output, whenever possible.  It uses IO::Zlib (a filehandle wrapper
around the C zlib library).  If this is missing, the functionality
degrades gracefully to the typical CGI behavior.  The programmer can
selectively enable or disable the compression functionality at will.
This module does not rely on any particular server setup.  It should
work anywhere that CGI.pm works.

Apache mod_perl users may prefer the more straightforward
implementation offered by the Apache::Compress or Apache::GzipChain
modules, although those offer less control to the programmer.

WARNING: as of v0.15 this module is working on Linux and MacOSX
but broken on Windows and Solaris (debugging help would be greatly
appreciated on these platforms).  Specifically, I've tested that it
runs well on the following:

                  RedHat_7.3  MacOSX_10.2.6
      perl 5.6.0                   ok          (Apple's perl)
      perl 5.6.1      ok
      perl 5.8.0                   ok
  mod_perl 5.6.0                   ok          (Apple's mod_perl and Apache 1.3.27)
  mod_perl 5.6.1      ok                       (Apache 1.3.27)


KNOWN ISSUES

* This module fails tests specifically under Windows in ways I do not
  understand, as reported by CPANPLUS testers.  There is some problem
  with my IO::Zlib tests.  If anyone knows about IO::Zlib failures or
  caveats on Windows, please let me know.  It *might* be related to
  binmode, but I have not tested this theory.

* This module has been observed to fail on Solaris.  The error is very
  strange and may be Compress::Zlib's fault.  In a nutshell,
  Compress::Zlib gets into infinite recursion in its AUTOLOAD
  function.  I don't think it's this module's fault

* Under Apache::Registry, global variables may not go out of scope in
  time.  This may causes timing bugs, since this module makes use of
  the DESTROY() method.  To avoid this issue, make sure your CGI
  object is stored in a scoped variable.

    --- BROKEN CODE ---
   use CGI::Compress::Gzip;
   $q = CGI::Compress::Gzip->new;
   print $q->header;
   print "Hello, world\n";

    --- WORKAROUND CODE ---
   use CGI::Compress::Gzip;
   do {
     my $q = CGI::Compress::Gzip->new;
     print $q->header;
     print "Hello, world\n";
   }
