line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Starch::Plugin::Trace::Manager; |
2
|
1
|
|
|
1
|
|
598
|
use 5.008001; |
|
1
|
|
|
|
|
4
|
|
3
|
1
|
|
|
1
|
|
6
|
use strictures 2; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
37
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
189
|
use Moo::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
7
|
1
|
|
|
1
|
|
393
|
use namespace::clean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with qw( |
10
|
|
|
|
|
|
|
Starch::Plugin::ForManager |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
after BUILD => sub{ |
14
|
|
|
|
|
|
|
my ($self) = @_; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$self->log->trace( 'starch.manager.new' ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
return; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
around state => sub{ |
22
|
|
|
|
|
|
|
my $orig = shift; |
23
|
|
|
|
|
|
|
my $self = shift; |
24
|
|
|
|
|
|
|
my ($id) = @_; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $state = $self->$orig( @_ ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
$self->log->tracef( |
29
|
|
|
|
|
|
|
'starch.manager.state.%s.%s', |
30
|
|
|
|
|
|
|
defined($id) ? 'retrieved' : 'created', |
31
|
|
|
|
|
|
|
$state->id(), |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
return $state; |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
around generate_state_id => sub{ |
38
|
|
|
|
|
|
|
my $orig = shift; |
39
|
|
|
|
|
|
|
my $self = shift; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $id = $self->$orig( @_ ); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
$self->log->tracef( |
44
|
|
|
|
|
|
|
'starch.manager.generate_state_id.%s', |
45
|
|
|
|
|
|
|
$id, |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
return $id; |
49
|
|
|
|
|
|
|
}; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |