The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Perl5 Module WebService::IFConfig::Client

Client for Martin Polden's IP address lookup service.

Note:

Rate Limiting

Unless you are hosting your own copy of the service, the canonical instance at https://ifconfig.co requests you limit your requests to 1 per minute. Don't abuse his service, host your own if you need more frequent lookups.

Usage

use feature qw/say/;
use WebService::IFConfig::Client;
my $ipconfig = WebService::IFConfig::Client->new();

say $ifconfig->city();
say $ifconfig->country();
say $ifconfig->hostname();
say $ifconfig->ip();
say $ifconfig->ip_decimal();

Copyright Ⓒ 2017 Nicolas Doye

License

Apache License, Version 2.0