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

filter: Statementstmt 54.5% 6 / 11 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod 0.0% 0 / 2 totaltotal 38.8% 7 / 18 CC 3 SCAR 16.1
CC
3
Cov
46%
log
6.0
ignore_signals
6.0
BEGIN
1.0
CRAP 5.0
« script/mq.pl ↑ Summary lib/POE/Component/Server/Stomp.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 3 ▶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 3 with 'POE::Component::MessageQueue::Storage' => { -excludes => 'log' };
23  
24 sub log
25 {
26 0 ▶ my $self = shift;;
Subroutine log: not called CC=2 SCAR=17.9
Pod undocumented
27 0 ▶ $self->log_function->(@_) if $self->has_log_function;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_log_function 0 0 0
28 0 return;
29 }
30  
31 3 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 3 1;
« script/mq.pl ↑ Summary lib/POE/Component/Server/Stomp.pm »