Finger.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 34 SCAR 17.9
CC
2
Cov
0%
fetch
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 6.0
1 package PGP::Finger;
2  
3 use Moose;
4  
5 # ABSTRACT: retrieve PGP keys from different sources
6 our $VERSION = '1.0'; # VERSION
7  
8 use PGP::Finger::DNS;
9 use PGP::Finger::Keyserver;
10 use PGP::Finger::ResultSet;
11  
12 has 'sources' => ( is => 'ro', isa => 'ArrayRef[PGP::Finger::Source]', lazy => 1,
13 default => sub { [
14 PGP::Finger::DNS->new,
15 PGP::Finger::Keyserver->new,
16 ] },
17 );
18  
19 sub fetch {
20 my ( $self, $addr ) = @_;
21 my $resultset = PGP::Finger::ResultSet->new;
22  
23 foreach my $source ( @{$self->sources} ) {
24 my $result = $source->fetch( $addr );
25 if( ! defined $result ) { next; }
26 $resultset->add_result( $result );
27 }
28 return $resultset;
29 }
30  
31 1;
32  
33 __END__
34  
35 =pod
36  
37 =encoding UTF-8
38  
39 =head1 NAME
40  
41 PGP::Finger - retrieve PGP keys from different sources
42  
43 =head1 VERSION
44  
45 version 1.0
46  
47 =head1 AUTHOR
48  
49 Markus Benning <ich@markusbenning.de>
50  
51 =head1 COPYRIGHT AND LICENSE
52  
53 This software is Copyright (c) 2015 by Markus Benning.
54  
55 This is free software, licensed under:
56  
57 The GNU General Public License, Version 2 or later
58  
59 =cut