Archive-Zip

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      actually read the documentation.
    - Fixed problem with stat vs lstat
    - Changed version number to 1.00 for PHB compatibility

0.12 Wed May 23 17:48:21 PDT 2001
    - Added writeScalar.pl and readScalar.pl to show use of IO::Scalar
    - Fixed docs
    - Fixed bug with EOCD signature on block boundary
    - Made it work with IO::Scalar as file handles
    - added readFromFileHandle()
    - remove guess at seekability for Windows compatibility

0.11 Tue Jan  9 11:40:10 PST 2001
    - Added examples/ziprecent.pl (by Rudi Farkas)
    - Fixed up documentation in Archive::Zip::Tree
    - Added to documentation in Archive::Zip::Tree
    - Fixed bugs in Archive::Zip::Tree that kept predicates from working
    - Detected file not existing errors in addFile

0.10 Tue Aug  8 13:50:19 PDT 2000
    - Several bug fixes

lib/Archive/Zip.pm  view on Meta::CPAN

sub _subclassResponsibility {
    Carp::croak("subclass Responsibility\n");
}

# Try to set the given file handle or object into binary mode.
sub _binmode {
    my $fh = shift;
    return _CAN($fh, 'binmode') ? $fh->binmode() : binmode($fh);
}

# Attempt to guess whether file handle is seekable.
# Because of problems with Windows, this only returns true when
# the file handle is a real file.
sub _isSeekable {
    my $fh = shift;
    return 0 unless ref $fh;
    _ISA($fh, "IO::Scalar")    # IO::Scalar objects are brokenly-seekable
      and return 0;
    _ISA($fh, "IO::String")
      and return 1;
    if (_ISA($fh, "IO::Seekable")) {

lib/Archive/Zip.pm  view on Meta::CPAN


=head2 File Naming

Regardless of what your local file system uses for file naming, names in a
Zip file are in Unix format (I<forward> slashes (/) separating directory
names, etc.).

C<Archive::Zip> tries to be consistent with file naming conventions, and will
translate back and forth between native and Zip file names.

However, it can't guess which format names are in. So two rules control what
kind of file name you must pass various routines:

=over 4

=item Names of files are in local format.

C<File::Spec> and C<File::Basename> are used for various file
operations. When you're referring to a file on your system, use its
file naming conventions.

lib/Archive/Zip/Archive.pm  view on Meta::CPAN

  :UTILITY_METHODS
);

our $UNICODE;
our $UNTAINT = qr/\A(.+)\z/;

# Note that this returns undef on read errors, else new zip object.

sub new {
    my $class = shift;
    # Info-Zip 3.0 (I guess) seems to use the following values
    # for the version fields in the zip64 EOCD record:
    #
    #   version made by:
    #     30 (plus upper byte indicating host system)
    #
    #   version needed to extract:
    #     45
    my $self  = bless(
        {
            'zip64'                       => 0,

lib/Archive/Zip/Member.pm  view on Meta::CPAN

        ($directoryName, $newName) = @_;
    }

    my $self =
      Archive::Zip::DirectoryMember->_newNamed($directoryName, $newName);
    return $self;
}

sub new {
    my $class = shift;
    # Info-Zip 3.0 (I guess) seems to use the following values
    # for the version fields in local and central directory
    # headers, regardless of whether the member has an zip64
    # extended information extra field or not:
    #
    #   version made by:
    #     30
    #
    #   version needed to extract:
    #     10 for directory and stored entries
    #     20 for anything else



( run in 0.656 second using v1.01-cache-2.11-cpan-702932259ff )