IP::Country::Medium - cached lookup of country codes by IP address and domain name
use IP::Country::Medium;
See documentation for IP::Country. In addition, IP::Country::Medium objects have a cache() method, which controls whether hostname->cc lookups are cached (on by default).
By default, the module caches results of country-code lookups. This feature can be switched off by setting cache to a false value (zero, empty string or undef), and can be switched on again by setting cache to a true value (anything which isn't false).
$ic->cache(0); # clears and disables cache $ic->cache(1); # enables the cache
The cache is formed at the class level, so any change in caching in one object will affect all objectcs of this class. Turning off the cache also clears the cache.
To install IP::Country, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IP::Country
CPAN shell
perl -MCPAN -e shell install IP::Country
For more information on module installation, please visit the detailed CPAN module installation guide.