NAME

IO::File::CompressOnClose::Zip - Zip compression for IO::File::CompressOnClose

SYNOPSIS

use IO::File::AutoCompress::Zip;
my $file = IO::File::CompressOnClose::Zip->new('>foo');
print $file "foo bar baz\n";
$file->close;  # file will be compressed to foo.zip

DESCRIPTION

IO::File::CompressOnClose::Zip is a subclass of IO::File::CompressOnClose that creates a zip archive containing a file when that file is closed.

By default, the archive will be named after the source file with the suffix '.zip'. The archive will contain a single file named after the basename of the source file. The name that the file inside the archive is given may be overriden with the ->member_filename() accessor.

ACCESSORS

In addition to the accessors provided by IO::File::CompressOnClose, an IO::File::CompressOnClose::Zip object has several get/set accessor methods. When used to set an attribute, the accessors return the previous value of the attribute.

member_filename()

The name that the file in the archive will be given. By default, this is the basename of the source filename.

SEE ALSO

IO::File::CompressOnClose

AUTHOR

James FitzGibbon <jfitz@CPAN.org>

COPYRIGHT

Copyright (c) 2003, James FitzGibbon. All Rights Reserved.

This module is free software. You may use it under the same terms as perl itself.