# GPGIT Broken by Breaking Change in GnuPG::Interface I know a number of you use some code which I wrote ([gpgit](https://gitlab.com/grepular/gpgit)) for [automatically encrypting your incoming email](/Automatically_Encrypting_all_Incoming_Email) with your public PGP key. I just did a dist-upgrade on my mail server, (a [Debian Testing](https://www.debian.org/releases/testing/) box) and it broke hard. One of the modules it uses is [Mail::GnuPG](https://search.cpan.org/search?query=Mail%3A%3AGnuPG). Mail::GnuPG uses [GnuPG::Interface](https://search.cpan.org/search?query=GnuPG%3A%3AInterface). Doing the dist-upgrade, upgraded GnuPG::Interface from version 0.46 to 0.48\. Unfortunately, a change in 0.48 (or perhaps 0.47) has broken Mail::GnuPG, and in turn, gpgit. If you're going to upgrade, apply the following patch to your systems Mail/GnuPG.pm file first: ```diff --- GnuPG.pm.ORIG 2014-03-12 17:07:52.209701232 +0000 +++ GnuPG.pm 2014-03-12 17:11:22.161473944 +0000 @@ -478,10 +478,12 @@ $self->_set_options($gnupg); my @keys = $gnupg->get_public_keys(); foreach my $key (@keys) { - foreach my $uid ($key->user_ids) { - # M::A may not parse the gpg stuff properly. Cross fingers - my ($a) = Mail::Address->parse($uid->as_string); # list context, please - $key_cache{$a->address}=1 if ref $a; + foreach ($key->user_ids) { + foreach my $uid (ref($_) eq 'ARRAY' ? @$_ : ($_)) { + # M::A may not parse the gpg stuff properly. Cross fingers + my ($a) = Mail::Address->parse($uid->as_string); # list context, please + $key_cache{$a->address}=1 if ref $a; + } } } } ``` I've reported this as a critical bug to both the Mail::GnuPG and GnuPG::Interface packagers: [https://rt.cpan.org/Ticket/Display.html?id=93797](https://rt.cpan.org/Ticket/Display.html?id=93797) [https://rt.cpan.org/Ticket/Display.html?id=93826](https://rt.cpan.org/Ticket/Display.html?id=93826) I'm hoping it gets fixed in GnuPG::Interface as that seems to be being actively developed whereas Mail::GnuPG isn't.