line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
88
|
|
2
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
34
|
|
|
3
|
|
|
|
|
136
|
|
3
|
|
|
|
|
|
|
package Net::MQTT::Message::JustMessageId; |
4
|
|
|
|
|
|
|
$Net::MQTT::Message::JustMessageId::VERSION = '1.143260'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Perl module for an MQTT message w/message id only payload |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
15
|
use base 'Net::MQTT::Message'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
241
|
|
9
|
3
|
|
|
3
|
|
14
|
use Net::MQTT::Constants qw/:all/; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
74
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
20
|
|
|
20
|
1
|
64
|
sub message_id { shift->{message_id} } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _remaining_string { |
15
|
10
|
|
|
10
|
|
12
|
my ($self, $prefix) = @_; |
16
|
10
|
|
|
|
|
25
|
$self->message_id.' '.$self->SUPER::_remaining_string($prefix) |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _parse_remaining { |
20
|
5
|
|
|
5
|
|
6
|
my $self = shift; |
21
|
5
|
|
|
|
|
6
|
my $offset = 0; |
22
|
5
|
|
|
|
|
34
|
$self->{message_id} = decode_short($self->{remaining}, \$offset); |
23
|
5
|
|
|
|
|
11
|
substr $self->{remaining}, 0, $offset, ''; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _remaining_bytes { |
27
|
10
|
|
|
10
|
|
12
|
my $self = shift; |
28
|
10
|
|
|
|
|
93
|
encode_short($self->message_id) |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |