fix_messageparser_interaction Fix hang during t/3_while test with recent Mail::Mbox::MessageParser. See Debian bug #395268. Patch by David Coppit --- MboxParser.pm +++ MboxParser.pm @@ -519,7 +519,6 @@ return undef if ref(\$p) eq 'SCALAR' or $p->end_of_file; - seek $self->{READER}, $self->{CURR_POS}, SEEK_SET; my $nl = $self->{NL}; my $mailref = $p->read_next_email; my ($header, $body) = split /$nl$nl/, $$mailref, 2; @@ -793,7 +792,8 @@ my $self = shift; my $h = $self->{READER}; my $newline; - + + my $old_position = tell $h; seek $h, 0, SEEK_SET; while (sysread $h, (my $c), 1) { if (ord($c) == 13) { @@ -807,6 +807,7 @@ last; } } + seek($h, $old_position, 0); return $newline; }