line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Ark::Plugin::Session::State::OpenSocial; |
2
|
1
|
|
|
1
|
|
629
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
6
|
use Ark::Plugin 'Session'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
around get_session_id => sub { |
7
|
|
|
|
|
|
|
my $prev = shift->(@_); |
8
|
|
|
|
|
|
|
return $prev if $prev; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my ($self) = @_; |
11
|
|
|
|
|
|
|
my $request = $self->context->request; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
if (my $id = $request->param('opensocial_owner_id')) { |
14
|
|
|
|
|
|
|
$self->log( debug => q[Found opensocial_owner_id "%s"], $id ); |
15
|
|
|
|
|
|
|
return $id; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
return; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
around initialize_session_data => sub { |
22
|
|
|
|
|
|
|
my $next = shift; |
23
|
|
|
|
|
|
|
my ($self) = @_; |
24
|
|
|
|
|
|
|
my $request = $self->context->request; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
if (my $id = $request->param('opensocial_owner_id')) { |
27
|
|
|
|
|
|
|
$self->set_session_id( $id ); |
28
|
|
|
|
|
|
|
$self->session_data({}); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
|
|
|
|
|
|
$next->(@_); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |