line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::GPSD3::Cache; |
2
|
12
|
|
|
12
|
|
58
|
use strict; |
|
12
|
|
|
|
|
22
|
|
|
12
|
|
|
|
|
325
|
|
3
|
12
|
|
|
12
|
|
54
|
use warnings; |
|
12
|
|
|
|
|
1330
|
|
|
12
|
|
|
|
|
288
|
|
4
|
12
|
|
|
12
|
|
53
|
use base qw{Net::GPSD3::Base}; |
|
12
|
|
|
|
|
19
|
|
|
12
|
|
|
|
|
3194
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION='0.12'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::GPSD3::Cache - Net::GPSD3 caching object |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use Net::GPSD3; |
15
|
|
|
|
|
|
|
my $cache=Net::GPSD3->cache; #isa Net::GPSD3::Cache |
16
|
|
|
|
|
|
|
$cache->add($obj); #obj isa Net::GPSD3::Return::XXX |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 METHODS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 add |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Adds an object to the cache. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub add { |
29
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
30
|
0
|
|
|
|
|
|
my $obj=shift; |
31
|
0
|
0
|
0
|
|
|
|
if ($obj->can("class") and $self->can($obj->class)) { |
32
|
0
|
|
|
|
|
|
$self->{$obj->class}=$obj; |
33
|
|
|
|
|
|
|
} |
34
|
0
|
|
|
|
|
|
return $self; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 TPV |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Returns the last L object reported by gpsd. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
1
|
|
sub TPV {shift->{"TPV"}}; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 SKY |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Returns the last L object reported by gpsd. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
1
|
|
sub SKY {shift->{"SKY"}}; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 DEVICES |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Returns the last L object reported by gpsd. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
0
|
1
|
|
sub DEVICES {shift->{"DEVICES"}}; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 VERSION |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Returns the last L object reported by gpsd. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
0
|
1
|
|
sub VERSION {shift->{"VERSION"}}; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 ERROR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Returns the last L object reported by gpsd. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
0
|
1
|
|
sub ERROR {shift->{"ERROR"}}; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 WATCH |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Returns the last L object reported by gpsd. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
0
|
1
|
|
sub WATCH {shift->{"WATCH"}}; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 SUBFRAME |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Returns the last L object reported by gpsd. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
90
|
|
|
|
|
|
|
|
91
|
0
|
|
|
0
|
1
|
|
sub SUBFRAME {shift->{"SUBFRAME"}}; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 BUGS |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Log on RT and Send to gpsd-dev email list |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 SUPPORT |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
DavisNetworks.com supports all Perl applications including this package. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Try gpsd-dev email list |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 AUTHOR |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Michael R. Davis |
106
|
|
|
|
|
|
|
CPAN ID: MRDVT |
107
|
|
|
|
|
|
|
STOP, LLC |
108
|
|
|
|
|
|
|
domain=>michaelrdavis,tld=>com,account=>perl |
109
|
|
|
|
|
|
|
http://www.stopllc.com/ |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 COPYRIGHT |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This program is free software licensed under the... |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
The BSD License |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 SEE ALSO |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
L |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=cut |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
1; |