Date: | Thu, 15 Jul 2004 13:03:47 +1000 |
From: | Paul Fenwick <pjf [...] perltraining.com.au> |
To: | bug-Mail-GnuPG [...] rt.cpan.org |
Subject: | IO::Handle::sync not implemented on all systems, can cause Mail::GnuPG to fail |
G'day Robert,
This is just a tiny compatibility tweak. IO::Handle::sync isn't
implemented on all systems, and older versions of the module will throw
an exception if it can't be used:
IO::Handle::sync not implemented on this architecture at
blib/lib/Mail/GnuPG.pm 578
Newer IO::Handles simply return undef on error.
To make Mail::GnuPG friendly with older IO::Handles, one can ignore the
possible exception by wrapping the call to sync() in an eval, and a
patch against Mail::GnuPG 0.07 appears at the end of this mail.
Cheerio,
Paul
Show quoted text
---cut here---
--- GnuPG.pm.orig Thu Jul 15 12:56:37 2004
+++ GnuPG.pm Thu Jul 15 12:59:38 2004
@@ -575,7 +575,7 @@
# print STDERR $plaintext;
# print "<----\n";
$input->flush();
- $input->sync();
+ eval { $input->sync(); };
close $input;
my @signature = <$output>; # reading the output
---cut here---
--
Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/
Director of Training | Ph: +61 3 9354 6001
Perl Training Australia | Fax: +61 3 9354 2681