| 1 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | package DBIx::Class::InflateColumn::Authen::Passphrase; | ||||||||||||||||||||||||||||
| 5 | BEGIN { | ||||||||||||||||||||||||||||
| 6 | 1 | ▶ | $DBIx::Class::InflateColumn::Authen::Passphrase::AUTHORITY = 'cpan:FLORA'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | } | ||||||||||||||||||||||||||||
| 8 | BEGIN { | ||||||||||||||||||||||||||||
| 9 | 1 | ▶ | $DBIx::Class::InflateColumn::Authen::Passphrase::VERSION = '0.01'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | } | ||||||||||||||||||||||||||||
| 11 | # ABSTRACT: Inflate/deflate columns to Authen::Passphrase instances | ||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use Authen::Passphrase; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use parent 'DBIx::Class'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | sub register_column { | ||||||||||||||||||||||||||||
| 18 | 3 | ▶ | my ($self, $column, $info, @rest) = @_; | ||||||||||||||||||||||||||
|
Subroutine
register_column: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 3 | $self->next::method($column, $info, @rest); | |||||||||||||||||||||||||||
| 21 | 3 | ▶ | return unless my $encoding = $info->{inflate_passphrase}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 2 | ▶ | $self->throw_exception(q['rfc2307' and 'crypt' are the only supported types of passphrase columns]) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$encoding eq "rfc2307" or $encoding eq "crypt"
MC/DC0%0/2
$encoding eq "rfc2307" or $encoding eq "crypt"
$encoding eq "rfc2307"
$encoding eq "crypt"
Truth table66%2/3
A or B
A= $encoding eq "rfc2307"B= $encoding eq "crypt"
| |||||||||||||||||||||||||||||
| 24 | unless $encoding eq 'rfc2307' || $encoding eq 'crypt'; | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | $self->inflate_column( | ||||||||||||||||||||||||||||
| 27 | $column => { | ||||||||||||||||||||||||||||
| 28 | 2 | ▶ | inflate => sub { Authen::Passphrase->${\"from_${encoding}"}(shift) }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 29 | 2 | ▶ | deflate => sub { shift->${\"as_${encoding}"} }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 30 | }, | ||||||||||||||||||||||||||||
| 31 | 2 | ); | |||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 1 | 1; | |||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | __END__ | ||||||||||||||||||||||||||||