> > 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
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 remem
> 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.
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
tatus.
-Original Message-
From: Dan Muey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 2:32 PM
To: [EMAIL PROTECTED]
Subject: Archive::Zip funnny return status
use Archive::Zip;
...
my $member = $zip->memberNamed($zippedfile);
my $rc = $member->extract
use Archive::Zip;
...
my $member = $zip->memberNamed($zippedfile);
my $rc = $member->extractToFileNamed($unzippedfile);
if($rc =~ m/AZ_OK/) { print "ok -$rc-\n; } else { print "Bad -$rc-\n"; }
The code above *always* prints:
Bab -0-
But $unzippedfile is cre