Config::Extensions(3perl) Perl Programmers Reference Guide Config::Extensions(3perl)
Config::Extensions - hash lookup of which core extensions were built.
| Use Case | Command | Description |
|---|---|---|
| Check if an extension is built | $Extensions{ExtensionName} | Returns a true value if the extension is present (dynamic, nonxs, or static). |
| Determine how an extension is linked | $Extensions{ExtensionName} eq 'dynamic' (or nonxs, static) | Compare the value to one of the three possible types. |
| Quick alternative to scanning Config | use Config::Extensions '%Extensions' | Provides a convenient hash without manually parsing Config data. |
use Config::Extensions '%Extensions';
if ($Extensions{PerlIO::via}) {
# This perl has PerlIO::via built
}
The Config::Extensions module provides a hash %Extensions containing all the core extensions that were enabled for this perl. The hash is keyed by extension name, with each entry having one of 3 possible values:
As all values evaluate to true, a simple if test is good enough to determine whether an extension is present.
All the data used to generate the %Extensions hash is already present in the Config module, but not in such a convenient format to quickly reference.
Nicholas Clark <nick AT ccl4.org>
perl v5.34.0 2026-06-23 Config::Extensions(3perl)
Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-23 10:15 @216.73.216.102
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)