GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CGI::COMPRESS::GZIP::FILEHANDLE (3)

.ds Aq ’

NAME

CGI::Compress::Gzip::FileHandle - CGI::Compress::Gzip helper package

CONTENTS

LICENSE

Copyright 2006-2007 Clotho Advanced Media, Inc., <cpan@clotho.com>

Copyright 2007-2008 Chris Dolan <cdolan@cpan.org>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SYNOPSIS



   use CGI::Compress::Gzip;
 
   my $cgi = new CGI::Compress::Gzip;
   print $cgi->header();
   print "<html> ...";



DESCRIPTION

This is intended for internal use only! Use CGI::Compress::Gzip instead.

This CGI::Compress::Gzip helper class subclasses IO::Zlib. It is is needed to make sure that output is not compressed until the CGI header is emitted. This filehandle delays the ignition of the zlib filter until it sees the exact same header generated by CGI::Compress::Gzip::header() pass through it’s WRITE() method. If you change the header before printing it, this class will throw an exception.

This class holds one global variable representing the previous default filehandle used before the gzip filter is put in place. This filehandle, usually STDOUT, is replaced after the gzip stream finishes (which is usually when the CGI object goes out of scope and is destroyed).

FUNCTIONS

OPEN Overrides IO::Zlib::OPEN. This method doesn’t actually do anything — it just stores it’s arguments for a later call to SUPER::OPEN in WRITE(). The reason is that we may not have seen the header yet, so we don’t yet know whether to compress output.
WRITE buffer, length, offset Emit the uncompressed header followed by the compressed body.
CLOSE Flush the compressed output.

AUTHOR

Clotho Advanced Media, cpan@clotho.com

Primary developer: Chris Dolan

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CGI::COMPRESS::GZIP::FILEHANDLE (3) 2016-03-18

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.