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