| 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
| |||||||||||
| 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; | |||||||||