IP::Cou...::Medium(3)
β¨ NAME β¨
Okay bestie, the manual we're reading is IP::Cou...::Medium(3) (from User Contributed Perl Documentation), and it's all about IP::Country::Medium β a cached lookup of country codes by IP address and domain name. π
π¦ SYNOPSIS π¦
use IP::Country::Medium;
πΈ DESCRIPTION πΈ
First thing: see the documentation for IP::Country. Like, go read that one too. π
In addition, IP::Country::Medium objects have a cache() method. It controls whether hostname->cc lookups are cached β and it's on by default. Slay.
π
$ic->cache(BOOLEAN) π
By default, the module caches results of country-code lookups. You can switch this feature off by setting cache to a false value β that's zero, empty string, or undef β and switch it back on by setting cache to a true value (anything which isn't false). Literally anything not false. π
$ic->cache(0); # clears and disables cache
$ic->cache(1); # enables the cache
Heads up, bestie: the cache is formed at the class level, so any change in caching in one object will affect all objects of this class. Turning off the cache also clears the cache. No cap. π
And that's the whole vibe. This iconic little page was brought to you by perl v5.42.0 and dated 2015-04-14 β mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-IP-Country 2.28-bp160.1.12 Β· (GPL-1.0+ or Artistic-1.0) and SUSE-Redistributable-Content
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms