line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Config::Identity::PAUSE; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
78619
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
56
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use Config::Identity; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
9
|
|
7
|
1
|
|
|
1
|
|
17
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
485
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $STUB = 'pause'; |
10
|
3
|
|
100
|
3
|
0
|
50
|
sub STUB { defined $_ and return $_ for $ENV{CI_PAUSE_STUB}, $STUB } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub load { |
13
|
3
|
|
|
3
|
0
|
7
|
my $self = shift; |
14
|
3
|
|
|
|
|
18
|
my %identity = Config::Identity->try_best( $self->STUB ); |
15
|
3
|
100
|
66
|
|
|
30
|
$identity{user} = $identity{username} if exists $identity{username} && ! exists $identity{user}; |
16
|
3
|
100
|
66
|
|
|
30
|
$identity{username} = $identity{user} if exists $identity{user} && ! exists $identity{username}; |
17
|
3
|
|
|
|
|
18
|
return %identity; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub check { |
21
|
3
|
|
|
3
|
0
|
6
|
my $self = shift; |
22
|
3
|
|
|
|
|
20
|
my %identity = @_; |
23
|
3
|
|
|
|
|
8
|
my @missing; |
24
|
|
|
|
|
|
|
defined $identity{$_} && length $identity{$_} |
25
|
3
|
|
33
|
|
|
33
|
or push @missing, $_ for qw/ user password /; |
|
|
|
50
|
|
|
|
|
26
|
3
|
50
|
|
|
|
15
|
croak "Missing ", join ' and ', @missing if @missing; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub load_check { |
30
|
3
|
|
|
3
|
0
|
58905
|
my $self = shift; |
31
|
3
|
|
|
|
|
14
|
my %identity = $self->load; |
32
|
3
|
|
|
|
|
31
|
$self->check( %identity ); |
33
|
3
|
|
|
|
|
21
|
return %identity; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |