line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Copyright 2007, 2008 Paul Driver <frodwith@gmail.com> |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify |
5
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by |
6
|
|
|
|
|
|
|
# the Free Software Foundation, either version 2 of the License, or |
7
|
|
|
|
|
|
|
# (at your option) any later version. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, |
10
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
11
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12
|
|
|
|
|
|
|
# GNU General Public License for more details. |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License |
15
|
|
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
package POE::Component::MessageQueue::Storage::Generic::Base; |
19
|
5
|
|
|
5
|
|
3389
|
use Moose::Role; |
|
5
|
|
|
|
|
19
|
|
|
5
|
|
|
|
|
144
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Exclude log cause we have our own - we want to call our setted postback. |
22
|
|
|
|
|
|
|
with 'POE::Component::MessageQueue::Storage' => { -excludes => 'log' }; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub log |
25
|
|
|
|
|
|
|
{ |
26
|
7
|
|
|
7
|
0
|
24
|
my $self = shift;; |
27
|
7
|
50
|
|
|
|
313
|
$self->log_function->(@_) if $self->has_log_function; |
28
|
7
|
|
|
|
|
34
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has 'log_function' => ( |
32
|
|
|
|
|
|
|
is => 'rw', |
33
|
|
|
|
|
|
|
writer => 'set_log_function', |
34
|
|
|
|
|
|
|
predicate => 'has_log_function', |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub ignore_signals |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
|
|
0
|
0
|
|
my ($self, @signals) = @_; |
40
|
0
|
|
|
|
|
|
$SIG{$_} = 'IGNORE' foreach (@signals); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |