File Coverage

blib/lib/Crypt/OpenPGP/UserAttribute.pm
Criterion Covered Total %
statement 22 23 95.6
branch n/a
condition n/a
subroutine 8 9 88.8
pod 0 5 0.0
total 30 37 81.0


line stmt bran cond sub pod time code
1             package Crypt::OpenPGP::UserAttribute;
2 1     1   9 use strict;
  1         2  
  1         59  
3 1     1   45 use warnings;
  1         3  
  1         121  
4              
5             our $VERSION = '1.19'; # VERSION
6              
7 1     1   7 use Crypt::OpenPGP::ErrorHandler;
  1         2  
  1         32  
8 1     1   6 use base qw( Crypt::OpenPGP::ErrorHandler );
  1         2  
  1         407  
9              
10             sub new {
11 1     1 0 3 my $id = bless { }, shift;
12 1         3 $id->init(@_);
13             }
14              
15             sub init {
16 1     1 0 3 my $id = shift;
17 1         2 $id;
18             }
19              
20 0     0 0 0 sub id { $_[0]->{blob} }
21             sub parse {
22 1     1 0 3 my $class = shift;
23 1         3 my($buf) = @_;
24 1         4 my $id = $class->new;
25 1         6 $id->{blob} = $buf->bytes;
26 1         19 $id;
27             }
28              
29 1     1 0 5 sub save { $_[0]->{blob} }
30              
31             1;