@@ -144,19 +144,6 @@ __END__
144144
145145=encoding utf8
146146
147-
148- =head1 NAME
149-
150- Geo::Coder::OpenCage - Perl interface to the OpenCage geocoding API
151-
152- =head1 DESCRIPTION
153-
154- This module provides an interface to the OpenCage geocoding service.
155-
156- For full details of the API visit L<https://opencagedata.com/api>
157-
158- It is recommended you read the L<best practices for using the OpenCage geocoder|https://opencagedata.com/api#bestpractices> before you start.
159-
160147=head1 SYNOPSIS
161148
162149 my $Geocoder = Geo::Coder::OpenCage->new(api_key => $my_api_key);
@@ -165,7 +152,7 @@ It is recommended you read the L<best practices for using the OpenCage geocoder|
165152 my $response = $Geocoder->geocode(location => "Berlin");
166153
167154 # reverse geocoding
168- my $response = $geocoder ->reverse_geocode(lat => 52.5432379, lng => 13.4142133 );
155+ my $response = $Geocoder ->reverse_geocode(lat => 52.5432379, lng => 13.4142133 );
169156
170157 if ($response->{status}{code} == 200) {
171158 foreach my $r (@{ $response->{results} }) {
@@ -175,12 +162,19 @@ It is recommended you read the L<best practices for using the OpenCage geocoder|
175162 }
176163 }
177164
165+ =head1 DESCRIPTION
166+
167+ This module provides an interface to the OpenCage geocoding service.
168+
169+ For full details of the API visit L<https://opencagedata.com/api>
170+
171+ It is recommended you read the L<best practices for using the OpenCage geocoder|https://opencagedata.com/api#bestpractices> before you start.
178172
179173=head1 DEVELOPING WITH AI
180174
181175Please note there is an
182176L<AI SKILL.md for working with the OpenCage Geocoding API|https://github.com/OpenCageData/opencage-skills/blob/master/opencage-geocoding-api/SKILL.md>
183- which includes a reference file for developing in Perl using this module.
177+ which includes a reference file for developing in Perl using this module.
184178
185179=head1 METHODS
186180
@@ -190,7 +184,7 @@ which includes a reference file for developing in Perl using this module.
190184
191185Get your API key from L<https://opencagedata.com> .
192186
193- Optionally "http => 1" can also be specified in which case API requests will NOT be made via https.
187+ Optionally "http => 1" can also be specified in which case API requests will NOT be made via https.
194188
195189=head2 ua
196190
@@ -214,7 +208,7 @@ warns and returns undef if the query fails for some reason.
214208If you will be doing forward geocoding, please see the
215209L<OpenCage query formatting guidelines|https://opencagedata.com/guides/how-to-format-your-geocoding-query>
216210
217- You should check the always response status
211+ You should always check the response status
218212
219213 $response->{status}{code}
220214
@@ -228,17 +222,18 @@ L<OpenCage geocoding API response codes|https://opencagedata.com/api#codes>
228222 die "Geocoding failed";
229223 }
230224 if ($response->{status}{code} != 200) {
231- warn "API error: " . $result ->{status}{message};
225+ warn "API error: " . $response ->{status}{message};
232226 }
233227
234228
229+ =over
230+
235231=item Supported Parameters
236232
237233The OpenCage Geocoder has a few optional parameters.
238234
239235Please see L<the OpenCage geocoder documentation|https://opencagedata.com/api> . Most of L<the various optional parameters|https://opencagedata.com/api#forward-opt> are supported.
240236
241-
242237The most commonly useful parameters are:
243238
244239=item language
@@ -276,6 +271,7 @@ option is never used.
276271
277272All other API parameters are passed through directly
278273
274+ =back
279275
280276=head2 reverse_geocode
281277
0 commit comments