-
Notifications
You must be signed in to change notification settings - Fork 578
<FH> producing "Bad file descriptor" #7834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From [email protected]Created by [email protected]BAD: GOOD: Last CPAN "File::Grep" is several years failing "make test" due to it. Thanks for the great tool; looking for 6. Perl Info
|
From [email protected]In article <rt-3.0.11-34412-108744.6.00529762057072@perl.org>,
Not a bug really. $! is only meaningful immediately after a system or library Having said that there doesn't seem to be a good reason for $! to |
The RT System itself - Status changed from 'new' to 'open' |
From [email protected]Hi Ton, On Sat, 12 Mar 2005 18:19:33 +0100, (Ton Hospel) via RT wrote:
OK, fully understood. In fact I am really a moron as I write code aware of it. Going to fix File::Grep. Thanks, |
@rgs - Status changed from 'open' to 'resolved' |
From [email protected]On Mar 12, Ton Hospel said:
I contacted the author of the module in question. After looking at his eval { $line = <$fh> }; I told him he should local()ize -- |
From [email protected]Hi, On Mon, 14 Mar 2005 16:47:01 +0100, japhy@perlmonk.org via RT wrote:
I think local() is not enough - still the successful <$fh> would set $! and Anyway I already sent him the [attached] patch. He has not replied, though. Thanks, |
From [email protected]Hi, please apply the patch to fix File::Grep functionality (with failing "make Regards, |
From [email protected]File-Grep-0.01-Grep.pm-failfail.patch--- File-Grep-0.01/Grep.pm-orig 2002-01-26 03:32:57.000000000 +0100
+++ File-Grep-0.01/Grep.pm 2005-03-12 18:46:09.052150615 +0100
@@ -57,13 +57,13 @@
$openfile = 0;
}
my $line;
- eval { $line = <$fh> };
- if ( $! || $@ ) {
- if ( $@ ) {
- !$SILENT and carp "Cannot use file '$file' for fgrep: $@";
- } else {
- !$SILENT and carp "Cannot use file '$file' for fgrep: $!";
- }
+ # Be aware $! may be modified in any way if <$fh> does not fail.
+ my $err;
+ eval { defined($line = <$fh>) or $err = "$!"; };
+ # $@ is more important than $!
+ $err = $@ if $@;
+ if ( $err ) {
+ !$SILENT and carp "Cannot use file '$file' for fgrep: $err";
last;
} else {
while ( defined( $line ) ) {
|
From @nwc10On Mon, Mar 14, 2005 at 08:25:34PM +0100, Jan Kratochvil wrote:
You've already forwarded it to the appropriate person - the author. There's a section of the CPAN FAQ which is probably relevant "How do I go about maintaining a module when the author is unresponsive?" Nicholas Clark |
Migrated from rt.perl.org#34412 (status was 'resolved')
Searchable as RT34412$
The text was updated successfully, but these errors were encountered: