Config::Perl::V(3perl)

πŸ’– Config::Perl::V β€” the perl -V decoder ring πŸ’–

okay bestie, welcome to Config::Perl::V(3perl), part of the Perl Programmers Reference Guide 🫢 this is the module that takes the messy text blob that perl -V spits out and turns it into structured data you can actually poke at. main character energy fr fr ✨


🌸 SYNOPSIS 🌸

use Config::Perl::V;

my $local_config = Config::Perl::V::myconfig ();
print $local_config->{config}{osname};

like. look at that. two lines and you're already vibing πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

πŸ’œ $conf = myconfig ()

This one goes and collects all the data described down in "The hash structure" below, then hands it back to you as a hash reference. It optionally accepts an option so you can pull in more entries from %ENV β€” peep "environment" below for the tea.

⚠️ no cap: this will not work on uninstalled perls when you call it with -I/path/to/uninstalled/perl/lib. The way that it does work is when that path lives in $PERL5LIB or in $PERL5OPT, because paths handed over with -I are literally not known at the moment the -V info gets collected. tragic but true 😭

πŸ’œ $conf = plv2hash ($text [, ...])

Converts one single perl -V text block β€” or a list of lines β€” into a full-on complete myconfig hash. Every unknown entry gets defaulted. no loose ends, we love that for us ✨

πŸ’œ $info = summary ([$conf])

Returns an arbitrary selection of the information. And if you don't hand it a $conf? Then myconfig () gets used instead. it just fills in for you, so sweet πŸŽ€

πŸ’œ $md5 = signature ([$conf])

Returns the MD5 of the info that summary () gives back, minus the config_args entry. bye girl πŸ’…

And if Digest::MD5 isn't available? It returns a string made of only 0's. not ideal but it's honest πŸ™ˆ


πŸ”₯ The hash structure πŸ”₯

The returned hash is made of 4 parts, and every single one matters:

✨ build

This info gets extracted from the second block that perl -V emits, and usually it looks a lil something like this:

Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING USE_64_BIT_INT USE_LARGE_FILES
  Locally applied patches:
        defined-or
        MAINT24637
  Built under linux
  Compiled at Jun 13 2005 10:44:20
  @INC:
    /usr/lib/perl5/5.8.7/i686-linux-64int
    /usr/lib/perl5/5.8.7
    /usr/lib/perl5/site_perl/5.8.7/i686-linux-64int
    /usr/lib/perl5/site_perl/5.8.7
    /usr/lib/perl5/site_perl
    .

or alternatively:

Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING MULTIPLICITY
                        PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
                        PERL_MALLOC_WRAP PERL_TRACK_MEMPOOL
                        PERL_USE_SAFE_PUTENV USE_ITHREADS
                        USE_LARGE_FILES USE_PERLIO
                        USE_REENTRANT_API
  Built under linux
  Compiled at Jan 28 2009 15:26:59

This info is not available anywhere else, not even in %Config β€” this is the tea that only the perl binary itself knows. iykyk πŸ”₯

The extracted info lives in 5 entries inside the build hash:

  • osname β€” most likely identical to $Config{osname}, and it was the name that was known back when perl was built. It can differ if perl got cross-compiled. The default for this field, if it can't be extracted, is to copy $Config{osname}. And the two might disagree on casing (OpenBSD vs openbsd) β€” lowercase girlies vs uppercase girlies, we don't judge 🌈
  • stamp β€” the time string for when the perl binary was compiled. Default value is 0.
  • options β€” a hash with all the known defines as its keys. The value is either 0, which means unknown or unset, or 1, which means defined. binary codec behavior honestly πŸ’…
  • derived β€” since some variables get reported under a different name in the output of perl -V than their actual name in %Config, the author decided to keep the config entry as close to reality as possible, and stash the entries that might have been guessed from the printed output into a separate block. separate but equal, iconic πŸŽ€
  • patches β€” a list of optionally locally applied patches. Default is an empty list.

✨ environment

By default this hash only gets filled with the environment variables out of %ENV that start with "PERL". But bestie, you can pass the "env" option to myconfig to get more:

my $conf = Config::Perl::V::myconfig ({ env => qr/^ORACLE/ });
my $conf = Config::Perl::V::myconfig ([ env => qr/^ORACLE/ ]);

✨ config

This hash gets filled with the variables that perl -V fills its report with, and it carries the same variables that Config::myconfig returns from %Config. matching sets, cute 🫢

✨ inc

This is the list of default @INC.


πŸ’€ REASONING πŸ’€

This module was written so it could return the configuration for the currently used perl as deeply as needed for the CPANTESTERS framework. Up until now they used the output of myconfig as a single text blob, and so it was missing the vital binary characteristics of the running perl and the optional applied patches. glow-up achieved, periodt ✨


πŸ™ˆ BUGS πŸ™ˆ

Please feedback what is wrong. (literally. just tell us. we're nice, we promise πŸ’–)


πŸŽ€ TODO πŸŽ€

  • Implement retrieval functions/methods
  • Documentation
  • Error checking
  • Tests

(the list is giving "vision board" and honestly? we respect it 🌸)


πŸ‘‘ AUTHOR πŸ‘‘

H.Merijn Brand <h.m.brand@xs4all.nl>


Copyright (C) 2009-2026 H.Merijn Brand

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay that's the whole page bestie, you ate it up πŸ’… one last thing: this page is from perl v5.44.0, dated 2026-10-17, and it's the Config::Perl::V(3perl) manual page itself. go read perl -V output without fear now, you got this πŸ¦‹πŸ’œ

πŸ“¦ 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