Skip Menu |

This queue is for tickets about the Archive-Zip CPAN distribution.

Report information
The Basics
Id: 55748
Status: new
Priority: 0/
Queue: Archive-Zip

Owner: Nobody in particular
Requestors: fastbean_au [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Untrapped errors (addFile)
Date: Sat, 20 Mar 2010 14:47:21 -0700 (PDT)
To: Bug-Archive-Zip [...]
From: Sean Miller <fastbean_au [...]>
Download (untitled) / with headers
text/plain 949b
Archive::Zip v 1.30 This is probably a normal severity bug. When calling addFile with a file that does not exist instead of returning an error code indicating that the call was not successful an untrapped error is given. This can be worked around by wrapping the call in an eval, but given the existence of the error handler this should not be required. perl Can't call method "desiredCompressionLevel" on an undefined value at C:/Perl/sit e/lib/Archive/Zip/ line 249. Contents of use strict; use warnings; use File::Temp; use Archive::Zip; sub handler { print "Trapped: @_\n" } Archive::Zip::setErrorHandler( \&handler ); # Setup a temp filename and ensure that it does not exist my $nonexistent = mktemp('XXXXXXXX'); die if -e $nonexistent; my $zip = Archive::Zip->new(); # We have an error handler, and we test the return result. $zip->addFile($nonexistent) and die "There was a problem!";

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to