-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the ProductOpener::GeoIP.pm module #5091
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
lib/ProductOpener/GeoIP.pm
Outdated
|
||
=head2 get_country_code_for_ip() | ||
|
||
C<get_country_code_for_ip()> takes the IP address as input paramter and returns the country iso code where IP address is located. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C<get_country_code_for_ip()> takes the IP address as input paramter and returns the country iso code where IP address is located. | |
C<get_country_code_for_ip()> takes the IP address as input parameter and returns the country iso code where IP address is located. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for pointing this out!!
I have incorporated changes, Please check!!
lib/ProductOpener/GeoIP.pm
Outdated
|
||
=head3 Return values | ||
|
||
If the function executes successfully it returns the iso code for the country where the IP address is located. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the function executes successfully it returns the iso code for the country where the IP address is located. | |
If the function executes successfully it returns the two-character ISO 3166-1 (http://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the country where the IP address is located (eg. "AF" for Afghanistan). ``` |
Kudos, SonarCloud Quality Gate passed! |
|
||
=head3 Return values | ||
|
||
If the function executes successfully it returns the country name. On the other hand, if it throws an exception, it simply returns undefined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to specify what is the reference for the "country name". I think it's the english version of Geonames.org names but not the ISO 3166-1 -- https://en.wikipedia.org/wiki/ISO_3166-1. The "United Kingdom" for example, seems to be named "United Kingdom of Great Britain and Northern Ireland" in ISO 3166-1. @stephanegigandet could you tell us?
Description: Updated the
GeoIP.pm
file to add its documentation in perlpod format.Fixes: #5089
Related Issue: #2203