line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
17
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
109
|
|
2
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
126
|
|
3
|
|
|
|
|
|
|
package Net::MQTT::Message::JustMessageId; |
4
|
|
|
|
|
|
|
$Net::MQTT::Message::JustMessageId::VERSION = '1.143250'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Perl module for an MQTT message w/message id only payload |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
11
|
use base 'Net::MQTT::Message'; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
300
|
|
9
|
3
|
|
|
3
|
|
17
|
use Net::MQTT::Constants qw/:all/; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
63
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
20
|
|
|
20
|
1
|
56
|
sub message_id { shift->{message_id} } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _remaining_string { |
15
|
10
|
|
|
10
|
|
13
|
my ($self, $prefix) = @_; |
16
|
10
|
|
|
|
|
26
|
$self->message_id.' '.$self->SUPER::_remaining_string($prefix) |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _parse_remaining { |
20
|
5
|
|
|
5
|
|
7
|
my $self = shift; |
21
|
5
|
|
|
|
|
6
|
my $offset = 0; |
22
|
5
|
|
|
|
|
32
|
$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
|
|
11
|
my $self = shift; |
28
|
10
|
|
|
|
|
78
|
encode_short($self->message_id) |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |