```{index} single: Config; Perl module ``` # Config ```{pperl-module-badges} Config ``` Look up the build-time configuration of the running Perl interpreter. `Config` exposes the values recorded when Perl itself was compiled — platform, compiler flags, install paths, feature toggles. Scripts consult it to make portability decisions, locate installed libraries, or report interpreter characteristics. Two surfaces are provided: - The tied hash `%Config`, accessed element-wise as `$Config{key}`. Lookup, existence, and iteration go through the tie hooks. The hash is read-only; `STORE`, `DELETE`, and `CLEAR` croak. - Programmatic queries: `config_re`, `config_sh`, `config_vars`, `myconfig`, `compile_date`, `bincompat_options`, `non_bincompat_options`, `local_patches`, `header_files`, and the `perl -V` backend `_V`. Under pperl, every value reflects pperl's own build, not any upstream perl's. Callers using `%Config` entries to drive portability decisions (compiler name, archname, install prefix, feature defines) get answers that match the interpreter they are actually running. ## Functions ### Hash access #### [`fetch`](Config/fetch) Tied-hash read: return the value stored under a key. #### [`exists`](Config/exists) Tied-hash membership test: does a key exist in `%Config`? #### [`store`](Config/store) Tied-hash write: always croaks; `%Config` is read-only. #### `delete` Tied-hash delete: always croaks; `%Config` is read-only. **Synopsis** ```perl delete $Config{archname}; # dies ``` **What you get back** Nothing. The call raises `Config is read-only`. **Differences from upstream** Fully compatible with upstream. #### `clear` Tied-hash clear: always croaks; `%Config` is read-only. **Synopsis** ```perl %Config = (); # dies ``` **What you get back** Nothing. The call raises `Config is read-only`. **Differences from upstream** Fully compatible with upstream. #### [`firstkey`](Config/firstkey) Tied-hash iterator: reset and return the first key. #### [`nextkey`](Config/nextkey) Tied-hash iterator: return the next key after `FIRSTKEY`. ### Querying #### [`myconfig`](Config/myconfig) Return a human-readable summary of the interpreter's build. #### [`config_sh`](Config/config_sh) Return the full configuration as one shell-assignment block. #### [`config_vars`](Config/config_vars) Print selected configuration entries to `STDOUT`. #### [`config_re`](Config/config_re) Grep configuration entries whose key matches a pattern. ### Introspection #### [`compile_date`](Config/compile_date) Return a one-line description of when and with what the interpreter was built. #### [`local_patches`](Config/local_patches) Return the list of local patches applied to the interpreter. #### [`bincompat_options`](Config/bincompat_options) Return the compile-time options that affect binary compatibility. #### [`non_bincompat_options`](Config/non_bincompat_options) Return compile-time options that do not affect binary compatibility. #### [`header_files`](Config/header_files) Return the canonical list of Perl C header filenames. #### [`_v`](Config/_v) Print the full `perl -V` report to `STDOUT`. ```{toctree} :hidden: :maxdepth: 1 Config/myconfig Config/config_sh Config/config_vars Config/fetch Config/exists Config/store Config/firstkey Config/nextkey Config/config_re Config/compile_date Config/local_patches Config/bincompat_options Config/non_bincompat_options Config/header_files Config/_v ```