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.04';
3 4     4   1411 use strict;
  4         6  
  4         196  
4 4     4   13 use warnings;
  4         4  
  4         76  
5              
6 4     4   773 use Password::Policy::Exception::EmptyPassword;
  4         6  
  4         386  
7              
8 10     10 0 69 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 470 my ($self, $arg) = @_;
14 2         7 return $self->enc($arg);
15             }
16              
17             sub prepare {
18 18     18 0 24 my ($self, $password) = @_;
19 18   66     87 return $password || Password::Policy::Exception::EmptyPassword->throw;
20             }
21              
22             1;
23              
24             __END__