CONFIG::EXTENSIONS(3pm)
β¨ Config::Extensions β¨
okay bestie, so this is Config::Extensions from the Perl Programmers Reference Guide, and honestly? it's giving "small but mighty" π
no cap.
πΈ NAME πΈ
Config::Extensions β a hash lookup of which core extensions were built. literally that's it, that's the whole job, and she does it flawlessly π
π¦ SYNOPSIS π¦
use Config::Extensions '%Extensions';
if ($Extensions{PerlIO::via}) {
# This perl has PerlIO::via built
}
look at that. clean. iconic. a little if block that just knows things π
π₯ DESCRIPTION π₯
so the Config::Extensions module hands you a hash called %Extensions, and it contains all the core extensions that were enabled for this perl. yes, this perl, the one you're running right now, main character energy π
the hash is keyed by extension name, and each entry has one of 3 possible values:
π dynamic
the extension is dynamically linked. (linked at runtime, living her best life elsewhere, iykyk)
π§ nonxs
the extension is pure perl, so it doesn't need linking to the perl executable. no XS, no C, just vibes and .pm files π
β static
the extension is statically linked to the perl binary. she's built in, she's committed, she's not going anywhere π«Ά
β¨ pro tip from the manpage itself: because all three values evaluate to true, a simple if test is good enough to determine whether an extension is present. so like, you don't need to likeβ¦ compare strings or anything. just check if it's truthy and you're done π
also, fun fact: 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 for quickly referencing. so this module is basically the Config data's glow-up ππ₯
π AUTHOR π
Nicholas Clark <nick@ccl4.org> β thank you king, we appreciate you π
okay that's the whole page, you're all caught up π this was perl v5.42.3, dated 2026-11-03, and that's Config::Extensions(3pm) signing off β stay slaying bestie πβ¨π¦
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms