lib/POE/Component/MessageQueue/IDGenerator.pm

filter: Statementstmt 100% 5 / 5 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 6 / 6 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« lib/POE/Component/MessageQueue/Destination.pm ↑ Summary
1 #
2 # Copyright 2007, 2008, 2009 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::IDGenerator;
19 18 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 18 requires qw(generate);
22  
23 18 1;
24  
25 =head1 NAME
26  
27 POE::Component::MessageQueue::IDGenerator - Role for id generators.
28  
29 =head1 DESCRIPTION
30  
31 This can't be used directly, but just defines the interface for ID
32 generators.
33  
34 =head1 METHODS
35  
36 =over 4
37  
38 =item new
39  
40 Returns a new instance of the ID generator. You should do any seeding,
41 reading from persistence, or whatnot here.
42  
43 =item generate => SCALAR
44  
45 Returns some kind of unique string.
46  
47 =back
48  
49 SEE ALSO
50  
51 L<POE::Component::MessageQueue::Message::ID>
52  
53 =head1 AUTHOR
54  
55 Paul Driver <frodwith@gmail.com>
« lib/POE/Component/MessageQueue/Destination.pm ↑ Summary