bittis has asked for the wisdom of the Perl Monks concerning the following question:

Hey everyone,
i am trying to find a package that will provide an interface between gpg and perl on a windows host. I tried GnuGP::Interface but it does not seem to work with windows without needing a 100 other packages, anyone had any expiriance with gpg, perl and windows before that can share some expiriances?
Thanks! :)

Replies are listed 'Best First'.
Re: GnuPG package for windows
by Anonymous Monk on Jul 25, 2008 at 09:59 UTC
    it does not seem to work with windows without needing a 100 other package

    Such as? Class::MethodMaker is the only listed pre-requisite.

      As of last night, there are no CPAN-testers results for the most recent Class:MethodMaker on Win32, and for the previous version there are only failures. So there's the problem. Class::MethodMaker doesn't work on Win32, which means that GnuGP::Interface doesn't either.
      100 was over the top, you are right! :) i am basically getting this error:

      Can't locate auto/GnuPG/Interface/autosplit.ix in @INC (@INC contains: v:/perl/lib v:/perl/site/lib .) at v:/perl/lib/AutoLoader.pm line 160. at GnuPG/Interface.pm line 22

      Any ideas?

        Yes, show your code. Did the test suite pass? Prerequisite test suite?
Re: GnuPG package for windows
by crashtest (Curate) on Jul 27, 2008 at 21:02 UTC

    Just want to throw this out there: could you make do just calling gpg with system calls or using IPC::Open3? For basic operation (encrypting, decrypting, signing messages), I think this would be enough.

    For example:

    use strict; use warnings; my $file = 'test.txt'; my $recipient = 'joe@example.com'; my ($armor) = (0); # 1 to generate ascii, 0 to work with binary system('gpg', $armor ? qw(--armor) : (), '--recipient' => $recipient, '--encrypt' => $file) and die "Exit code: $?"; system('gpg', '--output' => "${file}_decrypted", '--decrypt' => $file . ($armor ? ".asc" : ".gpg")) and die "Exit code: $?"; system('gpg', $armor ? qw(--armor) : (), "--output" => "${file}.sig", '--detach-sign' => $file) and die "Exit code: $?";

    Some of the key management could be a little too involved for this method, but depending on what you're trying to do, and seeing that there's not much out there on CPAN, maybe a simpler approach is warranted?