AnyEvent-GnuPG

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: AnyEvent-GnuPG
requires:
  AnyEvent: '0'
  AnyEvent::Proc: '0.104'
  Async::Chain: '0'
  Carp: '0'
  Email::Address: '0'
  Exporter: '0'
  Try::Tiny: '0'
  constant: '0'
  perl: '5.006'
  strict: '0'
  warnings: '0'
resources:
  bugtracker: https://github.com/zurborg/libanyevent-gnupg-perl/issues
  homepage: https://github.com/zurborg/libanyevent-gnupg-perl
  repository: https://github.com/zurborg/libanyevent-gnupg-perl.git
version: '1.001'
x_contributors:

Makefile.PL  view on Meta::CPAN

  "LICENSE" => "gpl",
  "MIN_PERL_VERSION" => "5.006",
  "NAME" => "AnyEvent::GnuPG",
  "PREREQ_PM" => {
    "AnyEvent" => 0,
    "AnyEvent::Proc" => "0.104",
    "Async::Chain" => 0,
    "Carp" => 0,
    "Email::Address" => 0,
    "Exporter" => 0,
    "Try::Tiny" => 0,
    "constant" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "Env::Path" => 0,
    "Test::More" => 0
  },
  "VERSION" => "1.001",
  "test" => {

Makefile.PL  view on Meta::CPAN

my %FallbackPrereqs = (
  "AnyEvent" => 0,
  "AnyEvent::Proc" => "0.104",
  "Async::Chain" => 0,
  "Carp" => 0,
  "Email::Address" => 0,
  "Env::Path" => 0,
  "Exporter" => 0,
  "ExtUtils::MakeMaker" => 0,
  "Test::More" => 0,
  "Try::Tiny" => 0,
  "constant" => 0,
  "strict" => 0,
  "warnings" => 0
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  delete $WriteMakefileArgs{TEST_REQUIRES};
  delete $WriteMakefileArgs{BUILD_REQUIRES};
  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;

lib/AnyEvent/GnuPG.pm  view on Meta::CPAN


package AnyEvent::GnuPG;

# ABSTRACT: AnyEvent-based interface to the GNU Privacy Guard

use Exporter 'import';
use AnyEvent;
use AnyEvent::Proc 0.104;
use Email::Address;
use Async::Chain;
use Try::Tiny;
use Carp qw(confess);

use constant RSA_RSA     => 1;
use constant DSA_ELGAMAL => 2;
use constant DSA         => 3;
use constant RSA         => 4;

use constant TRUST_UNDEFINED => -1;
use constant TRUST_NEVER     => 0;
use constant TRUST_MARGINAL  => 1;

lib/AnyEvent/GnuPG.pm  view on Meta::CPAN

        output => "file.txt",
        passphrase => $secret
    );

=head2 decrypt_cb(%params[, cb => $callback|$condvar])

Asynchronous variant of L</decrypt>.

=head1 API OVERVIEW

The API is accessed through methods on a AnyEvent::GnuPG object which is a wrapper around the B<gpg> program. All methods takes their argument using named parameters, and errors are returned by throwing an exception (using croak). If you wan't to cat...

This modules uses L<AnyEvent::Proc>. For input data, all of L<AnyEvent::Proc/pull> and for output data, all of L<AnyEvent::Proc/pipe> possible handle types are allowed.

The code is based on L<GnuPG> with API compatibility except that L<GnuPG::Tie> is B<not> ported.

=head2 CALLBACKS AND CONDITION VARIABLES

Every method has a callback variant, suffixed with I<_cb>. These methods accept an optional parameter called I<cb>, which can be a CodeRef or an L<AnyEvent>::CondVar and returns a condvar.

    $gpg->method_cb(%params, cb => sub {

t/00-all.t  view on Meta::CPAN

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'

#use Test;

use strict;
use Test::More;
use Try::Tiny;
use Env::Path;

use constant USERID    => "GnuPG Test";
use constant PASSWD    => "test";
use constant UNTRUSTED => "Francis";

use AnyEvent::GnuPG;

BEGIN {
    $| = 1;



( run in 0.720 second using v1.01-cache-2.11-cpan-05444aca049 )