Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 30742
Status: open
Priority: 0/
Queue: PAR

People
Owner: Nobody in particular
Requestors: schmorp [...] schmorp.de
Cc:
AdminCc:

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



Subject: binmode() on closed filehandle $fh at c:/perl/site/lib/PAR.pm line 776, <_FH> chunk 1.
Date: Wed, 14 Nov 2007 23:51:02 +0100
To: bug-par [...] rt.cpan.org
From: Marc Lehmann <schmorp [...] schmorp.de>
This is the error I get after upgrading to PAR::Packer 0.976 when packing something. It seems to fail there, but I get no other messages. The relevant source is: if (!ref $par) { @file = $par; open my $fh, '<', $par; 776 binmode($fh); $par = $fh; bless($par, 'IO::File'); } version 0.972 worked fine. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / pcg@goof.com -=====/_/_//_/\_,_/ /_/\_\
Hi Marc, thanks for the bug report. On Wed Nov 14 18:16:42 2007, schmorp@schmorp.de wrote: Show quoted text
> This is the error I get after upgrading to PAR::Packer 0.976 when packing > something. It seems to fail there, but I get no other messages.
[...] Show quoted text
> version 0.972 worked fine.
Would it be possible that you try this again after replacing open my $fh, '<', $par; with open my $fh, '<', $par or die $!; so we get a better error message? I am not sure whether a silent failure is acceptable here, so I'm not sure whether that line should end with 'or return;' or 'or die "blah, blah, sensible error message here: $!";'. It should certainly not be without error checking of some sort because it's bound to fail badly on the binmode() call in the case of an error. That line, however bad it may be, has been there forever, so I suspect it's actually a different piece of code which changed between 0.972 and 6 which is causing the problem, but I can't track it down easily. Thanks, Steffen P.S.: The promised Module::ScanDeps 0.78 was uploaded to PAUSE.
CC: par [...] perl.org
Subject: Re: [rt.cpan.org #30742] binmode() on closed filehandle $fh at c:/perl/site/lib/PAR.pm line 776, <_FH> chunk 1.
Date: Sun, 18 Nov 2007 03:57:55 +0100
To: Steffen Müller via RT <bug-PAR [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Sat, Nov 17, 2007 at 02:01:06AM -0500, Steffen Müller via RT <bug-PAR@rt.cpan.org> wrote: Show quoted text
> Would it be possible that you try this again after replacing > > open my $fh, '<', $par; > > with > > open my $fh, '<', $par or die $!;
Sorry, I reported futher info to the wrong address :) Here are my earlier findings: I used: $PERL/bin/perl $PERL/bin/pp $GUI --icon win32/client.ico -C -I "//.host/Shared Folders/root/src/Crossfire" -I . -o deliantra.exe -A addlist bin/deliantra which resulted in an open for "//.host/Shared Folders/root/src/Crossfire" in the given code segment, which failed because presumably, under windows, you cannot open() directories. Show quoted text
> so we get a better error message? I am not sure whether a silent failure > is acceptable here, so I'm not sure whether that line should end with > 'or return;' or 'or die "blah, blah, sensible error message here: $!";'. > It should certainly not be without error checking of some sort because > it's bound to fail badly on the binmode() call in the case of an error.
I have no idea what its for, as -I specifies a diretcory only, so opening it must be caused by some deeper logic bug somewhere. Show quoted text
> That line, however bad it may be, has been there forever, so I suspect > it's actually a different piece of code which changed between 0.972 and > 6 which is causing the problem, but I can't track it down easily.
Likely, as I was using that -I switch forever. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / pcg@goof.com -=====/_/_//_/\_,_/ /_/\_\