Net::RIR_CC - perl module for mapping country codes to RIRs
use Net::RIR_CC; # Constructor $rc = Net::RIR_CC->new; # Or with an explicit (updated) data file $rc = Net::RIR_CC->new(datafile => '/tmp/list-of-country-codes-and-rirs-ordered-by-country-code'); # Lookup an ISO-3166 alpha2 or alpha3 code, returning a Net::RIR_CC::RIR object $rir = $rc->get_rir('AU'); $rir = $rc->get_rir('NZL'); print $rir->name;
Net::RIR_CC is a perl module for mapping ISO-3166 country codes to RIRs (Regional Internet Registries), using the mappings from http://www.nro.net/about-the-nro/list-of-country-codes-and-rirs-ordered-by-country-code, plus a few extras missing from that page.
A snapshot of this page is included with the distribution, but you can download and load an updated version if you'd prefer.
<gavin at openfusion.com.au>
Please report any bugs or feature requests to
bug-net-rir_cc at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-RIR_CC.
Copyright 2013 Gavin Carr.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.