File Coverage

blib/lib/Geo/GoogleEarth/Pluggable/Plugin/Default.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             package Geo::GoogleEarth::Pluggable::Plugin::Default;
2 1     1   2267 use strict;
  1         2  
  1         36  
3 1     1   6 use warnings;
  1         2  
  1         27  
4 1     1   41 use Geo::GoogleEarth::Pluggable::Contrib::Point;
  0            
  0            
5             use Geo::GoogleEarth::Pluggable::Contrib::LineString;
6             use Geo::GoogleEarth::Pluggable::Contrib::LinearRing;
7              
8             our $VERSION='0.13';
9              
10             =head1 NAME
11              
12             Geo::GoogleEarth::Pluggable::Plugin::Default - Geo::GoogleEarth::Pluggable Default Plugin Methods
13              
14             =head1 METHODS
15              
16             Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime.
17              
18             =head1 CONVENTIONS
19              
20             Plugin Naming Convention: Geo::GoogleEarth::Pluggable::Plugin::CPANID (e.g. "MRDVT")
21             Object Naming Convention: Geo::GoogleEarth::Pluggable::Contrib::"$method" (e.g. Point, CircleByCenterPoint)
22              
23             You only need to have one plugin pointing to all of your contributed objects.
24              
25             The package should be named after the plugin not the objects since there is a many to one relationship. (e.g. Geo-GoogleEarth-Pluggable-Plugin-MRDVT)
26              
27             =head2 Point
28              
29             Constructs a new Placemark Point object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction.
30              
31             my $point=$folder->Point(name=>"My Placemark",
32             lat=>38.897607,
33             lon=>-77.036554,
34             alt=>0);
35              
36             =cut
37              
38             sub Point {
39             my $self=shift; #This will be a Geo::GoogleEarth::Pluggable::Folder object
40             my $obj=Geo::GoogleEarth::Pluggable::Contrib::Point->new(document=>$self->document, @_);
41             $self->data($obj);
42             return $obj;
43             }
44              
45             =head2 LineString
46              
47             $folder->LineString(name=>"My Placemark",
48             coordinates=>[
49             [lat,lon,alt],
50             {lat=>$lat,lon=>$lon,alt=>$alt},
51             ]);
52              
53             =cut
54              
55             sub LineString {
56             my $self=shift;
57             my $obj=Geo::GoogleEarth::Pluggable::Contrib::LineString->new(document=>$self->document, @_);
58             $self->data($obj);
59             return $obj;
60             }
61              
62             =head2 LinearRing
63              
64             $folder->LinearRing(name=>"My Placemark",
65             coordinates=>[
66             [lat,lon,alt],
67             {lat=>$lat,lon=>$lon,alt=>$alt},
68             ]);
69              
70             =cut
71              
72             sub LinearRing {
73             my $self=shift;
74             my $obj=Geo::GoogleEarth::Pluggable::Contrib::LinearRing->new(document=>$self->document, @_);
75             $self->data($obj);
76             return $obj;
77             }
78              
79             =head1 TODO
80              
81             Need to determine what methods should be in the Folder package and what should be on the Plugin/Default package and why.
82              
83             =head1 BUGS
84              
85             Please log on RT and send to the geo-perl email list.
86              
87             =head1 SUPPORT
88              
89             DavisNetworks.com supports all Perl applications including this package.
90              
91             =head1 AUTHOR
92              
93             Michael R. Davis (mrdvt92)
94             CPAN ID: MRDVT
95              
96             =head1 COPYRIGHT
97              
98             This program is free software licensed under the...
99              
100             The BSD License
101              
102             The full text of the license can be found in the LICENSE file included with this module.
103              
104             =head1 SEE ALSO
105              
106             L, L, L
107              
108             =cut
109              
110             1;