File Coverage

blib/lib/POE/Component/MessageQueue/Topic.pm
Criterion Covered Total %
statement 3 8 37.5
branch n/a
condition n/a
subroutine 1 5 20.0
pod 0 4 0.0
total 4 17 23.5


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::Topic;
19 11     11   74 use Moose;
  11         25  
  11         82  
20              
21             with qw(POE::Component::MessageQueue::Destination);
22             __PACKAGE__->meta->make_immutable();
23              
24             sub send
25             {
26 0     0 0   my ($self, $message) = @_;
27              
28 0           foreach my $subscriber ($self->all_subscriptions)
29             {
30 0           $self->dispatch_message($message, $subscriber);
31             }
32              
33 0           return;
34             }
35              
36 0     0 0   sub is_persistent { return 0 }
37              
38             # These do nothing now, but they may someday
39       0 0   sub pump {}
40       0 0   sub shutdown {}
41              
42             1;
43