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