line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::Class::InflateColumn::Crypt::Passphrase; |
2
|
|
|
|
|
|
|
$DBIx::Class::InflateColumn::Crypt::Passphrase::VERSION = '0.005'; |
3
|
2
|
|
|
2
|
|
223769
|
use strict; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
56
|
|
4
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
53
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
14
|
use parent 'DBIx::Class'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
25
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
1105
|
use Crypt::Passphrase 0.007; |
|
2
|
|
|
|
|
29858
|
|
|
2
|
|
|
|
|
12
|
|
9
|
2
|
|
|
2
|
|
73
|
use Scalar::Util 'blessed'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
97
|
|
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
13
|
use namespace::clean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub register_column { |
14
|
4
|
|
|
4
|
1
|
9864
|
my ($self, $column, $info, @rest) = @_; |
15
|
|
|
|
|
|
|
|
16
|
4
|
|
|
|
|
19
|
$self->next::method($column, $info, @rest); |
17
|
4
|
100
|
|
|
|
1995
|
return unless my $encoding = $info->{inflate_passphrase}; |
18
|
|
|
|
|
|
|
|
19
|
2
|
100
|
|
|
|
12
|
my $crypt_passphrase = blessed($encoding) ? $encoding : Crypt::Passphrase->new(%{ $encoding }); |
|
1
|
|
|
|
|
6
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$self->inflate_column( |
22
|
|
|
|
|
|
|
$column => { |
23
|
3
|
|
|
3
|
|
66652
|
inflate => sub { $crypt_passphrase->curry_with_hash(shift) }, |
24
|
1
|
|
|
1
|
|
128558
|
deflate => sub { shift->raw_hash }, |
25
|
|
|
|
|
|
|
}, |
26
|
2
|
|
|
|
|
83
|
); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# ABSTRACT: Inflate/deflate columns to passphrase objects |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |