Skip to content

Commit

Permalink
Upgrade to 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ipinfo committed Aug 29, 2024
1 parent 31f2aa4 commit 1fc91a0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
5 changes: 2 additions & 3 deletions Geo-IPinfo/lib/Geo/IPinfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use Geo::Details;
use Net::CIDR;
use Net::CIDR::Set;

our $VERSION = '3.0.0';
our $VERSION = '3.0.1';
use constant DEFAULT_CACHE_MAX_SIZE => 4096;
use constant DEFAULT_CACHE_TTL => 86_400;
use constant DEFAULT_TIMEOUT => 2;
Expand Down Expand Up @@ -1388,8 +1388,7 @@ Geo::IPinfo - The official Perl library for IPinfo.
=head1 VERSION
Version 3.0.0
- Inlined the data files.
Version 3.0.1
=cut
Expand Down
45 changes: 23 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# [<img src="https://ipinfo.io/static/ipinfo-small.svg" alt="IPinfo" width="24"/>](https://ipinfo.io/) IPinfo Perl Client Library

This is the official Perl client library for the [IPinfo.io](https://ipinfo.io) IP address API, allowing you to look up your own IP address, or get any of the following details for an IP:
- [IP to Geolocation](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude, and longitude)
- [IP to ASN](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting, or company)
- [IP to Company](https://ipinfo.io/ip-company-api) (the name and domain of the business that uses the IP address)
- [IP to Carrier](https://ipinfo.io/ip-carrier-api) (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)

- [IP to Geolocation](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude, and longitude)
- [IP to ASN](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting, or company)
- [IP to Company](https://ipinfo.io/ip-company-api) (the name and domain of the business that uses the IP address)
- [IP to Carrier](https://ipinfo.io/ip-carrier-api) (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)

Check all the data we have for your IP address [here](https://ipinfo.io/what-is-my-ip).

Expand All @@ -28,10 +29,10 @@ use Geo::IPinfo;

If you'd like to install from source (not necessary for use in your application), download the source and run the following commands:

perl Makefile.PL
make
make test
make install
perl Makefile.PL
make
make test
make install

#### Quick Start

Expand All @@ -48,12 +49,13 @@ $loc = $details->loc; # 37.8342,-122.2900
```

#### Dependencies
* Cache::LRU
* JSON
* LWP::UserAgent
* HTTP::Headers
* Net::CIDR
* Net::CIDR::Set

- Cache::LRU
- JSON
- LWP::UserAgent
- HTTP::Headers
- Net::CIDR
- Net::CIDR::Set

#### Usage

Expand Down Expand Up @@ -162,8 +164,8 @@ In-memory caching of `Details` data is provided by default via the [Cache::LRU](

Cache behavior can be modified with the `%options` argument.

* Default maximum cache size: 4096 (multiples of 2 are recommended to increase efficiency)
* Default TTL: 24 hours (in seconds)
- Default maximum cache size: 4096 (multiples of 2 are recommended to increase efficiency)
- Default TTL: 24 hours (in seconds)

```perl
$token = '1234';
Expand All @@ -174,20 +176,20 @@ $ipinfo = Geo::IPinfo->new($token, ("cache_ttl" => 100, "cache_max_size" => 1000

It's possible to use a custom cache by passing this into the handler object with the `cache` option. A custom cache must include the following methods:

* $custom_cache->get($key);
* $custom_cache->set($key, $value);
- $custom_cache->get($key);
- $custom_cache->set($key, $value);

If a custom cache is used then the `cache_ttl` and `cache_max_size` options will not be used.

```perl
$ipinfo = Geo::IPinfo->new($token, ("cache" => $my_custom_cache));
```


### Request options

The request timeout period can be set in the `%options` parameter.

* Default request timeout: 2 seconds
- Default request timeout: 2 seconds

```perl
$ipinfo = Geo::IPinfo->new($token, ("timeout" => 5));
Expand Down Expand Up @@ -238,7 +240,7 @@ Additional package information can be found at the following locations:

Search CPAN
http://search.cpan.org/dist/Geo-IPinfo/

### Other Libraries

There are [official IPinfo client libraries](https://ipinfo.io/developers/libraries) available for many languages including PHP, Go, Java, Ruby, and many popular frameworks such as Django, Rails, and Laravel. There are also many third-party libraries and integrations available for our API.
Expand All @@ -249,7 +251,6 @@ Founded in 2013, IPinfo prides itself on being the most reliable, accurate, and

[![image](https://avatars3.githubusercontent.com/u/15721521?s=128&u=7bb7dde5c4991335fb234e68a30971944abc6bf3&v=4)](https://ipinfo.io/)


SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
Expand Down

0 comments on commit 1fc91a0

Please sign in to comment.