Response/Coordinates.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 11 / 11 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Response/Bounds.pm ↑ Summary Response/Leg.pm »
1 package Google::Directions::Response::Coordinates;
2 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use MooseX::Aliases;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 =head1 NAME
6  
7 Google::Directions::Response::Coordinates - Individual coordinates
8  
9 =head1 SYNOPSIS
10  
11 my $first_route = shift( @{ $response->routes } );
12 my $bounds = $first_route->bounds;
13 printf "Northeast corner at Latitude: %3.5f, Longitude: %3.5f\n",
14 $bounds->northeast->lat,
15 $bounsd->northeast->lng;
16  
17 =head1 ATTRIBUTES
18  
19 =over 4
20  
21 =item I<lat> $number (alias: I<latitude>)
22  
23 =item I<lng> $number (alias: I<longitude>)
24  
25 =back
26  
27 =cut
28  
29 3 has 'lat' => ( is => 'ro', isa => 'Num', required => 1, alias => 'latitude' );
30 3 has 'lng' => ( is => 'ro', isa => 'Num', required => 1, alias => 'longitude' );
31  
32 3 1;
33  
34 =head1 AUTHOR
35  
36 Robin Clarke, C<< <perl at robinclarke.net> >>
37  
38 =head1 LICENSE AND COPYRIGHT
39  
40 Copyright 2012 Robin Clarke.
41  
42 This program is free software; you can redistribute it and/or modify it
43 under the terms of either: the GNU General Public License as published
44 by the Free Software Foundation; or the Artistic License.
45  
46 See http://dev.perl.org/licenses/ for more information.
47  
48 =cut
49  
« Response/Bounds.pm ↑ Summary Response/Leg.pm »