File Coverage

blib/lib/Password/Policy/Encryption.pm
Criterion Covered Total %
statement 14 15 93.3
branch n/a
condition 2 3 66.6
subroutine 6 7 85.7
pod 0 4 0.0
total 22 29 75.8


line stmt bran cond sub pod time code
1             package Password::Policy::Encryption;
2             $Password::Policy::Encryption::VERSION = '0.03';
3 4     4   1422 use strict;
  4         6  
  4         112  
4 4     4   17 use warnings;
  4         4  
  4         74  
5              
6 4     4   671 use Password::Policy::Exception::EmptyPassword;
  4         5  
  4         438  
7              
8 10     10 0 78 sub new { bless {} => shift; }
9 0     0 0 0 sub enc { return "This was not implemented properly."; }
10              
11             # alias
12             sub encrypt {
13 2     2 0 530 my ($self, $arg) = @_;
14 2         6 return $self->enc($arg);
15             }
16              
17             sub prepare {
18 18     18 0 30 my ($self, $password) = @_;
19 18   66     127 return $password || Password::Policy::Exception::EmptyPassword->throw;
20             }
21              
22             1;
23              
24             __END__