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