Config...nsions(3perl)
π NAME π
Config::Extensions β bestie, it's literally a hash lookup that tells you which core extensions were built. That's it. That's the whole vibe. β¨
π¦ SYNOPSIS π¦
use Config::Extensions '%Extensions';
if ($Extensions{PerlIO::via}) {
# This perl has PerlIO::via built
}
Like, you just use it, and suddenly you have a whole hash of answers. Obsessed. π
πΈ DESCRIPTION πΈ
okay so, the Config::Extensions module hands you a hash called %Extensions and it has, like, every single core extension that was enabled for this perl. Your perl, specifically. Main character energy.
The hash is keyed by extension name (iykyk), and each entry has one of 3 possible values:
dynamicβ the extension is dynamically linked πnonxsβ the extension is pure perl, so it doesn't need linking to the perl executable π«staticβ the extension is statically linked to the perl binary πͺ¨
And here's the slay part: all of those values evaluate to true. So a simple if test is genuinely good enough to figure out whether an extension is present. No extra checks, no fuss, no drama. π«Ά
fr fr, just if ($Extensions{Whatever}) and you're done.
Also, lowkey important: all the data used to generate the %Extensions hash is already present in the Config module. It's just... not in such a convenient format to quickly reference. So this module is basically the glow-up version. π
π AUTHOR π
Nicholas Clark <nick@ccl4.org> β iconic, we stan. π
and that's the whole page, bestie π this was perl v5.44.0, dated 2026-10-17, straight from the Perl Programmers Reference Guide β tysm for reading, mwah πβ¨
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms