> -----Original Message----- > From: Steffen Mueller [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 21, 2008 12:27 PM > To: par@perl.org > Cc: Robert Davis > Subject: Re: BUG? PAR::par_handle($0) on cygwin > > Steffen Mueller wrote: > > Since very recently*, there's also the function "get_filehandle" which > > gives you the filehandle to the ZIP member. > > [...] > > > (I think. Archive::Zip might be doing weird stuff.) > > Well, yes, it is. I'll change get_filehandle to find_zip_member and let > the user deal with it. So what you'd do is: > > my $memberRead = PAR::find_zip_member("my/file.txt")->readFileHandle(); > # $memberRead is now an Archive::Zip::MemberRead > # object, not a FileHandle object! > while (defined($_ = $memberRead->getline()) { > # do stuff > } > > In order to get a *real* file handle, one would have to modify > Archive::Zip itself by adding a class that's a tied file handle which > can uncompress on demand. (Archive::Zip::MemberRead unfortunately > doesn't do this, but I think it could.) > > I'm a little uneasy about this since it means exposing even more of the > internal implementation of how PAR treats .par files, but since we > already have PAR::par_handle() returning an Archive::Zip object, I guess > that war was lost a long time ago. > > Best regards, > Steffen
I don't know if this helps but here is why I got different results for how the program was called: [EMAIL PROTECTED]/c/scripts$ pp -o e.exe -e 'print "\$0=$0\n"; for $k (%PAR::LibCache) { $v=$PAR::LibCache{$k};print "k=$k;v=$v\n"; }' [EMAIL PROTECTED]/c/scripts$ ./e $0=./e.exe k=/c/scripts/./e.exe;v=Archive::Zip::Archive=HASH(0x10109320) k=Archive::Zip::Archive=HASH(0x10109320);v= [EMAIL PROTECTED]/c/scripts$ ./E $0=./E.exe k=/c/scripts/./E.exe;v=Archive::Zip::Archive=HASH(0x10109320) k=Archive::Zip::Archive=HASH(0x10109320);v= [EMAIL PROTECTED]/c/scripts$ /c/scripts/e $0=/c/scripts/e.exe k=/c/scripts/e.exe;v=Archive::Zip::Archive=HASH(0x10109360) k=Archive::Zip::Archive=HASH(0x10109360);v= [EMAIL PROTECTED]/c/scripts$ c:/scripts/e $0=c:/scripts/e.exe k=c:/scripts/e.exe;v=Archive::Zip::Archive=HASH(0x10109360) k=Archive::Zip::Archive=HASH(0x10109360);v= bob