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