lib/POE/Component/MessageQueue/Storage/Generic/Base.pm

filter: Statementstmt 81.8% 9 / 11 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 2 totaltotal 66.6% 12 / 18 CC 3 SCAR 12.3
CC
3
Cov
77%
ignore_signals
6.0
log
2.0
BEGIN
1.0
CRAP 3.4
« lib/POE/Component/MessageQueue.pm ↑ Summary lib/POE/Component/MessageQueue/Storage/Complex.pm »
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 7 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 # Exclude log cause we have our own - we want to call our setted postback.
22 7 with 'POE::Component::MessageQueue::Storage' => { -excludes => 'log' };
23  
24 sub log
25 {
26 7 ▶ my $self = shift;;
Subroutine log: called CC=2 SCAR=7.1
Pod undocumented
27 7 ▶ $self->log_function->(@_) if $self->has_log_function;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_log_function 0 7 7
28 7 return;
29 }
30  
31 7 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 ▶ my ($self, @signals) = @_;
Subroutine ignore_signals: not called CC=2 SCAR=17.9
Pod undocumented
40 0 $SIG{$_} = 'IGNORE' foreach (@signals);
41 }
42  
43 7 1;
« lib/POE/Component/MessageQueue.pm ↑ Summary lib/POE/Component/MessageQueue/Storage/Complex.pm »