Subject: | MIME::Parser: can't flush |
While trying to install the SOAP::Lite module, the tests were breaking because of MIME::Parser. I enclosed the flush method call into an eval block, and everything works great.
MIME-tools-5.417
perl 5.8.6
Linux king.to3 2.4.20-8 #1 Thu Mar 13 17:18:24 EST 2003 i686 athlon i386 GNU/Linux
[nick@king SOAP-Lite-0.60]$ perl -Mblib t/04-attach.t
1..15
# Running under perl version 5.008006 for linux
# Current time local: Thu Feb 10 00:35:11 2005
# Current time GMT: Thu Feb 10 08:35:11 2005
# Using Test.pm version 1.25
Attachment deserialization (Content-ID) test(s)...
Something wrong with MIME message: MIME::Parser: can't flush: at /usr/local/lib/perl5/site_perl/5.8.6/MIME/Parser.pm line 789.
*** Parser.pm 2005-01-13 11:23:15.000000000 -0800
--- /home/nick/Parser.pm 2005-02-10 00:43:19.000000000 -0800
***************
*** 787,791 ****
### Flush and rewind encoded buffer, so we can read it:
! $ENCODED->flush or die "$ME: can't flush: $!";
$ENCODED->seek(0, 0) or die "$ME: can't seek: $!";
}
--- 787,793 ----
### Flush and rewind encoded buffer, so we can read it:
! undef $@;
! eval { $ENCODED->flush };
! die "$ME: can't flush: $@" if $@;
$ENCODED->seek(0, 0) or die "$ME: can't seek: $!";
}
*** Parser.pm 2005-01-13 11:23:15.000000000 -0800
--- /home/nick/Parser.pm 2005-02-10 00:43:19.000000000 -0800
***************
*** 787,791 ****
### Flush and rewind encoded buffer, so we can read it:
! $ENCODED->flush or die "$ME: can't flush: $!";
$ENCODED->seek(0, 0) or die "$ME: can't seek: $!";
}
--- 787,793 ----
### Flush and rewind encoded buffer, so we can read it:
! undef $@;
! eval { $ENCODED->flush };
! die "$ME: can't flush: $@" if $@;
$ENCODED->seek(0, 0) or die "$ME: can't seek: $!";
}