--- lib/Net/FTPServer.pm.orig 2009-10-10 19:15:42.000000000 +0200 +++ lib/Net/FTPServer.pm 2009-10-10 19:15:55.000000000 +0200 @@ -4228,7 +4228,7 @@ $zip->addMember ($memb); $memb->desiredCompressionMethod - (&{$ {Archive::Zip::}{COMPRESSION_DEFLATED}}); + (&Archive::Zip::COMPRESSION_DEFLATED); $memb->desiredCompressionLevel (9); } }, @@ -4260,7 +4260,7 @@ if ($file) { unlink $tmpname; - $zip->writeToFileHandle ($file, 1) == &{$ {Archive::Zip::}{AZ_OK}} + $zip->writeToFileHandle ($file, 1) == &Archive::Zip::AZ_OK or die "failed to write to zip file: $!"; $file->seek (0, 0); } @@ -4269,7 +4269,7 @@ unless ($file) { $file = new IO::Scalar; - $zip->writeToFileHandle ($file, 1) == &{$ {Archive::Zip::}{AZ_OK}} + $zip->writeToFileHandle ($file, 1) == &Archive::Zip::AZ_OK or die "failed to write to zip file: $!"; $file->seek (0, 0); } @@ -8109,14 +8109,14 @@ $self->fileName ($filename); $self->{externalFileName} = $filename; - $self->{compressionMethod} = &{$ {Archive::Zip::}{COMPRESSION_STORED}}; + $self->{compressionMethod} = "Archive::Zip::COMPRESSION_STORED"; my ($mode, $perms, $nlink, $user, $group, $size, $time) = $fileh->status; $self->{compressedSize} = $self->{uncompressedSize} = $size; $self->desiredCompressionMethod ($self->compressedSize > 0 - ? &{$ {Archive::Zip::}{COMPRESSION_DEFLATED}} - : &{$ {Archive::Zip::}{COMPRESSION_STORED}}); + ? &Archive::Zip::COMPRESSION_DEFLATED + : &Archive::Zip::COMPRESSION_STORED); $self->unixFileAttributes ($perms); $self->setLastModFileDateTimeFromUnix ($time); $self->isTextFile (0); @@ -8136,7 +8136,7 @@ return $self->{fh} if $self->{fh}; $self->{fh} = $self->{fileh}->open ("r") - or return &{$ {Archive::Zip::}{AZ_IO_ERROR}}; + or return &Archive::Zip::AZ_IO_ERROR; $self->{fh}; } @@ -8146,17 +8146,17 @@ my $self = shift; my $status = $self->SUPER::rewindData (@_); - return $status if $status != &{$ {Archive::Zip::}{AZ_OK}}; + return $status if $status != &Archive::Zip::AZ_OK; - return &{$ {Archive::Zip::}{AZ_IO_ERROR}} unless $self->fh; + return &Archive::Zip::AZ_IO_ERROR unless $self->fh; # Not all personalities can seek backwards in the stream. Close # the file and reopen it instead. - $self->endRead == &{$ {Archive::Zip::}{AZ_OK}} - or return &{$ {Archive::Zip::}{AZ_IO_ERROR}}; + $self->endRead == &Archive::Zip::AZ_OK + or return &Archive::Zip::AZ_IO_ERROR; $self->fh; - return &{$ {Archive::Zip::}{AZ_OK}}; + return &Archive::Zip::AZ_OK; } sub _readRawChunk @@ -8165,12 +8165,12 @@ my $dataref = shift; my $chunksize = shift; - return (0, &{$ {Archive::Zip::}{AZ_OK}}) unless $chunksize; + return (0, &Archive::Zip::AZ_OK) unless $chunksize; my $bytesread = $self->fh->sysread ($$dataref, $chunksize) - or return (0, &{$ {Archive::Zip::}{AZ_IO_ERROR}}); + or return (0, &Archive::Zip::AZ_IO_ERROR); - return ($bytesread, &{$ {Archive::Zip::}{AZ_OK}}); + return ($bytesread, &Archive::Zip::AZ_OK); } sub endRead @@ -8180,10 +8180,10 @@ if ($self->{fh}) { $self->{fh}->close - or return &{$ {Archive::Zip::}{AZ_IO_ERROR}}; + or return &Archive::Zip::AZ_IO_ERROR; delete $self->{fh}; } - return &{$ {Archive::Zip::}{AZ_OK}}; + return &Archive::Zip::AZ_OK; } 1 # So that the require or use succeeds.