line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Net::OBEX::Packet::Headers::Base; |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
18
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
109
|
|
5
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
69
|
|
6
|
3
|
|
|
3
|
|
16
|
use Carp; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
1023
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.001001'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
0
|
|
|
0
|
0
|
0
|
my ( $class, $hi, $value ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
0
|
|
|
|
0
|
croak "Missing header name or HI identifier" |
14
|
|
|
|
|
|
|
unless defined $hi; |
15
|
|
|
|
|
|
|
|
16
|
0
|
0
|
|
|
|
0
|
$value = '' |
17
|
|
|
|
|
|
|
unless defined $value; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
0
|
return bless { |
20
|
|
|
|
|
|
|
value => $value, |
21
|
|
|
|
|
|
|
hi => $hi, |
22
|
|
|
|
|
|
|
}, $class; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub make { |
26
|
4
|
|
|
4
|
0
|
6
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
4
|
|
|
|
|
65
|
my $value = $self->value; |
29
|
4
|
50
|
|
|
|
11
|
unless ( length $value ) { |
30
|
0
|
|
|
|
|
0
|
return $self->hi; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
4
|
|
|
|
|
11
|
my $header = $self->hi . $value; |
34
|
4
|
|
|
|
|
11
|
return $self->header($header); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub header { |
38
|
17
|
|
|
17
|
0
|
20
|
my $self = shift; |
39
|
17
|
50
|
|
|
|
29
|
if ( @_ ) { |
40
|
17
|
|
|
|
|
30
|
$self->{ header } = shift; |
41
|
|
|
|
|
|
|
} |
42
|
17
|
|
|
|
|
80
|
return $self->{ header }; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub value { |
46
|
17
|
|
|
17
|
0
|
18
|
my $self = shift; |
47
|
17
|
50
|
|
|
|
29
|
if ( @_ ) { |
48
|
0
|
|
|
|
|
0
|
$self->{ value } = shift; |
49
|
|
|
|
|
|
|
} |
50
|
17
|
|
|
|
|
54
|
return $self->{ value }; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub hi { |
54
|
17
|
|
|
17
|
0
|
20
|
my $self = shift; |
55
|
17
|
50
|
|
|
|
31
|
if ( @_ ) { |
56
|
0
|
|
|
|
|
0
|
$self->{ hi } = shift; |
57
|
|
|
|
|
|
|
} |
58
|
17
|
|
|
|
|
42
|
return $self->{ hi }; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |