line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::PAIA::Command::session; |
2
|
4
|
|
|
4
|
|
1431
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
89
|
|
3
|
4
|
|
|
4
|
|
33
|
use v5.10; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
94
|
|
4
|
4
|
|
|
4
|
|
14
|
use parent 'App::PAIA::Command'; |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
16
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.30'; |
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
198
|
use App::PAIA::JSON; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
640
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _execute { |
11
|
3
|
|
|
3
|
|
3
|
my ($self, $opt, $args) = @_; |
12
|
|
|
|
|
|
|
|
13
|
3
|
100
|
|
|
|
12
|
if (defined $self->session->file ) { |
14
|
2
|
|
|
|
|
5
|
my $data = $self->session->load; |
15
|
2
|
100
|
|
|
|
6
|
say encode_json($data) if $self->app->global_options->verbose; |
16
|
2
|
|
|
|
|
251
|
my $msg = $self->not_authentificated; |
17
|
2
|
50
|
|
|
|
5
|
die "$msg.\n" if $msg; |
18
|
2
|
|
|
|
|
7
|
say "session looks fine."; |
19
|
|
|
|
|
|
|
} else { |
20
|
1
|
|
|
|
|
20
|
die "no session file found.\n"; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
2
|
50
|
|
|
|
25
|
if (!$self->auth) { |
24
|
0
|
|
|
|
|
0
|
die "PAIA auth server URL not found\n"; |
25
|
|
|
|
|
|
|
} else { |
26
|
2
|
|
|
|
|
5
|
$self->logger->('auth URL: '.$self->auth); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
2
|
50
|
|
|
|
15
|
if (!$self->core) { |
30
|
0
|
|
|
|
|
0
|
die "PAIA core server URL not found\n"; |
31
|
|
|
|
|
|
|
} else { |
32
|
2
|
|
|
|
|
5
|
$self->logger->('core URL: '.$self->core); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
11
|
return; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
__END__ |