bug processing zip file with errors
Mariano Absatz
mailscanner at LISTS.COM.AR
Wed Jun 30 21:02:50 IST 2004
Mmhhh... browsing the Archive::Zip manpage & the MailScanner source I tend to
find a shared guilt...
In Archive::Zip (1.10) line 524, I don't know if this line does what it
intends to:
return $status == AZ_OK ? $self : undef;
as I'm precedence-handicapped, I'd tend to write this:
return ($status == AZ_OK )? $self : undef;
but maybe it's OK... I still don't know why this fails in this case (I kinda
hand followed it)...
OTOH, the manpage says:
###########################################################################
Constructor
new( [$fileName] )
Make a new, empty zip archive.
my $zip = Archive::Zip->new();
If an additional argument is passed, new() will call read() to
read the contents of an archive:
my $zip = Archive::Zip->new( 'xyz.zip' );
If a filename argument is passed and the read fails for any
reason, new will return undef. For this reason, it may be better
to call read separately.
###########################################################################
but MailScanner is doing this... maybe it'd be better to do it using read:
###########################################################################
read( $fileName )
Read zipfile headers from a zip file, appending new members.
Returns "AZ_OK" or error code.
my $zipFile = Archive::Zip->new();
my $status = $zipFile->read( '/some/FileName.zip' );
###########################################################################
This is in Message.pm
I'll take a look at this...
El 30 Jun 2004 a las 14:30, Fred Broughton escribió:
> I have forwarded this info on to Ned Konz the reported maintainer of
> this at CPAN. Will advise if I get any further info.
>
> Phred
--
Mariano Absatz
El Baby
----------------------------------------------------------
Hello, I must be going.
-- Groucho Marx
-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/ and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html
More information about the MailScanner
mailing list