line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Ark::Plugin::Session::State::OpenSocial; |
2
|
1
|
|
|
1
|
|
417
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
4
|
use Ark::Plugin 'Session'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
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; |