summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-05-09 17:29:28 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-05-09 17:29:28 -0400
commit6007358acd4d21c5fc1ce9c0df36dee9c663c506 (patch)
tree9dd18059841d44ab172ce4ac35c399f82e07b6b4 /lib
parent8cfccc75841d0c457258fd8885828c9c8e18ff81 (diff)
adopt suggestions from Jesse Vincent: do not carp on use of the deprecated G:SubKey->signature(), and default behavor when G:SubKey-signature() is called with an argument is to clear the signatures list before pushing to it
Diffstat (limited to 'lib')
-rw-r--r--lib/GnuPG/SubKey.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/GnuPG/SubKey.pm b/lib/GnuPG/SubKey.pm
index b4743f3..568aaad 100644
--- a/lib/GnuPG/SubKey.pm
+++ b/lib/GnuPG/SubKey.pm
@@ -42,10 +42,9 @@ sub signature {
my $argcount = @_;
if ($argcount) {
- carp("Please do not use GnuPG::SubKey::signature(). Use GnuPG::SubKey::push_signatures() instead, since subkeys can have more than one signature.");
+ @{$self->signatures} = ();
$self->push_signatures(@_);
} else {
- carp("Please do not use GnuPG::SubKey::signature. Use GnuPG::SubKey::signatures instead, since subkeys can have more than one signature.");
my $sigcount = @{$self->signatures};
if ($sigcount) {
return $self->signatures->[$sigcount-1];