| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#+############################################################################## |
|
2
|
|
|
|
|
|
|
# # |
|
3
|
|
|
|
|
|
|
# File: Messaging/Message/Queue/NULL.pm # |
|
4
|
|
|
|
|
|
|
# # |
|
5
|
|
|
|
|
|
|
# Description: abstraction of a null message queue # |
|
6
|
|
|
|
|
|
|
# # |
|
7
|
|
|
|
|
|
|
#-############################################################################## |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# |
|
10
|
|
|
|
|
|
|
# module definition |
|
11
|
|
|
|
|
|
|
# |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Messaging::Message::Queue::NULL; |
|
14
|
1
|
|
|
1
|
|
9
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
38
|
|
|
15
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
140
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = "1.7"; |
|
17
|
|
|
|
|
|
|
our $REVISION = sprintf("%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# |
|
20
|
|
|
|
|
|
|
# inheritance |
|
21
|
|
|
|
|
|
|
# |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our @ISA = qw(Messaging::Message::Queue); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# |
|
26
|
|
|
|
|
|
|
# used modules |
|
27
|
|
|
|
|
|
|
# |
|
28
|
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
|
7
|
use No::Worries::Die qw(dief); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
11
|
|
|
30
|
1
|
|
|
1
|
|
135
|
use Params::Validate qw(validate_with); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
557
|
|
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# |
|
33
|
|
|
|
|
|
|
# constructor |
|
34
|
|
|
|
|
|
|
# |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new : method { |
|
37
|
1
|
|
|
1
|
1
|
3
|
my($class, %option, $self); |
|
38
|
|
|
|
|
|
|
|
|
39
|
1
|
|
|
|
|
2
|
$class = shift(@_); |
|
40
|
1
|
|
|
|
|
14
|
%option = validate_with( |
|
41
|
|
|
|
|
|
|
params => \@_, |
|
42
|
|
|
|
|
|
|
spec => {}, |
|
43
|
|
|
|
|
|
|
allow_extra => 0, |
|
44
|
|
|
|
|
|
|
); |
|
45
|
1
|
|
|
|
|
5
|
$self = {}; |
|
46
|
1
|
|
|
|
|
2
|
bless($self, $class); |
|
47
|
1
|
|
|
|
|
8
|
return($self); |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# |
|
51
|
|
|
|
|
|
|
# Directory::Queue methods that can be used |
|
52
|
|
|
|
|
|
|
# |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub first : method { |
|
55
|
0
|
|
|
0
|
0
|
0
|
return(""); |
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub next : method { ## no critic 'ProhibitBuiltinHomonyms' |
|
59
|
0
|
|
|
0
|
0
|
0
|
return(""); |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub count : method { |
|
63
|
1
|
|
|
1
|
0
|
7
|
return(0); |
|
64
|
|
|
|
|
|
|
} |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
0
|
0
|
|
sub purge : method { |
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub path : method { |
|
70
|
0
|
|
|
0
|
0
|
0
|
return("NULL"); |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub id : method { |
|
74
|
0
|
|
|
0
|
0
|
0
|
return("NULL"); |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub add : method { |
|
78
|
0
|
|
|
0
|
0
|
0
|
return(""); |
|
79
|
|
|
|
|
|
|
} |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# |
|
82
|
|
|
|
|
|
|
# Directory::Queue methods that cannot be used |
|
83
|
|
|
|
|
|
|
# |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub touch : method { |
|
86
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: touch()"); |
|
87
|
|
|
|
|
|
|
} |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub lock : method { ## no critic 'ProhibitBuiltinHomonyms' |
|
90
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: lock()"); |
|
91
|
|
|
|
|
|
|
} |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub unlock : method { |
|
94
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: unlock()"); |
|
95
|
|
|
|
|
|
|
} |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub remove : method { |
|
98
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: remove()"); |
|
99
|
|
|
|
|
|
|
} |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub add_ref : method { |
|
102
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: add_ref()"); |
|
103
|
|
|
|
|
|
|
} |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
sub add_path : method { |
|
106
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: add_path()"); |
|
107
|
|
|
|
|
|
|
} |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub get : method { |
|
110
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: get()"); |
|
111
|
|
|
|
|
|
|
} |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub get_ref : method { |
|
114
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: get_ref()"); |
|
115
|
|
|
|
|
|
|
} |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub get_path : method { |
|
118
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: get_path()"); |
|
119
|
|
|
|
|
|
|
} |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
sub copy : method { |
|
122
|
0
|
|
|
0
|
0
|
0
|
dief("unsupported method: copy()"); |
|
123
|
|
|
|
|
|
|
} |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
# |
|
126
|
|
|
|
|
|
|
# add a message object to the queue |
|
127
|
|
|
|
|
|
|
# |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
sub add_message : method { |
|
130
|
1
|
|
|
1
|
1
|
4
|
return("null"); |
|
131
|
|
|
|
|
|
|
} |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
# |
|
134
|
|
|
|
|
|
|
# get a message object from the queue |
|
135
|
|
|
|
|
|
|
# |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub get_message : method { |
|
138
|
0
|
|
|
0
|
1
|
|
dief("unsupported method: get_message()"); |
|
139
|
|
|
|
|
|
|
} |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
1; |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
__DATA__ |