Message/Queue.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 28 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Message/Queue/ZERO.pm ↑ Summary
1 #+##############################################################################
2 # #
3 # File: Messaging/Message/Queue.pm #
4 # #
5 # Description: abstraction of a message queue #
6 # #
7 #-##############################################################################
8  
9 #
10 # module definition
11 #
12  
13 package Messaging::Message::Queue;
14 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 3 our $VERSION = "1.7";
17 3 our $REVISION = sprintf("%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/);
18  
19 #
20 # used modules
21 #
22  
23 3 ▶use Messaging::Message qw(_require);
Subroutine BEGIN: called CC=1 SCAR=0.0
24 3 ▶use Params::Validate qw(validate_with :types);
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 #
27 # constructor
28 #
29  
30 2 ▶sub new : method {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
31 2 my($class, %option, $mqc);
32  
33 2 $class = shift(@_);
34 2 %option = validate_with(
35 params => \@_,
36 spec => {
37 type => { type => SCALAR, regex => qr/^[a-zA-Z0-9]+$/ },
38 },
39 allow_extra => 1,
40 );
41 2 $mqc = $class . "::" . $option{type};
42 2 _require($mqc);
43 2 delete($option{type});
44 2 return($mqc->new(\%option));
45 }
46  
47 3 1;
48  
49 __DATA__
« Message/Queue/ZERO.pm ↑ Summary