line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ZMQ::Constants; |
2
|
5
|
|
|
5
|
|
140914
|
use strict; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
340
|
|
3
|
5
|
|
|
5
|
|
27
|
use base qw(Exporter); |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
566
|
|
4
|
5
|
|
|
5
|
|
30
|
use Carp (); |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
955
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my %constants; |
7
|
|
|
|
|
|
|
BEGIN { |
8
|
5
|
|
|
5
|
|
12
|
my $zmq_hausnumero = 156384712; |
9
|
5
|
|
|
|
|
443
|
%constants = ( |
10
|
|
|
|
|
|
|
# socket types |
11
|
|
|
|
|
|
|
ZMQ_PAIR => 0, |
12
|
|
|
|
|
|
|
ZMQ_PUB => 1, |
13
|
|
|
|
|
|
|
ZMQ_SUB => 2, |
14
|
|
|
|
|
|
|
ZMQ_REQ => 3, |
15
|
|
|
|
|
|
|
ZMQ_REP => 4, |
16
|
|
|
|
|
|
|
ZMQ_DEALER => 5, |
17
|
|
|
|
|
|
|
ZMQ_ROUTER => 6, |
18
|
|
|
|
|
|
|
ZMQ_XREQ => 5, # only on v2.x |
19
|
|
|
|
|
|
|
ZMQ_XREP => 6, # only on v2.x |
20
|
|
|
|
|
|
|
ZMQ_PULL => 7, |
21
|
|
|
|
|
|
|
ZMQ_PUSH => 8, |
22
|
|
|
|
|
|
|
ZMQ_UPSTREAM => 7, # only on v2.x |
23
|
|
|
|
|
|
|
ZMQ_DOWNSTREAM => 8, # only on v2.x |
24
|
|
|
|
|
|
|
ZMQ_XPUB => 9, |
25
|
|
|
|
|
|
|
ZMQ_XSUB => 10, |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# message |
28
|
|
|
|
|
|
|
ZMQ_MSG_MORE => 1, # only on v2.x |
29
|
|
|
|
|
|
|
ZMQ_MAX_VSM_SIZE => 30, # only on v2.x |
30
|
|
|
|
|
|
|
ZMQ_DELIMITER => 31, # only on v2.x |
31
|
|
|
|
|
|
|
ZMQ_VSM => 32, # only on v2.x |
32
|
|
|
|
|
|
|
ZMQ_MSG_SHARED => 128, # only on v2.x |
33
|
|
|
|
|
|
|
ZMQ_MSG_MASK => 129, # only on v2.x |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
ZMQ_HWM => 1, # only on v2.x |
37
|
|
|
|
|
|
|
ZMQ_SWAP => 3, # only on v2.x |
38
|
|
|
|
|
|
|
ZMQ_AFFINITY => 4, |
39
|
|
|
|
|
|
|
ZMQ_IDENTITY => 5, |
40
|
|
|
|
|
|
|
ZMQ_SUBSCRIBE => 6, |
41
|
|
|
|
|
|
|
ZMQ_UNSUBSCRIBE => 7, |
42
|
|
|
|
|
|
|
ZMQ_RATE => 8, |
43
|
|
|
|
|
|
|
ZMQ_RECOVERY_IVL => 9, |
44
|
|
|
|
|
|
|
ZMQ_MCAST_LOOP => 10, |
45
|
|
|
|
|
|
|
ZMQ_SNDBUF => 11, |
46
|
|
|
|
|
|
|
ZMQ_RCVBUF => 12, |
47
|
|
|
|
|
|
|
ZMQ_RCVMORE => 13, |
48
|
|
|
|
|
|
|
ZMQ_FD => 14, |
49
|
|
|
|
|
|
|
ZMQ_EVENTS => 15, |
50
|
|
|
|
|
|
|
ZMQ_TYPE => 16, |
51
|
|
|
|
|
|
|
ZMQ_LINGER => 17, |
52
|
|
|
|
|
|
|
ZMQ_RECONNECT_IVL => 18, |
53
|
|
|
|
|
|
|
ZMQ_BACKLOG => 19, |
54
|
|
|
|
|
|
|
ZMQ_RECOVERY_IVL_MSEC => 20, |
55
|
|
|
|
|
|
|
ZMQ_RECONNECT_IVL_MAX => 21, |
56
|
|
|
|
|
|
|
ZMQ_MAXMSGSIZE => 22, |
57
|
|
|
|
|
|
|
ZMQ_SNDHWM => 23, |
58
|
|
|
|
|
|
|
ZMQ_RCVHWM => 24, |
59
|
|
|
|
|
|
|
ZMQ_MULTICAST_HOPS => 25, |
60
|
|
|
|
|
|
|
ZMQ_RCVTIMEO => 27, |
61
|
|
|
|
|
|
|
ZMQ_SNDTIMEO => 28, |
62
|
|
|
|
|
|
|
ZMQ_IPV4ONLY => 31, |
63
|
|
|
|
|
|
|
ZMQ_LAST_ENDPOINT => 32, |
64
|
|
|
|
|
|
|
ZMQ_FAIL_UNROUTABLE => 33, |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
ZMQ_MORE => 1, |
67
|
|
|
|
|
|
|
ZMQ_NOBLOCK => 1, |
68
|
|
|
|
|
|
|
ZMQ_DONTWAIT => 1, |
69
|
|
|
|
|
|
|
ZMQ_SNDMORE => 2, |
70
|
|
|
|
|
|
|
ZMQ_POLLIN => 1, |
71
|
|
|
|
|
|
|
ZMQ_POLLOUT => 2, |
72
|
|
|
|
|
|
|
ZMQ_POLLERR => 4, |
73
|
|
|
|
|
|
|
ZMQ_STREAMER => 1, |
74
|
|
|
|
|
|
|
ZMQ_FORWARDER => 2, |
75
|
|
|
|
|
|
|
ZMQ_QUEUE => 3, |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
ZMQ_HAUSNUMERO => $zmq_hausnumero, |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
# "On Windows platform some of the standard POSIX errnos are not |
80
|
|
|
|
|
|
|
# defined" says zmq.h |
81
|
|
|
|
|
|
|
ENOTSUP => $zmq_hausnumero + 1, |
82
|
|
|
|
|
|
|
EPROTONOSUPPORT => $zmq_hausnumero + 2, |
83
|
|
|
|
|
|
|
ENOBUFS => $zmq_hausnumero + 3, |
84
|
|
|
|
|
|
|
ENETDOWN => $zmq_hausnumero + 4, |
85
|
|
|
|
|
|
|
EADDRINUSE => $zmq_hausnumero + 5, |
86
|
|
|
|
|
|
|
EADDRNOTAVAIL => $zmq_hausnumero + 6, |
87
|
|
|
|
|
|
|
ECONNREFUSED => $zmq_hausnumero + 7, |
88
|
|
|
|
|
|
|
EINPROGRESS => $zmq_hausnumero + 8, |
89
|
|
|
|
|
|
|
ENOTSOCK => $zmq_hausnumero + 9, |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
# "Native 0MQ error codes." as defined in zmq.h |
92
|
|
|
|
|
|
|
EFSM => $zmq_hausnumero + 51, |
93
|
|
|
|
|
|
|
ENOCOMPATPROTO => $zmq_hausnumero + 52, |
94
|
|
|
|
|
|
|
ETERM => $zmq_hausnumero + 53, |
95
|
|
|
|
|
|
|
EMTHREAD => $zmq_hausnumero + 54, |
96
|
|
|
|
|
|
|
); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
5
|
|
|
5
|
|
30
|
use constant \%constants; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
7928
|
|
100
|
|
|
|
|
|
|
our @EXPORT; |
101
|
|
|
|
|
|
|
our @EXPORT_OK = keys %constants; |
102
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
103
|
|
|
|
|
|
|
socket => [ qw( |
104
|
|
|
|
|
|
|
ZMQ_PAIR |
105
|
|
|
|
|
|
|
ZMQ_PUB |
106
|
|
|
|
|
|
|
ZMQ_SUB |
107
|
|
|
|
|
|
|
ZMQ_REQ |
108
|
|
|
|
|
|
|
ZMQ_REP |
109
|
|
|
|
|
|
|
ZMQ_DEALER |
110
|
|
|
|
|
|
|
ZMQ_ROUTER |
111
|
|
|
|
|
|
|
ZMQ_PULL |
112
|
|
|
|
|
|
|
ZMQ_PUSH |
113
|
|
|
|
|
|
|
ZMQ_XPUB |
114
|
|
|
|
|
|
|
ZMQ_XSUB |
115
|
|
|
|
|
|
|
ZMQ_AFFINITY |
116
|
|
|
|
|
|
|
ZMQ_IDENTITY |
117
|
|
|
|
|
|
|
ZMQ_SUBSCRIBE |
118
|
|
|
|
|
|
|
ZMQ_UNSUBSCRIBE |
119
|
|
|
|
|
|
|
ZMQ_RATE |
120
|
|
|
|
|
|
|
ZMQ_RECOVERY_IVL |
121
|
|
|
|
|
|
|
ZMQ_RECOVERY_IVL_MSEC |
122
|
|
|
|
|
|
|
ZMQ_SNDBUF |
123
|
|
|
|
|
|
|
ZMQ_RCVBUF |
124
|
|
|
|
|
|
|
ZMQ_RCVMORE |
125
|
|
|
|
|
|
|
ZMQ_FD |
126
|
|
|
|
|
|
|
ZMQ_EVENTS |
127
|
|
|
|
|
|
|
ZMQ_TYPE |
128
|
|
|
|
|
|
|
ZMQ_LINGER |
129
|
|
|
|
|
|
|
ZMQ_RECONNECT_IVL |
130
|
|
|
|
|
|
|
ZMQ_BACKLOG |
131
|
|
|
|
|
|
|
ZMQ_RECONNECT_IVL_MAX |
132
|
|
|
|
|
|
|
ZMQ_MAXMSGSIZE |
133
|
|
|
|
|
|
|
ZMQ_SNDHWM |
134
|
|
|
|
|
|
|
ZMQ_RCVHWM |
135
|
|
|
|
|
|
|
ZMQ_MULTICAST_HOPS |
136
|
|
|
|
|
|
|
ZMQ_RCVTIMEO |
137
|
|
|
|
|
|
|
ZMQ_SNDTIMEO |
138
|
|
|
|
|
|
|
ZMQ_IPV4ONLY |
139
|
|
|
|
|
|
|
ZMQ_LAST_ENDPOINT |
140
|
|
|
|
|
|
|
ZMQ_FAIL_UNROUTABLE |
141
|
|
|
|
|
|
|
ZMQ_DONTWAIT |
142
|
|
|
|
|
|
|
ZMQ_SNDMORE |
143
|
|
|
|
|
|
|
ZMQ_HWM |
144
|
|
|
|
|
|
|
ZMQ_SWAP |
145
|
|
|
|
|
|
|
ZMQ_NOBLOCK |
146
|
|
|
|
|
|
|
), |
147
|
|
|
|
|
|
|
# only in v2.x |
148
|
|
|
|
|
|
|
qw( |
149
|
|
|
|
|
|
|
ZMQ_XREQ |
150
|
|
|
|
|
|
|
ZMQ_XREP |
151
|
|
|
|
|
|
|
ZMQ_UPSTREAM |
152
|
|
|
|
|
|
|
ZMQ_DOWNSTREAM |
153
|
|
|
|
|
|
|
ZMQ_HWM |
154
|
|
|
|
|
|
|
ZMQ_SWAP |
155
|
|
|
|
|
|
|
) ], |
156
|
|
|
|
|
|
|
message => [ qw( |
157
|
|
|
|
|
|
|
ZMQ_MORE |
158
|
|
|
|
|
|
|
ZMQ_MSG_MORE |
159
|
|
|
|
|
|
|
ZMQ_MAX_VSM_SIZE |
160
|
|
|
|
|
|
|
ZMQ_DELIMITER |
161
|
|
|
|
|
|
|
ZMQ_VSM |
162
|
|
|
|
|
|
|
ZMQ_MSG_SHARED |
163
|
|
|
|
|
|
|
ZMQ_MSG_MASK |
164
|
|
|
|
|
|
|
), |
165
|
|
|
|
|
|
|
# only in v2.x |
166
|
|
|
|
|
|
|
qw( |
167
|
|
|
|
|
|
|
ZMQ_MSG_MORE |
168
|
|
|
|
|
|
|
ZMQ_MAX_VSM_SIZE |
169
|
|
|
|
|
|
|
ZMQ_DELIMITER |
170
|
|
|
|
|
|
|
ZMQ_VSM |
171
|
|
|
|
|
|
|
ZMQ_MSG_SHARED |
172
|
|
|
|
|
|
|
ZMQ_MSG_MASK |
173
|
|
|
|
|
|
|
) ], |
174
|
|
|
|
|
|
|
poller => [ qw( |
175
|
|
|
|
|
|
|
ZMQ_POLLIN |
176
|
|
|
|
|
|
|
ZMQ_POLLOUT |
177
|
|
|
|
|
|
|
ZMQ_POLLERR |
178
|
|
|
|
|
|
|
) ], |
179
|
|
|
|
|
|
|
device => [ qw( |
180
|
|
|
|
|
|
|
ZMQ_STREAMER |
181
|
|
|
|
|
|
|
ZMQ_FORWARDER |
182
|
|
|
|
|
|
|
ZMQ_QUEUE |
183
|
|
|
|
|
|
|
) ], |
184
|
|
|
|
|
|
|
errors => [ qw( |
185
|
|
|
|
|
|
|
ZMQ_HAUSNUMERO |
186
|
|
|
|
|
|
|
ENOTSUP |
187
|
|
|
|
|
|
|
EPROTONOSUPPORT |
188
|
|
|
|
|
|
|
ENOBUFS |
189
|
|
|
|
|
|
|
ENETDOWN |
190
|
|
|
|
|
|
|
EADDRINUSE |
191
|
|
|
|
|
|
|
EADDRNOTAVAIL |
192
|
|
|
|
|
|
|
ECONNREFUSED |
193
|
|
|
|
|
|
|
EINPROGRESS |
194
|
|
|
|
|
|
|
ENOTSOCK |
195
|
|
|
|
|
|
|
EFSM |
196
|
|
|
|
|
|
|
ENOCOMPATPROTO |
197
|
|
|
|
|
|
|
ETERM |
198
|
|
|
|
|
|
|
EMTHREAD |
199
|
|
|
|
|
|
|
) ] |
200
|
|
|
|
|
|
|
); |
201
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = [ @EXPORT_OK ]; |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
our $VERSION = '1.04'; |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
our %SOCKOPT_MAP; |
206
|
|
|
|
|
|
|
sub set_sockopt_type { |
207
|
20
|
|
|
20
|
1
|
37
|
my $type = shift; |
208
|
20
|
|
|
|
|
35
|
foreach my $opt ( @_ ) { |
209
|
135
|
|
|
|
|
646
|
$SOCKOPT_MAP{ $opt } = $type; |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
} |
212
|
1
|
|
|
1
|
1
|
1992
|
sub get_sockopt_type { $SOCKOPT_MAP{ $_[0] } } |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
set_sockopt_type( |
215
|
|
|
|
|
|
|
"int" => ( |
216
|
|
|
|
|
|
|
ZMQ_TYPE, |
217
|
|
|
|
|
|
|
ZMQ_RCVMORE, |
218
|
|
|
|
|
|
|
ZMQ_SNDHWM, |
219
|
|
|
|
|
|
|
ZMQ_RCVHWM, |
220
|
|
|
|
|
|
|
ZMQ_RATE, |
221
|
|
|
|
|
|
|
ZMQ_RECOVERY_IVL, |
222
|
|
|
|
|
|
|
ZMQ_SNDBUF, |
223
|
|
|
|
|
|
|
ZMQ_RCVBUF, |
224
|
|
|
|
|
|
|
ZMQ_LINGER, |
225
|
|
|
|
|
|
|
ZMQ_RECONNECT_IVL, |
226
|
|
|
|
|
|
|
ZMQ_RECONNECT_IVL_MAX, |
227
|
|
|
|
|
|
|
ZMQ_MULTICAST_HOPS, |
228
|
|
|
|
|
|
|
ZMQ_RCVTIMEO, |
229
|
|
|
|
|
|
|
ZMQ_SNDTIMEO, |
230
|
|
|
|
|
|
|
ZMQ_IPV4ONLY, |
231
|
|
|
|
|
|
|
ZMQ_FD, # SOCKET on Windows... yikes, how do we handle this? |
232
|
|
|
|
|
|
|
ZMQ_EVENTS, |
233
|
|
|
|
|
|
|
ZMQ_BACKLOG, |
234
|
|
|
|
|
|
|
) |
235
|
|
|
|
|
|
|
); |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
set_sockopt_type( |
238
|
|
|
|
|
|
|
"uint64" => ( |
239
|
|
|
|
|
|
|
ZMQ_AFFINITY, |
240
|
|
|
|
|
|
|
ZMQ_HWM, |
241
|
|
|
|
|
|
|
) |
242
|
|
|
|
|
|
|
); |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
set_sockopt_type( |
245
|
|
|
|
|
|
|
"int64" => ( |
246
|
|
|
|
|
|
|
ZMQ_MAXMSGSIZE, |
247
|
|
|
|
|
|
|
ZMQ_RECOVERY_IVL_MSEC, |
248
|
|
|
|
|
|
|
ZMQ_SWAP, |
249
|
|
|
|
|
|
|
) |
250
|
|
|
|
|
|
|
); |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
set_sockopt_type( |
253
|
|
|
|
|
|
|
"string" => ( |
254
|
|
|
|
|
|
|
ZMQ_SUBSCRIBE, |
255
|
|
|
|
|
|
|
ZMQ_UNSUBSCRIBE, |
256
|
|
|
|
|
|
|
ZMQ_LAST_ENDPOINT, |
257
|
|
|
|
|
|
|
ZMQ_IDENTITY, |
258
|
|
|
|
|
|
|
) |
259
|
|
|
|
|
|
|
); |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
our @CONSTANT_SETS; |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
sub register_set { |
264
|
4
|
|
|
4
|
1
|
16
|
my ($version, @args) = @_; |
265
|
4
|
50
|
|
8
|
|
34
|
my $cb = (ref $version eq 'CODE') ? $version : sub { $version eq $_[0] }; |
|
8
|
|
|
|
|
44
|
|
266
|
|
|
|
|
|
|
|
267
|
4
|
|
|
|
|
35
|
push @CONSTANT_SETS, ZMQ::Constant::Set->new( |
268
|
|
|
|
|
|
|
matcher => $cb, |
269
|
|
|
|
|
|
|
@args |
270
|
|
|
|
|
|
|
); |
271
|
|
|
|
|
|
|
} |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
sub import { |
274
|
5
|
|
|
5
|
|
48
|
my $class = shift; |
275
|
|
|
|
|
|
|
|
276
|
5
|
|
|
|
|
16
|
my ($version, @args); |
277
|
5
|
|
|
|
|
11
|
foreach my $arg ( @_ ) { |
278
|
9
|
100
|
|
|
|
53
|
if ( $arg =~ /^:v(\d+\.\d+\.\d+$)/ ) { |
279
|
4
|
|
|
|
|
13
|
$version = $1; |
280
|
|
|
|
|
|
|
} else { |
281
|
5
|
|
|
|
|
15
|
push @args, $arg; |
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
} |
284
|
5
|
100
|
|
|
|
22
|
if (! $version ) { |
285
|
1
|
|
|
|
|
536
|
$class->export_to_level( 1, $class, @args ); |
286
|
1
|
|
|
|
|
15
|
return; |
287
|
|
|
|
|
|
|
} |
288
|
|
|
|
|
|
|
|
289
|
4
|
|
|
|
|
8
|
my $klass = $version; |
290
|
4
|
|
|
|
|
15
|
$klass =~ s/\./_/g; |
291
|
4
|
|
|
|
|
10
|
$klass = "ZMQ::Constants::V$klass"; |
292
|
4
|
|
|
|
|
257
|
eval "require $klass"; |
293
|
4
|
50
|
|
|
|
32
|
if ($@) { |
294
|
0
|
|
|
|
|
0
|
Carp::croak($@); |
295
|
|
|
|
|
|
|
} |
296
|
|
|
|
|
|
|
|
297
|
4
|
|
|
|
|
12
|
foreach my $set ( @CONSTANT_SETS ) { |
298
|
4
|
50
|
|
|
|
17
|
next unless $set->match( $version ); |
299
|
4
|
|
|
|
|
13
|
local %EXPORT_TAGS = (); # $set->get_tags; |
300
|
4
|
|
|
|
|
19
|
local @EXPORT_OK = $set->get_export_oks; |
301
|
4
|
|
|
|
|
25
|
local @EXPORT = $set->get_exports; |
302
|
4
|
|
|
|
|
173
|
$EXPORT_TAGS{all} = [ sort @EXPORT_OK ]; |
303
|
4
|
|
|
|
|
1648
|
$class->export_to_level( 1, $class, @args ); |
304
|
4
|
|
|
|
|
87
|
last; |
305
|
|
|
|
|
|
|
} |
306
|
|
|
|
|
|
|
} |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
package |
309
|
|
|
|
|
|
|
ZMQ::Constant::Set; |
310
|
5
|
|
|
5
|
|
32
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
1513
|
|
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
sub new { |
313
|
4
|
|
|
4
|
|
16
|
my ($class, %args) = @_; |
314
|
4
|
|
|
|
|
37
|
bless { %args }, $class; |
315
|
|
|
|
|
|
|
} |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
sub match { |
318
|
8
|
|
|
8
|
|
64
|
my ($self, $key) = @_; |
319
|
8
|
|
|
|
|
78
|
$self->{matcher}->($key); |
320
|
|
|
|
|
|
|
} |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
sub get_tags { |
323
|
8
|
|
50
|
8
|
|
37
|
my $t = $_[0]->{tags} || {}; |
324
|
8
|
50
|
|
|
|
35
|
return wantarray ? %$t : $t; |
325
|
|
|
|
|
|
|
} |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
sub get_export_oks { |
328
|
8
|
|
|
8
|
|
48
|
my $t = $_[0]->get_tags; |
329
|
8
|
|
|
|
|
27
|
local $t->{all}; |
330
|
8
|
|
|
|
|
22
|
delete $t->{all}; |
331
|
8
|
|
|
|
|
43
|
my %u = map { ($_ => 1) } map { @$_ } values %$t; |
|
500
|
|
|
|
|
1241
|
|
|
38
|
|
|
|
|
256
|
|
332
|
8
|
|
|
|
|
255
|
my $l = [ keys %u ]; |
333
|
8
|
50
|
|
|
|
203
|
return wantarray ? @$l : $l; |
334
|
|
|
|
|
|
|
} |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
sub get_exports { |
337
|
4
|
|
50
|
4
|
|
36
|
my $l = $_[0]->{exports} || []; |
338
|
4
|
50
|
|
|
|
40
|
return wantarray ? @$l : $l; |
339
|
|
|
|
|
|
|
} |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
1; |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
__END__ |