summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2014-03-10 16:11:29 +0000
committerintrigeri <intrigeri@boum.org>2014-03-10 16:11:29 +0000
commit891cb9f2361cc35d9f4ce8510f4d5274ff62c9fd (patch)
tree66e07959c92e411fae34695579ed6ea8d8a9dcd1
parent84b2776bebd881e9c82cfb3baf24b0e1c022e184 (diff)
Imported Upstream version 0.47
-rw-r--r--ChangeLog8
-rw-r--r--META.yml6
-rw-r--r--Makefile.PL6
-rw-r--r--SIGNATURE42
-rw-r--r--lib/GnuPG/Fingerprint.pm5
-rw-r--r--lib/GnuPG/Handles.pm5
-rw-r--r--lib/GnuPG/HashInit.pm2
-rw-r--r--lib/GnuPG/Interface.pm12
-rw-r--r--lib/GnuPG/Key.pm7
-rw-r--r--lib/GnuPG/Options.pm34
-rw-r--r--lib/GnuPG/PrimaryKey.pm22
-rw-r--r--lib/GnuPG/PublicKey.pm4
-rw-r--r--lib/GnuPG/Revoker.pm5
-rw-r--r--lib/GnuPG/SecretKey.pm4
-rw-r--r--lib/GnuPG/Signature.pm5
-rw-r--r--lib/GnuPG/SubKey.pm5
-rw-r--r--lib/GnuPG/UserAttribute.pm5
-rw-r--r--lib/GnuPG/UserId.pm5
18 files changed, 87 insertions, 95 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c46d6e..96f959e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+0.47_02 Fri Feb 14 11:16:17 EST 2014
+ Remove a stray 'use Data::Dumper::Concise' added in 0.47_01
+
+0.47_01 Mon Jan 27 17:03:17 EST 2014
+ Switch from Any::Moose to Moo
+ Accept "gpg (GnuPG/MacGPG2)" as a valid gpg version
+ Typo fixes in documentation
+
0.46 Thu Oct 25 14:04:17 EDT 2012
Add a ->search_keys method
diff --git a/META.yml b/META.yml
index 1beaef2..683bcf6 100644
--- a/META.yml
+++ b/META.yml
@@ -20,8 +20,10 @@ no_index:
- t
- test
requires:
- Any::Moose: 0.04
Math::BigInt: 1.78
+ Moo: 0.091011
+ MooX::HandlesVia: 0.001004
+ MooX::late: 0.014
resources:
license: http://dev.perl.org/licenses/
-version: 0.46
+version: 0.47
diff --git a/Makefile.PL b/Makefile.PL
index 8156e7f..00b9e29 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -8,7 +8,7 @@ die "gpg (GnuPG) not found" if ( $? != 0 );
my $output = `gpg --version`;
die "Can't determine gpg version"
- unless $output =~ /^gpg \(GnuPG\) (\d+\.\d+)/;
+ unless $output =~ /^gpg \(GnuPG.*?\) (\d+\.\d+)/;
die "gpg (GnuPG) 1.4 or later is required" unless $1 >= 1.4;
@@ -16,7 +16,9 @@ author 'Frank J. Tobin';
abstract 'supply object methods for interacting with GnuPG';
name 'GnuPG-Interface';
version_from 'lib/GnuPG/Interface.pm';
-requires 'Any::Moose' => '0.04';
+requires 'Moo' => '0.091011';
+requires 'MooX::HandlesVia' => '0.001004';
+requires 'MooX::late' => '0.014';
requires 'Math::BigInt' => '1.78';
license 'perl';
diff --git a/SIGNATURE b/SIGNATURE
index 5074a6b..18c04df 100644
--- a/SIGNATURE
+++ b/SIGNATURE
@@ -1,5 +1,5 @@
This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.68.
+signed via the Module::Signature module, version 0.69.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
@@ -15,11 +15,11 @@ not run its Makefile.PL or Build.PL.
Hash: SHA1
SHA1 187c2cfc1fc31d42c18d5b1653afa1a905bf266c COPYING
-SHA1 b9db27c778702df04650d3cdb6f791fca8cc727c ChangeLog
+SHA1 dd60a5b1037f2826d29dbd2a16259cdb9f425798 ChangeLog
SHA1 37e4d07c43f08f41a24fd1157ab530a4a06aab37 MANIFEST
SHA1 0c5f7bda8a3ce57e27dcd7f32459d8b286f1339e MANIFEST.SKIP
-SHA1 863944080648e823e852f3b58c768897a709de59 META.yml
-SHA1 7782ec3ebf4194b81b83f39f0c0f5564e0363149 Makefile.PL
+SHA1 6c1b3d8ee6d442a3ff78de30502440e3befa4b8f META.yml
+SHA1 5bc6888b1495f726acc49d82aebd6ddf1ed5757a Makefile.PL
SHA1 d6e32c5128419cdbfe6e6f846ff7f64fc0adac2f NEWS
SHA1 1047dc54823b1321e939274dd261d8e40febee24 README
SHA1 df07bf5a2dd74ffe4b69dff3063f68879cf9e355 THANKS
@@ -31,20 +31,20 @@ SHA1 b62ca5e2d58fa66766ccf4d64574f9e1a2250b34 inc/Module/Install/Makefile.pm
SHA1 1aa925be410bb3bfcd84a16985921f66073cc1d2 inc/Module/Install/Metadata.pm
SHA1 e4196994fa75e98bdfa2be0bdeeffef66de88171 inc/Module/Install/Win32.pm
SHA1 c3a6d0d5b84feb3280622e9599e86247d58b0d18 inc/Module/Install/WriteAll.pm
-SHA1 9a2b6c9e5434daf32bc2a3e15e25175fc49fd604 lib/GnuPG/Fingerprint.pm
-SHA1 8852195e80823c93b6aed673e69433ae3ea46d26 lib/GnuPG/Handles.pm
-SHA1 779e6a921fa104e8f16fd4a6d38f670074592811 lib/GnuPG/HashInit.pm
-SHA1 d959f3b7feeacc017836b1652dfdc35fa75cce04 lib/GnuPG/Interface.pm
-SHA1 bb75d45acb8268096348740e261812519b7258cb lib/GnuPG/Key.pm
-SHA1 697b1408b404e4dff0ae553646fb3c12f821fcd4 lib/GnuPG/Options.pm
-SHA1 5fbf442fc1586b88139508b838700b7a3992ced7 lib/GnuPG/PrimaryKey.pm
-SHA1 1cf3880965f6a600af7713252b42c624b748c493 lib/GnuPG/PublicKey.pm
-SHA1 1b0323f31492f4564b5983b8d7f1e99f8a794d6f lib/GnuPG/Revoker.pm
-SHA1 1aa4521f22337b6a8d8c7980a97ea9f692528038 lib/GnuPG/SecretKey.pm
-SHA1 b7777eef0e5517d58f04ec06c942df24eca1724a lib/GnuPG/Signature.pm
-SHA1 91edc51255f9bf5882af027c0489d76f11894f4c lib/GnuPG/SubKey.pm
-SHA1 6d70018973ec4fd4b224b2eb7bf77b2b007f72b2 lib/GnuPG/UserAttribute.pm
-SHA1 145730a6ccc5d543a65ee25411bb6d8119dc8fce lib/GnuPG/UserId.pm
+SHA1 d1cf614274e3b01254379758123b75034e1d2e80 lib/GnuPG/Fingerprint.pm
+SHA1 9508207dbd2a4b36a38e08b72f39fc4d26c49615 lib/GnuPG/Handles.pm
+SHA1 b2fe771ca9a1d719b222013e08b93ab57f7452e8 lib/GnuPG/HashInit.pm
+SHA1 4a9e1f9977e081a7c931925fdd36b96cb0f64624 lib/GnuPG/Interface.pm
+SHA1 41cc5278e62c3298248cefbd27179d0322e65011 lib/GnuPG/Key.pm
+SHA1 c142388c5e2ed7519d2382e133bee6755fbd213b lib/GnuPG/Options.pm
+SHA1 01db712289625326853f662fe8c332f562e8d6f0 lib/GnuPG/PrimaryKey.pm
+SHA1 a38e294729aac733fafcf9d7e4b7ef5fcb50e685 lib/GnuPG/PublicKey.pm
+SHA1 4b917013b36c4e66bdf3ae27cc8e056c9bd6be64 lib/GnuPG/Revoker.pm
+SHA1 3dbf6667b73b61dff5bc8db30b6dd81415297c09 lib/GnuPG/SecretKey.pm
+SHA1 f19dfa77fd83fcc520aa2246318b359c0ba844cd lib/GnuPG/Signature.pm
+SHA1 3267654e96c0fbe6805c466f193e92c5cd8a5e5b lib/GnuPG/SubKey.pm
+SHA1 acfec9fd5e879711280d5ac8ebfd667fde8d4f1e lib/GnuPG/UserAttribute.pm
+SHA1 d70a9e4c89b2fe445c733dc9c177d62cc9f44826 lib/GnuPG/UserId.pm
SHA1 367fdb308292a9c005afffef49ff9096a20a4da3 t/Fingerprint.t
SHA1 8791d014e4efd4cf11998386e1651cc4eb16dd26 t/Interface.t
SHA1 698ec633be083b7e762331f1a5106c1618c74dd3 t/MyTest.pm
@@ -95,7 +95,7 @@ SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 test/temp
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
-iEYEARECAAYFAlCJua0ACgkQMflWJZZAbqAi2gCeILIoMJtmSIWZy84mCc/R3QLu
-GhcAn3kzvFOY1WcfRT6ayUD9GoJvQ5kz
-=6FyK
+iEYEARECAAYFAlMd1RMACgkQMflWJZZAbqABBQCfbDeUa+JoX3TgPADwfvVUV+Oi
+EqUAoKlp7Gp6FwI9v/1VTtGs6Z2jEFNU
+=vX2E
-----END PGP SIGNATURE-----
diff --git a/lib/GnuPG/Fingerprint.pm b/lib/GnuPG/Fingerprint.pm
index 871e02a..fcb1028 100644
--- a/lib/GnuPG/Fingerprint.pm
+++ b/lib/GnuPG/Fingerprint.pm
@@ -14,7 +14,8 @@
#
package GnuPG::Fingerprint;
-use Any::Moose;
+use Moo;
+use MooX::late;
with qw(GnuPG::HashInit);
has as_hex_string => (
@@ -36,8 +37,6 @@ sub hex_data
return $self->as_hex_string();
}
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/Handles.pm b/lib/GnuPG/Handles.pm
index fabf31c..b30ca57 100644
--- a/lib/GnuPG/Handles.pm
+++ b/lib/GnuPG/Handles.pm
@@ -14,7 +14,8 @@
#
package GnuPG::Handles;
-use Any::Moose;
+use Moo;
+use MooX::late;
with qw(GnuPG::HashInit);
use constant HANDLES => qw(
@@ -57,8 +58,6 @@ sub BUILD {
$self->hash_init(%$args);
}
-__PACKAGE__->meta->make_immutable;
-
1;
=head1 NAME
diff --git a/lib/GnuPG/HashInit.pm b/lib/GnuPG/HashInit.pm
index 9daa6a9..a278b09 100644
--- a/lib/GnuPG/HashInit.pm
+++ b/lib/GnuPG/HashInit.pm
@@ -1,5 +1,5 @@
package GnuPG::HashInit;
-use Any::Moose 'Role';
+use Moo::Role;
sub hash_init {
my ($self, %args) = @_;
diff --git a/lib/GnuPG/Interface.pm b/lib/GnuPG/Interface.pm
index 5d80eeb..ed5d6a9 100644
--- a/lib/GnuPG/Interface.pm
+++ b/lib/GnuPG/Interface.pm
@@ -1,4 +1,4 @@
-# Jnterface.pm
+# Interface.pm
# - providing an object-oriented approach to interacting with GnuPG
#
# Copyright (C) 2000 Frank J. Tobin <ftobin@cpan.org>
@@ -12,7 +12,8 @@
#
package GnuPG::Interface;
-use Any::Moose;
+use Moo;
+use MooX::late;
with qw(GnuPG::HashInit);
use English qw( -no_match_vars );
@@ -27,7 +28,7 @@ use Math::BigInt try => 'GMP';
use GnuPG::Options;
use GnuPG::Handles;
-$VERSION = '0.46';
+$VERSION = '0.47';
has $_ => (
isa => 'Any',
@@ -867,7 +868,7 @@ decryption, verification, and key-listing parsing.
=head2 How Data Member Accessor Methods are Created
Each module in the GnuPG::Interface bundle relies
-on Any::Moose to generate the get/set methods
+on Moo to generate the get/set methods
used to set the object's data members.
I<This is very important to realize.> This means that
any data member which is a list has special
@@ -1351,8 +1352,5 @@ Frank J. Tobin, ftobin@cpan.org was the original author of the package.
=cut
-
-__PACKAGE__->meta->make_immutable;
-
1;
diff --git a/lib/GnuPG/Key.pm b/lib/GnuPG/Key.pm
index fbdda52..8f98f85 100644
--- a/lib/GnuPG/Key.pm
+++ b/lib/GnuPG/Key.pm
@@ -14,7 +14,8 @@
#
package GnuPG::Key;
-use Any::Moose;
+use Moo;
+use MooX::late;
with qw(GnuPG::HashInit);
has [
@@ -124,8 +125,6 @@ sub compare {
return 1;
}
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
@@ -186,7 +185,7 @@ Number of bits in the key.
They algorithm number that the Key is used for.
-=item usage flags
+=item usage_flags
The Key Usage flags associated with this key, represented as a string
of lower-case letters. Possible values include: (a) authenticate, (c)
diff --git a/lib/GnuPG/Options.pm b/lib/GnuPG/Options.pm
index bbfd67a..2342558 100644
--- a/lib/GnuPG/Options.pm
+++ b/lib/GnuPG/Options.pm
@@ -14,7 +14,9 @@
#
package GnuPG::Options;
-use Any::Moose;
+use Moo;
+use MooX::late;
+use MooX::HandlesVia;
with qw(GnuPG::HashInit);
use constant BOOLEANS => qw(
@@ -71,17 +73,15 @@ has $_ => (
for my $list (LISTS) {
has $list => (
- isa => 'ArrayRef',
- is => 'rw',
- lazy => 1,
- clearer => "clear_$list",
- default => sub { [] },
- auto_deref => 1,
+ handles_via => 'Array',
+ is => 'rw',
+ lazy => 1,
+ clearer => "clear_$list",
+ default => sub { [] },
+ handles => {
+ "push_$list" => 'push',
+ },
);
- __PACKAGE__->meta->add_method("push_$list" => sub {
- my $self = shift;
- push @{ $self->$list }, @_;
- });
}
sub BUILD {
@@ -110,7 +110,7 @@ sub get_args {
return (
$self->get_meta_args(),
$self->get_option_args(),
- $self->extra_args(),
+ @{$self->extra_args()},
);
}
@@ -147,8 +147,8 @@ sub get_option_args {
push @args, '--command-fd', $self->command_fd()
if defined $self->command_fd();
- push @args, map { ( '--recipient', $_ ) } $self->recipients();
- push @args, map { ( '--encrypt-to', $_ ) } $self->encrypt_to();
+ push @args, map { ( '--recipient', $_ ) } @{$self->recipients};
+ push @args, map { ( '--encrypt-to', $_ ) } @{$self->encrypt_to};
return @args;
}
@@ -172,15 +172,13 @@ sub get_meta_args {
if $self->meta_signing_key();
push @args,
- map { ( '--recipient', $_ ) } $self->meta_recipients_key_ids();
+ map { ( '--recipient', $_ ) } @{$self->meta_recipients_key_ids};
push @args,
- map { ( '--recipient', $_->hex_id() ) } $self->meta_recipients_keys();
+ map { ( '--recipient', $_->hex_id() ) } @{$self->meta_recipients_keys};
return @args;
}
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/PrimaryKey.pm b/lib/GnuPG/PrimaryKey.pm
index d36d0b9..d3c745e 100644
--- a/lib/GnuPG/PrimaryKey.pm
+++ b/lib/GnuPG/PrimaryKey.pm
@@ -14,22 +14,21 @@
#
package GnuPG::PrimaryKey;
-use Any::Moose;
+use Moo;
+use MooX::late;
+use MooX::HandlesVia;
BEGIN { extends qw( GnuPG::Key ) }
for my $list (qw(user_ids subkeys user_attributes)) {
has $list => (
- isa => 'ArrayRef',
- is => 'rw',
- default => sub { [] },
- auto_deref => 1,
+ handles_via => 'Array',
+ is => 'rw',
+ default => sub { [] },
+ handles => {
+ "push_$list" => 'push',
+ },
);
-
- __PACKAGE__->meta->add_method("push_$list" => sub {
- my $self = shift;
- push @{ $self->$list }, @_;
- });
}
has $_ => (
@@ -71,9 +70,6 @@ sub compare {
return $self->SUPER::compare($other, $deep);
}
-
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/PublicKey.pm b/lib/GnuPG/PublicKey.pm
index 69609b3..62a7963 100644
--- a/lib/GnuPG/PublicKey.pm
+++ b/lib/GnuPG/PublicKey.pm
@@ -14,12 +14,10 @@
#
package GnuPG::PublicKey;
-use Any::Moose;
+use Moo;
BEGIN { extends qw( GnuPG::PrimaryKey ) }
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/Revoker.pm b/lib/GnuPG/Revoker.pm
index 151a2f5..0bd79dd 100644
--- a/lib/GnuPG/Revoker.pm
+++ b/lib/GnuPG/Revoker.pm
@@ -15,7 +15,8 @@
#
package GnuPG::Revoker;
-use Any::Moose;
+use Moo;
+use MooX::late;
has [qw(
algo_num
@@ -70,8 +71,6 @@ sub compare {
return 1;
}
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/SecretKey.pm b/lib/GnuPG/SecretKey.pm
index 18cc161..eead427 100644
--- a/lib/GnuPG/SecretKey.pm
+++ b/lib/GnuPG/SecretKey.pm
@@ -14,12 +14,10 @@
#
package GnuPG::SecretKey;
-use Any::Moose;
+use Moo;
BEGIN { extends qw( GnuPG::PrimaryKey ) }
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/Signature.pm b/lib/GnuPG/Signature.pm
index c2ba189..5020bb7 100644
--- a/lib/GnuPG/Signature.pm
+++ b/lib/GnuPG/Signature.pm
@@ -14,7 +14,8 @@
#
package GnuPG::Signature;
-use Any::Moose;
+use Moo;
+use MooX::late;
has [qw(
validity
@@ -62,8 +63,6 @@ sub compare {
return 1;
}
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/SubKey.pm b/lib/GnuPG/SubKey.pm
index 1e5f606..f5d7872 100644
--- a/lib/GnuPG/SubKey.pm
+++ b/lib/GnuPG/SubKey.pm
@@ -14,8 +14,9 @@
#
package GnuPG::SubKey;
-use Any::Moose;
use Carp;
+use Moo;
+use MooX::late;
BEGIN { extends qw( GnuPG::Key ) }
has [qw( validity owner_trust local_id )] => (
@@ -43,8 +44,6 @@ sub signature {
}
}
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/UserAttribute.pm b/lib/GnuPG/UserAttribute.pm
index 22ffbd1..ddc7ead 100644
--- a/lib/GnuPG/UserAttribute.pm
+++ b/lib/GnuPG/UserAttribute.pm
@@ -15,7 +15,8 @@
#
package GnuPG::UserAttribute;
-use Any::Moose;
+use Moo;
+use MooX::late;
has [qw( validity subpacket_count subpacket_total_size )] => (
isa => 'Any',
@@ -42,8 +43,6 @@ sub push_revocations {
push @{ $self->revocations }, @_;
}
-__PACKAGE__->meta->make_immutable;
-
1;
__END__
diff --git a/lib/GnuPG/UserId.pm b/lib/GnuPG/UserId.pm
index eef2da1..8c4124f 100644
--- a/lib/GnuPG/UserId.pm
+++ b/lib/GnuPG/UserId.pm
@@ -14,7 +14,8 @@
#
package GnuPG::UserId;
-use Any::Moose;
+use Moo;
+use MooX::late;
has [qw( validity as_string )] => (
isa => 'Any',
@@ -77,8 +78,6 @@ sub user_id_string {
return $self->as_string();
}
-__PACKAGE__->meta->make_immutable;
-
1;
__END__