If you do a "perldoc Archive::Zip" (I would print out a hard copy of the result, it's pretty long), you should get all of the error codes, methods, etc.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 9:44 AM To: Dan Muey Cc: [EMAIL PROTECTED] Subject: RE: Archive::Zip funnny return status ------------------------------------------------ On Wed, 6 Aug 2003 11:33:18 -0500, "Dan Muey" <[EMAIL PROTECTED]> wrote: > > > > I think your pattern match will only catch a literal AZ_OK, not > > > the constant. And I'm not sure, but AZ_OK might evaluate to 0. > > > At least I think I remember having trouble with that module > > > because it returns 0 on success, and I kept testing for TRUE/FALSE > > > based on the return status. > > > > Oh it's a constant! Thanks Tim! I thought it was awfully > > starnge that it was using numeric operators. I switched to a > > regex because I kept getting a "non digit used with numeric > > operator" with use strict. > > > > So if zero means it worked what means it failed\how can I > > tell if $rc means 1 or 0 in the traditional sense given the > > Archive::Zip module's strange return values? > > > > my $rc = $member->extractToFileNamed($unzippedfile); > > > > Ok here's what I've found. If I don't permission to create/write > $unzippedfile > > $rc = 4 > If it works I get > $rc = 0 > > Any body know of any documentation on the return codes' numbers and > meanings for the various Functions of this module? It's cpan page, > whileinformative, isn't clear on many things like, the return values > of functions or actual list of functions and their use and meanings. > Ah the beauty of open source, when in doubt check the source yourself :-). And of course contribute the docs yourself :-). Sorry for the non-informative answer but this is probably as good as you can get and it appears the module's source is laid out very cleanly. For instance: # ------------------------- begin exportable error codes ------------------- use constant AZ_OK => 0; use constant AZ_STREAM_END => 1; use constant AZ_ERROR => 2; use constant AZ_FORMAT_ERROR => 3; use constant AZ_IO_ERROR => 4; # ------------------------- end exportable error codes --------------------- http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]