in reply to Archive Zip, testing & more
As to your second question, I think (untested) you can read the file and just ignore the contents, but check to make sure you don't get errors:my $shortname = $bfile; $shortname =~ s!.*[\\/]!!; my $member = $zip->addFile($bfile, $shortname);
Of course you should test that with some corrupted zip files to make sure it works.my $ziptest = Archive::Zip->new($bfiledst); if (!defined($ziptest)) { # big error; } my @members = $ziptest->members; #check to make sure it has what you expect #then check individual files: for (@members) { if (! defined($ziptest->contents($_)) # another error. } }
|
|---|