| 1 | package Geo::Google::StaticMaps::V2; | ||||||||||||||||||||||||||||
| 2 | 10 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 10 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 10 | ▶ | use base qw{Package::New}; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 10 | ▶ | use File::Basename qw{}; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 10 | ▶ | use Path::Class qw{file}; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 10 | ▶ | use URI qw{}; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 10 | ▶ | use LWP::UserAgent qw{}; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 10 | ▶ | use Geo::Google::StaticMaps::V2::Markers; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 10 | ▶ | use Geo::Google::StaticMaps::V2::Path; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 10 | our $VERSION = '0.12'; | |||||||||||||||||||||||||||
| 13 | 10 | our $PACKAGE = __PACKAGE__; | |||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | =head1 NAME | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | Geo::Google::StaticMaps::V2 - Generate Images from Google Static Maps V2 API | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | use Geo::Google::StaticMaps::V2; | ||||||||||||||||||||||||||||
| 22 | my $map=Geo::Google::StaticMaps::V2->new; | ||||||||||||||||||||||||||||
| 23 | print $map->url; | ||||||||||||||||||||||||||||
| 24 | print $map->image; | ||||||||||||||||||||||||||||
| 25 | $map->save("filename.png"); | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | The packages generates images from the Google Static Maps V2 API which can be saved locally for use in accordance with your license with Google. | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | =head1 USAGE | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | =head1 CONSTRUCTORS | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | =head2 new | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | use Geo::Google::StaticMaps::V2; | ||||||||||||||||||||||||||||
| 38 | my $map=Geo::Google::StaticMaps::V2->new( | ||||||||||||||||||||||||||||
| 39 | width => 600, | ||||||||||||||||||||||||||||
| 40 | height => 480, | ||||||||||||||||||||||||||||
| 41 | sensor => 0, | ||||||||||||||||||||||||||||
| 42 | scale => 1, | ||||||||||||||||||||||||||||
| 43 | format => "png8", | ||||||||||||||||||||||||||||
| 44 | type => "roadmap", | ||||||||||||||||||||||||||||
| 45 | protocol => "http", | ||||||||||||||||||||||||||||
| 46 | server => "maps.googleapis.com", | ||||||||||||||||||||||||||||
| 47 | script => "/maps/api/staticmap", | ||||||||||||||||||||||||||||
| 48 | ); | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | Any property can be specified on construction but all have sane defaults and are not required to be set. | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | =head2 marker | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | Creates a L<Geo::Google::StaticMaps::V2::Markers> object and adds the object to the internal Markers array. | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | $map->marker(location=>"7140 Main Street, Clifton, Virginia 20124"); | ||||||||||||||||||||||||||||
| 57 | $map->marker(location=>{lat=>38.780676,lon=>-77.387105}); | ||||||||||||||||||||||||||||
| 58 | $map->marker(location=>[38.780676,-77.387105]); | ||||||||||||||||||||||||||||
| 59 | $map->marker(location=>"38.780676,-77.387105"); | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | markers (optional) define one or more markers to attach to the image at specified locations. Multiple markers may be placed within the same markers parameter as long as they exhibit the same style; you may add additional markers of differing styles by adding additional markers parameters. Note that if you supply markers for a map, you do not need to specify the (normally required) center and zoom parameters. | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | Examples | ||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | my $marker1=$map->marker(location=>{lat=>38.780676,lon=>-77.387105}); #isa L<Geo::Google::StaticMaps::V2::Markers> | ||||||||||||||||||||||||||||
| 66 | $marker1->addLocation([38.780513,-77.387128]); #second point shares style with first point | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | my $marker2=$map->marker(locations=>[ | ||||||||||||||||||||||||||||
| 69 | {lat=>38.780596,lon=>-77.386837}, | ||||||||||||||||||||||||||||
| 70 | [38.780346,-77.386923] | ||||||||||||||||||||||||||||
| 71 | ]); #third and forth points with different style | ||||||||||||||||||||||||||||
| 72 | $marker2->size("tiny"); #third and forth points are now tiny | ||||||||||||||||||||||||||||
| 73 | $marker1->color("blue"); #first and second point are now blue | ||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | =cut | ||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | 3 | ▶ | sub marker { | ||||||||||||||||||||||||||
|
Subroutine
marker: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 78 | 3 | my $self=shift; | |||||||||||||||||||||||||||
| 79 | 3 | my $obj=Geo::Google::StaticMaps::V2::Markers->new(@_); | |||||||||||||||||||||||||||
| 80 | 3 | push @{$self->_markers}, $obj; | |||||||||||||||||||||||||||
| 81 | 3 | return $obj; | |||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | #head2 _markers | ||||||||||||||||||||||||||||
| 85 | # | ||||||||||||||||||||||||||||
| 86 | #Returns an array reference with the current list of marker objects. | ||||||||||||||||||||||||||||
| 87 | # | ||||||||||||||||||||||||||||
| 88 | #cut | ||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | 51 | ▶ | sub _markers { | ||||||||||||||||||||||||||
|
Subroutine
_markers: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 91 | 51 | my $self=shift; | |||||||||||||||||||||||||||
| 92 | 51 | ▶ | $self->{"_markers"}=[] unless ref($self->{"_markers"}) eq "ARRAY"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 93 | 51 | return $self->{"_markers"}; | |||||||||||||||||||||||||||
| 94 | } | ||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||
| 96 | =head2 path | ||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||
| 98 | Creates a L<Geo::Google::StaticMaps::V2::Path> object and adds the object to the internal Paths array. | ||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||
| 100 | path (optional) defines a single path of two or more connected points to overlay on the image at specified locations. Note that if you supply a path for a map, you do not need to specify the (normally required) center and zoom parameters. | ||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | =cut | ||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||
| 104 | 5 | ▶ | sub path { | ||||||||||||||||||||||||||
|
Subroutine
path: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 105 | 5 | my $self=shift; | |||||||||||||||||||||||||||
| 106 | 5 | my $obj=Geo::Google::StaticMaps::V2::Path->new(@_); | |||||||||||||||||||||||||||
| 107 | 5 | push @{$self->_paths}, $obj; | |||||||||||||||||||||||||||
| 108 | 5 | return $obj; | |||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | #head2 _paths | ||||||||||||||||||||||||||||
| 112 | # | ||||||||||||||||||||||||||||
| 113 | #Returns an array reference with the current list of path objects. | ||||||||||||||||||||||||||||
| 114 | # | ||||||||||||||||||||||||||||
| 115 | #cut | ||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||
| 117 | 53 | ▶ | sub _paths { | ||||||||||||||||||||||||||
|
Subroutine
_paths: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 118 | 53 | my $self=shift; | |||||||||||||||||||||||||||
| 119 | 53 | ▶ | $self->{"_paths"}=[] unless ref($self->{"_paths"}) eq "ARRAY"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 120 | 53 | return $self->{"_paths"}; | |||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||
| 123 | =head2 visible | ||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | Creates a L<Geo::Google::StaticMaps::V2::Visible> object and adds the object to the internal Visibles array. | ||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||
| 127 | visible (optional) specifies one or more locations that should remain visible on the map, though no markers or other indicators will be displayed. Use this parameter to ensure that certain features or map locations are shown on the static map. | ||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||
| 129 | =cut | ||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||
| 131 | 1 | ▶ | sub visible { | ||||||||||||||||||||||||||
|
Subroutine
visible: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 132 | 1 | my $self=shift; | |||||||||||||||||||||||||||
| 133 | 1 | my $obj=Geo::Google::StaticMaps::V2::Visible->new(@_); | |||||||||||||||||||||||||||
| 134 | 1 | push @{$self->_visibles}, $obj; | |||||||||||||||||||||||||||
| 135 | 1 | return $obj; | |||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||
| 138 | #head2 _visibles | ||||||||||||||||||||||||||||
| 139 | # | ||||||||||||||||||||||||||||
| 140 | #Returns an array reference with the current list of visible objects. | ||||||||||||||||||||||||||||
| 141 | # | ||||||||||||||||||||||||||||
| 142 | ##cut | ||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||
| 144 | 49 | ▶ | sub _visibles { | ||||||||||||||||||||||||||
|
Subroutine
_visibles: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 145 | 49 | my $self=shift; | |||||||||||||||||||||||||||
| 146 | 49 | ▶ | $self->{"_visibles"}=[] unless ref($self->{"_visibles"}) eq "ARRAY"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 147 | 49 | return $self->{"_visibles"}; | |||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||
| 150 | =head1 PROPERTIES | ||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||
| 152 | =head2 center | ||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||
| 154 | center (required if markers not present) defines the center of the map, equidistant from all edges of the map. This parameter takes a location as either a comma-separated {latitude,longitude} pair (e.g. "40.714728,-73.998672") or a string address (e.g. "City Hall, New York, NY") identifying a unique location on the face of the earth. | ||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||
| 156 | =cut | ||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||
| 158 | 48 | ▶ | sub center { | ||||||||||||||||||||||||||
|
Subroutine
center: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 159 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 160 | 48 | ▶ | $self->{"center"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 161 | 48 | return $self->{"center"}; | |||||||||||||||||||||||||||
| 162 | } | ||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||
| 164 | =head2 zoom | ||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||
| 166 | zoom (required if markers not present) defines the zoom level of the map, which determines the magnification level of the map. This parameter takes a numerical value corresponding to the zoom level of the region desired. | ||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||
| 168 | =cut | ||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||
| 170 | 48 | ▶ | sub zoom { | ||||||||||||||||||||||||||
|
Subroutine
zoom: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 171 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 172 | 48 | ▶ | $self->{"zoom"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 173 | 48 | return $self->{"zoom"}; | |||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||
| 176 | =head2 width | ||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||
| 178 | Width part of size parameter. | ||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||
| 180 | UOM: pixels | ||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||
| 182 | Note: width of image is actually width times scale | ||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||
| 184 | =cut | ||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||
| 186 | 50 | ▶ | sub width { | ||||||||||||||||||||||||||
|
Subroutine
width: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 187 | 50 | my $self=shift; | |||||||||||||||||||||||||||
| 188 | 50 | ▶ | $self->{"width"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 189 | 50 | ▶ | $self->{"width"}||=600; | ||||||||||||||||||||||||||
|
Condition100%2/2
$self->{"width"} ||= 600
MC/DC100%1/1
$self->{"width"} ||= 600
$self->{"width"}
Truth table100%2/2
A
A= $self->{"width"}
| |||||||||||||||||||||||||||||
| 190 | 50 | return $self->{"width"}; | |||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||
| 193 | =head2 height | ||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||
| 195 | Height part of size parameter | ||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||
| 197 | UOM: pixels | ||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||
| 199 | Note: height of image is actually height times scale | ||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||
| 201 | =cut | ||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||
| 203 | 50 | ▶ | sub height { | ||||||||||||||||||||||||||
|
Subroutine
height: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 204 | 50 | my $self=shift; | |||||||||||||||||||||||||||
| 205 | 50 | ▶ | $self->{"height"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 206 | 50 | ▶ | $self->{"height"}||=400; | ||||||||||||||||||||||||||
|
Condition100%2/2
$self->{"height"} ||= 400
MC/DC100%1/1
$self->{"height"} ||= 400
$self->{"height"}
Truth table100%2/2
A
A= $self->{"height"}
| |||||||||||||||||||||||||||||
| 207 | 50 | return $self->{"height"}; | |||||||||||||||||||||||||||
| 208 | } | ||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||
| 210 | =head2 sensor | ||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||
| 212 | Sets or returns the sensor value true or false setting is Perlish. | ||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||
| 214 | $map->sensor(0); #default | ||||||||||||||||||||||||||||
| 215 | $map->sensor("false"); #Do not do this as "false" is true to Perl | ||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||
| 217 | sensor (required) specifies whether the application requesting the static map is using a sensor to determine the user's location. This parameter is required for all static map requests. | ||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||
| 219 | =cut | ||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||
| 221 | 48 | ▶ | sub sensor { | ||||||||||||||||||||||||||
|
Subroutine
sensor: called CC=3 SCAR=11.4
Pod
documented
| |||||||||||||||||||||||||||||
| 222 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 223 | 48 | ▶ | $self->{"sensor"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 224 | 48 | ▶ | $self->{"sensor"}||=0; | ||||||||||||||||||||||||||
|
Condition50%1/2
$self->{"sensor"} ||= 0
MC/DC0%0/1
$self->{"sensor"} ||= 0
$self->{"sensor"}
Truth table50%1/2
A
A= $self->{"sensor"}
| |||||||||||||||||||||||||||||
| 225 | 48 | return $self->{"sensor"}; | |||||||||||||||||||||||||||
| 226 | } | ||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||
| 228 | =head2 scale | ||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||
| 230 | scale (optional) affects the number of pixels that are returned. scale=2 returns twice as many pixels as scale=1 while retaining the same coverage area and level of detail (i.e. the contents of the map don't change). This is useful when developing for high-resolution displays, or when generating a map for printing. The default value is 1. Accepted values are 2 and 4 (4 is only available to Maps API for Business customers.) See Scale Values for more information. | ||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||
| 232 | $map->scale; #undef (default is 1; not passed on URL), 1, 2, 4 | ||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||
| 234 | =cut | ||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||
| 236 | 48 | ▶ | sub scale { | ||||||||||||||||||||||||||
|
Subroutine
scale: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 237 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 238 | 48 | ▶ | $self->{"scale"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 239 | 48 | return $self->{"scale"}; | |||||||||||||||||||||||||||
| 240 | } | ||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||
| 242 | =head2 format | ||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||
| 244 | format (optional) defines the format of the resulting image. By default, the Static Maps API creates PNG images. There are several possible formats including GIF, JPEG and PNG types. Which format you use depends on how you intend to present the image. JPEG typically provides greater compression, while GIF and PNG provide greater detail. For more information, see Image Formats. | ||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||
| 246 | $map->format; #undef (default is png8; not passed on URL), png8, png32, gif, jpg, jpg-baseline | ||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||
| 248 | =cut | ||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||
| 250 | 50 | ▶ | sub format { | ||||||||||||||||||||||||||
|
Subroutine
format: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 251 | 50 | my $self=shift; | |||||||||||||||||||||||||||
| 252 | 50 | ▶ | $self->{"format"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 253 | 50 | return $self->{"format"}; | |||||||||||||||||||||||||||
| 254 | } | ||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||
| 256 | =head2 type | ||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||
| 258 | maptype (optional) defines the type of map to construct. There are several possible maptype values, including roadmap, satellite, hybrid, and terrain. | ||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||
| 260 | $map->type; #undef (default is roadmap; not passed on URL), roadmap, satellite, terrain, hybrid | ||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | =cut | ||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||
| 264 | 48 | ▶ | sub type { | ||||||||||||||||||||||||||
|
Subroutine
type: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 265 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 266 | 48 | ▶ | $self->{"type"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 267 | 48 | return $self->{"type"}; | |||||||||||||||||||||||||||
| 268 | } | ||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||
| 270 | =head2 server | ||||||||||||||||||||||||||||
| 271 | |||||||||||||||||||||||||||||
| 272 | Sets or returns the Google Maps API server | ||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||
| 274 | $map->server("maps.googleapis.com"); #default | ||||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||||
| 276 | =cut | ||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||
| 278 | 48 | ▶ | sub server { | ||||||||||||||||||||||||||
|
Subroutine
server: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 279 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 280 | 48 | ▶ | $self->{"server"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 281 | 48 | ▶ | $self->{"server"}="maps.googleapis.com" unless defined($self->{"server"}); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 282 | 48 | return $self->{"server"}; | |||||||||||||||||||||||||||
| 283 | } | ||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||
| 285 | =head2 script | ||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||
| 287 | Sets or returns the script for the Google Maps API Static Map | ||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||
| 289 | $map->script("/maps/api/staticmap"); #default | ||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||
| 291 | =cut | ||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||
| 293 | 48 | ▶ | sub script { | ||||||||||||||||||||||||||
|
Subroutine
script: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 294 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 295 | 48 | ▶ | $self->{"script"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 296 | 48 | ▶ | $self->{"script"}="/maps/api/staticmap" unless defined($self->{"script"}); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 297 | 48 | return $self->{"script"}; | |||||||||||||||||||||||||||
| 298 | } | ||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||
| 300 | =head2 protocol | ||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||
| 302 | Sets or returns the protocol | ||||||||||||||||||||||||||||
| 303 | |||||||||||||||||||||||||||||
| 304 | $map->protocol("http"); #default | ||||||||||||||||||||||||||||
| 305 | $map->protocol("https"); #https to avoid cross security domain issues in browsers but uses more resources | ||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||
| 307 | =cut | ||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||
| 309 | 48 | ▶ | sub protocol { | ||||||||||||||||||||||||||
|
Subroutine
protocol: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 310 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 311 | 48 | ▶ | $self->{"protocol"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 312 | 48 | ▶ | $self->{"protocol"}="http" unless defined($self->{"protocol"}); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 313 | 48 | return $self->{"protocol"}; | |||||||||||||||||||||||||||
| 314 | } | ||||||||||||||||||||||||||||
| 315 | |||||||||||||||||||||||||||||
| 316 | #head2 _service | ||||||||||||||||||||||||||||
| 317 | # | ||||||||||||||||||||||||||||
| 318 | #Returns a cached URL with only "$protocol://$server" | ||||||||||||||||||||||||||||
| 319 | # | ||||||||||||||||||||||||||||
| 320 | #cut | ||||||||||||||||||||||||||||
| 321 | |||||||||||||||||||||||||||||
| 322 | 0 | ▶ | sub _service { | ||||||||||||||||||||||||||
|
Subroutine
_service: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||
| 323 | 0 | my $self=shift; | |||||||||||||||||||||||||||
| 324 | 0 | ▶ | $self->{"_service"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 325 | 0 | ▶ | unless (defined $self->{"_service"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 326 | 0 | $self->{"_service"}=URI->new; | |||||||||||||||||||||||||||
| 327 | 0 | $self->{"_service"}->scheme($self->protocol); | |||||||||||||||||||||||||||
| 328 | 0 | $self->{"_service"}->host($self->server); | |||||||||||||||||||||||||||
| 329 | } | ||||||||||||||||||||||||||||
| 330 | 0 | return $self->{"_service"}; | |||||||||||||||||||||||||||
| 331 | } | ||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||
| 333 | =head1 METHODS | ||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||
| 335 | =head2 image | ||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||
| 337 | Returns the image as a binary scalar. | ||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||
| 339 | my $blob=$map->image; | ||||||||||||||||||||||||||||
| 340 | |||||||||||||||||||||||||||||
| 341 | See: L<LWP::UserAgent> | ||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||
| 343 | =cut | ||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||
| 345 | 1 | ▶ | sub image { | ||||||||||||||||||||||||||
|
Subroutine
image: called CC=2 SCAR=7.4
Pod
documented
| |||||||||||||||||||||||||||||
| 346 | 1 | my $self=shift; | |||||||||||||||||||||||||||
| 347 | 1 | my $response=$self->_ua->get($self->url); | |||||||||||||||||||||||||||
| 348 | 1 | ▶ | if ($response->is_success) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 349 | 0 | return $response->decoded_content; | |||||||||||||||||||||||||||
| 350 | } else { | ||||||||||||||||||||||||||||
| 351 | 1 | die $response->status_line; | |||||||||||||||||||||||||||
| 352 | } | ||||||||||||||||||||||||||||
| 353 | } | ||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||
| 355 | #head2 _ua | ||||||||||||||||||||||||||||
| 356 | # | ||||||||||||||||||||||||||||
| 357 | #Returns a cached LWP::UserAgent object | ||||||||||||||||||||||||||||
| 358 | # | ||||||||||||||||||||||||||||
| 359 | #cut | ||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||
| 361 | 1 | ▶ | sub _ua { | ||||||||||||||||||||||||||
|
Subroutine
_ua: called CC=2 SCAR=7.0
| |||||||||||||||||||||||||||||
| 362 | 1 | my $self=shift; | |||||||||||||||||||||||||||
| 363 | 1 | ▶ | unless (defined $self->{"_ua"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 364 | 1 | $self->{"_ua"}=LWP::UserAgent->new; | |||||||||||||||||||||||||||
| 365 | 1 | $self->{"_ua"}->timeout(10); | |||||||||||||||||||||||||||
| 366 | 1 | $self->{"_ua"}->env_proxy; | |||||||||||||||||||||||||||
| 367 | } | ||||||||||||||||||||||||||||
| 368 | 1 | return $self->{"_ua"}; | |||||||||||||||||||||||||||
| 369 | } | ||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||
| 371 | =head2 save | ||||||||||||||||||||||||||||
| 372 | |||||||||||||||||||||||||||||
| 373 | Saves image to the local file system. | ||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||
| 375 | $map->save("image.png"); | ||||||||||||||||||||||||||||
| 376 | $map->save("image.gif"); | ||||||||||||||||||||||||||||
| 377 | $map->save("image.jpg"); | ||||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||
| 379 | Note: If you have not explicitly set the format, the save method will guess the format from the extension. | ||||||||||||||||||||||||||||
| 380 | |||||||||||||||||||||||||||||
| 381 | =cut | ||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||
| 383 | 1 | ▶ | sub save { | ||||||||||||||||||||||||||
|
Subroutine
save: called CC=3 SCAR=11.5
Pod
documented
| |||||||||||||||||||||||||||||
| 384 | 1 | my $self = shift; | |||||||||||||||||||||||||||
| 385 | 1 | my $filename = shift; | |||||||||||||||||||||||||||
| 386 | 1 | my $suffix = (File::Basename::fileparse($filename, keys(%{$self->_extensions})))[2]; | |||||||||||||||||||||||||||
| 387 | local $self->{"format"}=$self->_extensions->{$suffix} | ||||||||||||||||||||||||||||
| 388 | 1 | ▶ | if (exists($self->_extensions->{$suffix}) && !defined($self->format)); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
exists $self->_extensions->{$suffix} and not defined $self->format
MC/DC0%0/2
exists $self->_extensions->{$suffix} and not defined $self->format
exists $self->_extensions->{$suffix}
not defined $self->format
Truth table33%1/3
A and not(B)
A= exists $self->_extensions->{$suffix}B= not defined $self->format
| |||||||||||||||||||||||||||||
| 389 | 1 | my $file=file($filename); #isa Path::Class::File | |||||||||||||||||||||||||||
| 390 | 1 | my $fh=$file->openw; | |||||||||||||||||||||||||||
| 391 | 1 | $fh->binmode; #support Win32 | |||||||||||||||||||||||||||
| 392 | 1 | print $fh $self->image; | |||||||||||||||||||||||||||
| 393 | 0 | return $self; | |||||||||||||||||||||||||||
| 394 | } | ||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||
| 396 | 3 | ▶ | sub _extensions { | ||||||||||||||||||||||||||
|
Subroutine
_extensions: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 397 | 3 | return {".png" => undef, ".gif" => "gif", ".jpg" => "jpg"}; | |||||||||||||||||||||||||||
| 398 | } | ||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||
| 400 | =head2 url | ||||||||||||||||||||||||||||
| 401 | |||||||||||||||||||||||||||||
| 402 | Returns the URL for the Static map. If L<URL::Signature::Google::Maps::API> is installed and configured the URL is seamlessly signed with your Google Enterprise Key. | ||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||
| 404 | my $url=$map->url; #isa L<URI> | ||||||||||||||||||||||||||||
| 405 | |||||||||||||||||||||||||||||
| 406 | =cut | ||||||||||||||||||||||||||||
| 407 | |||||||||||||||||||||||||||||
| 408 | 48 | ▶ | sub url { | ||||||||||||||||||||||||||
|
Subroutine
url: called CC=13 SCAR=26.6
Pod
documented
| |||||||||||||||||||||||||||||
| 409 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 410 | 48 | my $url=URI->new($self->script); #isa URI | |||||||||||||||||||||||||||
| 411 | 48 | my @q=(); | |||||||||||||||||||||||||||
| 412 | 48 | push @q, size => $self->_size; #required | |||||||||||||||||||||||||||
| 413 | 48 | ▶ | push @q, maptype => $self->type if defined $self->type; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 414 | 48 | ▶ | push @q, scale => $self->scale if defined $self->scale; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 415 | 48 | ▶ | push @q, format => $self->format if defined $self->format; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 416 | 48 | ▶ | push @q, sensor => $self->sensor ? "true" : "false"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 417 | 48 | my $needs_view=1; | |||||||||||||||||||||||||||
| 418 | 48 | foreach my $visible (@{$self->_visibles}) { | |||||||||||||||||||||||||||
| 419 | 6 | $needs_view=0; | |||||||||||||||||||||||||||
| 420 | 6 | push @q, visible => $visible->stringify; | |||||||||||||||||||||||||||
| 421 | } | ||||||||||||||||||||||||||||
| 422 | 48 | foreach my $marker (@{$self->_markers}) { | |||||||||||||||||||||||||||
| 423 | 18 | $needs_view=0; | |||||||||||||||||||||||||||
| 424 | 18 | push @q, markers => $marker->stringify; | |||||||||||||||||||||||||||
| 425 | } | ||||||||||||||||||||||||||||
| 426 | 48 | foreach my $path (@{$self->_paths}) { | |||||||||||||||||||||||||||
| 427 | 24 | $needs_view=0; | |||||||||||||||||||||||||||
| 428 | 24 | push @q, path => $path->stringify; | |||||||||||||||||||||||||||
| 429 | } | ||||||||||||||||||||||||||||
| 430 | 48 | ▶ | if (defined $self->center) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 431 | 0 | push @q, center => $self->center; | |||||||||||||||||||||||||||
| 432 | } else { | ||||||||||||||||||||||||||||
| 433 | 48 | ▶ | push @q, center => "Clifton, VA" if $needs_view; #we should only get here in the trival case | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 434 | } | ||||||||||||||||||||||||||||
| 435 | 48 | ▶ | if (defined $self->zoom) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 436 | 0 | push @q, zoom => $self->zoom; | |||||||||||||||||||||||||||
| 437 | } else { | ||||||||||||||||||||||||||||
| 438 | 48 | ▶ | push @q, zoom => "7" if $needs_view; #we should only get here in the trival case | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 439 | } | ||||||||||||||||||||||||||||
| 440 | 48 | $url->query_form(@q); | |||||||||||||||||||||||||||
| 441 | 48 | ▶ | if ($self->_signer) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 442 | 0 | $url=$self->_signer->url($self->_service => $url); | |||||||||||||||||||||||||||
| 443 | } else { | ||||||||||||||||||||||||||||
| 444 | 48 | $url->scheme($self->protocol); | |||||||||||||||||||||||||||
| 445 | 48 | $url->host($self->server); | |||||||||||||||||||||||||||
| 446 | } | ||||||||||||||||||||||||||||
| 447 | 48 | return $url; | |||||||||||||||||||||||||||
| 448 | } | ||||||||||||||||||||||||||||
| 449 | |||||||||||||||||||||||||||||
| 450 | #head2 _size | ||||||||||||||||||||||||||||
| 451 | # | ||||||||||||||||||||||||||||
| 452 | #size (required) defines the rectangular dimensions of the map image. This parameter takes a string of the form {horizontal_value}x{vertical_value}. For example, 500x400 defines a map 500 pixels wide by 400 pixels high. Maps smaller than 180 pixels in width will display a reduced-size Google logo. This parameter is affected by the scale parameter, described below; the final output size is the product of the size and scale values. | ||||||||||||||||||||||||||||
| 453 | # | ||||||||||||||||||||||||||||
| 454 | #cut | ||||||||||||||||||||||||||||
| 455 | |||||||||||||||||||||||||||||
| 456 | 48 | ▶ | sub _size { | ||||||||||||||||||||||||||
|
Subroutine
_size: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 457 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 458 | 48 | return join("x", $self->width, $self->height); | |||||||||||||||||||||||||||
| 459 | } | ||||||||||||||||||||||||||||
| 460 | |||||||||||||||||||||||||||||
| 461 | #head2 _signer | ||||||||||||||||||||||||||||
| 462 | # | ||||||||||||||||||||||||||||
| 463 | #Returns false but defined or a cached L<> object | ||||||||||||||||||||||||||||
| 464 | # | ||||||||||||||||||||||||||||
| 465 | #Note: This method returns false if the URL::Signature::Google::Maps::API is not installed and thus URL signatures will not be available. | ||||||||||||||||||||||||||||
| 466 | # | ||||||||||||||||||||||||||||
| 467 | #cut | ||||||||||||||||||||||||||||
| 468 | |||||||||||||||||||||||||||||
| 469 | 48 | ▶ | sub _signer { | ||||||||||||||||||||||||||
|
Subroutine
_signer: called CC=5 SCAR=18.3
| |||||||||||||||||||||||||||||
| 470 | 48 | my $self=shift; | |||||||||||||||||||||||||||
| 471 | 48 | ▶ | $self->{"_signer"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 472 | 48 | ▶ | unless (defined $self->{"_signer"}) { #init | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 473 | 0 | ▶ | eval('use URL::Signature::Google::Maps::API'); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 474 | 1 | ▶ | if ($@) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 475 | 1 | $self->{"_signer"}=""; | |||||||||||||||||||||||||||
| 476 | } else { | ||||||||||||||||||||||||||||
| 477 | $self->{"_signer"}=URL::Signature::Google::Maps::API->new(channel=>$self->channel, client=>$self->client, key=>$self->key) | ||||||||||||||||||||||||||||
| 478 | 0 | ▶ | unless defined($self->{"_signer"}); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 479 | } | ||||||||||||||||||||||||||||
| 480 | } | ||||||||||||||||||||||||||||
| 481 | 48 | return $self->{"_signer"}; | |||||||||||||||||||||||||||
| 482 | } | ||||||||||||||||||||||||||||
| 483 | |||||||||||||||||||||||||||||
| 484 | =head1 Google Enterprise Credentials | ||||||||||||||||||||||||||||
| 485 | |||||||||||||||||||||||||||||
| 486 | These settings are simply passed through to L<URL::Signature::Google::Maps::API>. | ||||||||||||||||||||||||||||
| 487 | |||||||||||||||||||||||||||||
| 488 | I recommend storing the credentials in the INI formatted file and leaving these values as undef. | ||||||||||||||||||||||||||||
| 489 | |||||||||||||||||||||||||||||
| 490 | =head2 client | ||||||||||||||||||||||||||||
| 491 | |||||||||||||||||||||||||||||
| 492 | Sets and returns the Google Enterprise Client | ||||||||||||||||||||||||||||
| 493 | |||||||||||||||||||||||||||||
| 494 | =cut | ||||||||||||||||||||||||||||
| 495 | |||||||||||||||||||||||||||||
| 496 | 0 | ▶ | sub client { | ||||||||||||||||||||||||||
|
Subroutine
client: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||
| 497 | 0 | my $self=shift; | |||||||||||||||||||||||||||
| 498 | 0 | ▶ | $self->{"client"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 499 | 0 | return $self->{"client"}; | |||||||||||||||||||||||||||
| 500 | } | ||||||||||||||||||||||||||||
| 501 | |||||||||||||||||||||||||||||
| 502 | =head2 key | ||||||||||||||||||||||||||||
| 503 | |||||||||||||||||||||||||||||
| 504 | Sets and returns the Google Enterprise Key | ||||||||||||||||||||||||||||
| 505 | |||||||||||||||||||||||||||||
| 506 | =cut | ||||||||||||||||||||||||||||
| 507 | |||||||||||||||||||||||||||||
| 508 | 0 | ▶ | sub key { | ||||||||||||||||||||||||||
|
Subroutine
key: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||
| 509 | 0 | my $self=shift; | |||||||||||||||||||||||||||
| 510 | 0 | ▶ | $self->{"key"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 511 | 0 | return $self->{"key"}; | |||||||||||||||||||||||||||
| 512 | } | ||||||||||||||||||||||||||||
| 513 | |||||||||||||||||||||||||||||
| 514 | =head2 channel | ||||||||||||||||||||||||||||
| 515 | |||||||||||||||||||||||||||||
| 516 | Sets and returns the Google Enterprise channel. | ||||||||||||||||||||||||||||
| 517 | |||||||||||||||||||||||||||||
| 518 | =cut | ||||||||||||||||||||||||||||
| 519 | |||||||||||||||||||||||||||||
| 520 | 0 | ▶ | sub channel { | ||||||||||||||||||||||||||
|
Subroutine
channel: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||
| 521 | 0 | my $self=shift; | |||||||||||||||||||||||||||
| 522 | 0 | ▶ | $self->{"channel"}=shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 523 | 0 | return $self->{"channel"}; | |||||||||||||||||||||||||||
| 524 | } | ||||||||||||||||||||||||||||
| 525 | |||||||||||||||||||||||||||||
| 526 | =head1 BUGS | ||||||||||||||||||||||||||||
| 527 | |||||||||||||||||||||||||||||
| 528 | Please log on RT and send an email to the author. | ||||||||||||||||||||||||||||
| 529 | |||||||||||||||||||||||||||||
| 530 | =head1 SUPPORT | ||||||||||||||||||||||||||||
| 531 | |||||||||||||||||||||||||||||
| 532 | DavisNetworks.com supports all Perl applications including this package. | ||||||||||||||||||||||||||||
| 533 | |||||||||||||||||||||||||||||
| 534 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 535 | |||||||||||||||||||||||||||||
| 536 | Michael R. Davis | ||||||||||||||||||||||||||||
| 537 | CPAN ID: MRDVT | ||||||||||||||||||||||||||||
| 538 | Satellite Tracking of People, LLC | ||||||||||||||||||||||||||||
| 539 | mdavis@stopllc.com | ||||||||||||||||||||||||||||
| 540 | http://www.stopllc.com/ | ||||||||||||||||||||||||||||
| 541 | |||||||||||||||||||||||||||||
| 542 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||
| 543 | |||||||||||||||||||||||||||||
| 544 | This program is free software licensed under the... | ||||||||||||||||||||||||||||
| 545 | |||||||||||||||||||||||||||||
| 546 | The General Public License (GPL) Version 2, June 1991 | ||||||||||||||||||||||||||||
| 547 | |||||||||||||||||||||||||||||
| 548 | The full text of the license can be found in the LICENSE file included with this module. | ||||||||||||||||||||||||||||
| 549 | |||||||||||||||||||||||||||||
| 550 | =head1 SEE ALSO | ||||||||||||||||||||||||||||
| 551 | |||||||||||||||||||||||||||||
| 552 | L<Geo::Google::StaticMaps>, L<Geo::Google::MapObject>, L<Net::Flickr::Geo::GoogleMaps>, L<URL::Signature::Google::Maps::API> | ||||||||||||||||||||||||||||
| 553 | |||||||||||||||||||||||||||||
| 554 | =cut | ||||||||||||||||||||||||||||
| 555 | |||||||||||||||||||||||||||||
| 556 | 10 | 1; | |||||||||||||||||||||||||||