| 1 | package Net::GPSD3::Cache; | ||||||||||||||||||||||||||||
| 2 | 12 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 12 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 12 | ▶ | use base qw{Net::GPSD3::Base}; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 12 | 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 | 0 | ▶ | sub add { | ||||||||||||||||||||||||||
|
Subroutine
add: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 29 | 0 | my $self=shift; | |||||||||||||||||||||||||||
| 30 | 0 | my $obj=shift; | |||||||||||||||||||||||||||
| 31 | 0 | ▶ | if ($obj->can("class") and $self->can($obj->class)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$obj->can("class") and $self->can($obj->class)
MC/DC0%0/2
$obj->can("class") and $self->can($obj->class)
$obj->can("class")
$self->can($obj->class)
Truth table0%0/3
A and B
A= $obj->can("class")B= $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<Net::GPSD3::Return::TPV> object reported by gpsd. | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | =cut | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 0 | ▶ | sub TPV {shift->{"TPV"}}; | ||||||||||||||||||||||||||
|
Subroutine
TPV: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | =head2 SKY | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | Returns the last L<Net::GPSD3::Return::SKY> object reported by gpsd. | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | =cut | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | 0 | ▶ | sub SKY {shift->{"SKY"}}; | ||||||||||||||||||||||||||
|
Subroutine
SKY: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | =head2 DEVICES | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | Returns the last L<Net::GPSD3::Return::DEVICES> object reported by gpsd. | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | =cut | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | 0 | ▶ | sub DEVICES {shift->{"DEVICES"}}; | ||||||||||||||||||||||||||
|
Subroutine
DEVICES: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | =head2 VERSION | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | Returns the last L<Net::GPSD3::Return::VERSION> object reported by gpsd. | ||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | =cut | ||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | 0 | ▶ | sub VERSION {shift->{"VERSION"}}; | ||||||||||||||||||||||||||
|
Subroutine
VERSION: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | =head2 ERROR | ||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | Returns the last L<Net::GPSD3::Return::ERROR> object reported by gpsd. | ||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||
| 73 | =cut | ||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | 0 | ▶ | sub ERROR {shift->{"ERROR"}}; | ||||||||||||||||||||||||||
|
Subroutine
ERROR: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | =head2 WATCH | ||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | Returns the last L<Net::GPSD3::Return::WATCH> object reported by gpsd. | ||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | =cut | ||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||
| 83 | 0 | ▶ | sub WATCH {shift->{"WATCH"}}; | ||||||||||||||||||||||||||
|
Subroutine
WATCH: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||
| 85 | =head2 SUBFRAME | ||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | Returns the last L<Net::GPSD3::Return::SUBFRAME> object reported by gpsd. | ||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||
| 89 | =cut | ||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | 0 | ▶ | sub SUBFRAME {shift->{"SUBFRAME"}}; | ||||||||||||||||||||||||||
|
Subroutine
SUBFRAME: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 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<Net::GPSD3> | ||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||
| 123 | =cut | ||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | 12 | 1; | |||||||||||||||||||||||||||