line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Net::OBEX::Packet::Request::Get; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
996
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
54
|
|
5
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
45
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
9
|
use Carp; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
100
|
|
8
|
2
|
|
|
2
|
|
9
|
use base 'Net::OBEX::Packet::Request::Base'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
637
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.001001'; # VERSION |
10
|
|
|
|
|
|
|
sub new { |
11
|
2
|
|
|
2
|
1
|
49
|
my $class = shift; |
12
|
2
|
50
|
|
|
|
7
|
croak "Must have even number of arguments to new()" |
13
|
|
|
|
|
|
|
if @_ & 1; |
14
|
2
|
|
|
|
|
4
|
my %args = @_; |
15
|
2
|
|
|
|
|
6
|
$args{ +lc } = delete $args{ $_ } for keys %args; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
8
|
%args = ( |
18
|
|
|
|
|
|
|
is_final => 0, |
19
|
|
|
|
|
|
|
headers => [], |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
%args, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
|
|
11
|
return bless \%args, $class; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub make { |
28
|
2
|
|
|
2
|
1
|
1778
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
2
|
50
|
|
|
|
9
|
my $packet = $self->is_final() ? "\x83" : "\x03"; |
31
|
2
|
|
|
|
|
4
|
my $headers = join '', @{$self->headers}; |
|
2
|
|
|
|
|
12
|
|
32
|
2
|
|
|
|
|
10
|
$packet .= pack 'n', 3+length $headers; |
33
|
2
|
|
|
|
|
3
|
$packet .= $headers; |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
12
|
return $self->raw($packet); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub is_final { |
39
|
2
|
|
|
2
|
1
|
4
|
my $self = shift; |
40
|
2
|
50
|
|
|
|
10
|
if ( @_ ) { |
41
|
0
|
|
|
|
|
0
|
$self->{ is_final } = shift; |
42
|
|
|
|
|
|
|
} |
43
|
2
|
|
|
|
|
18
|
return $self->{ is_final }; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# "\x03" "\x83" opcodes |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |