CGI::Compress::Gzip - CGI with automatically compressed output LICENSE Copyright 2006 Clotho Advanced Media, Inc., This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 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 (debugging help would be greatly appreciated on that platform). I've personally 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"; }