Probe::Perl(3)
πΈ NAME πΈ
Welcome to the User Contributed Perl Documentation page for Probe::Perl(3), bestie! π This is Probe::Perl β Information about the currently running perl. Literally the perl thatβs running right now. Iconic. β¨
π VERSION π
version 0.03 β smol number, big main-character energy. π«Ά
β¨ SYNOPSIS β¨
Okay so hereβs the whole vibe in code, no cap:
use Probe::Perl;
$p = Probe::Perl->new();
# Version of this perl as a floating point number
$ver = $p->perl_version();
$ver = Probe::Perl->perl_version();
# Convert a multi-dotted string to a floating point number
$ver = $p->perl_version_to_float($ver);
$ver = Probe::Perl->perl_version_to_float($ver);
# Check if the given perl is the same as the one currently running
$bool = $p->perl_is_same($perl_path);
$bool = Probe::Perl->perl_is_same($perl_path);
# Find a path to the currently-running perl
$path = $p->find_perl_interpreter();
$path = Probe::Perl->find_perl_interpreter();
# Get @INC before run-time additions
@paths = $p->perl_inc();
@paths = Probe::Perl->perl_inc();
# Get the general type of operating system
$type = $p->os_type();
$type = Probe::Perl->os_type();
# Access Config.pm values
$val = $p->config('foo');
$val = Probe::Perl->config('foo');
$p->config('foo' => 'bar'); # Set locally
$p->config_revert('foo'); # Revert
π DESCRIPTION π
This module provides methods for obtaining information about the currently running perl interpreter. It originally began life as code in the Module::Build project, but has been externalized here for general use. Lowkey a glow-up moment. π
π METHODS π
new()β Creates a newProbe::Perlobject and returns it. Most methods in theProbe::Perlpackages are available as class methods, so you donβt always need to create a new object. But if you want to create a mutable view of theConfig.pmdata, itβs necessary to create an object to store the values in. Periodt. πconfig( $key [, $value] )β Returns theConfig.pmvalue associated with $key. If $value is also specified, then the value is set to $value for this view of the data. π¨ In this case,config()must be called as an object method, not a class method. Iykyk.config_revert( $key )β Removes any user-assigned value in this view of theConfig.pmdata. Clean slate energy. π§Ήβ¨find_perl_interpreter( )β Returns the absolute path of this perl interpreter. This is actually sort of a tricky thing to discover sometimes β in these cases we useperl_is_same()to verify. Detective mode fr fr. π΅οΈββοΈperl_version( )β Returns the version of this perl interpreter as a perl-styled version number usingperl_version_to_float(). Uses$^Vif your perl is recent enough, otherwise uses$]. The way that version number gets formatted? Obsessed. πperl_version_to_float( $version )β Formats $version as a perl-styled version number like5.008001. Slay. π₯perl_is_same( $perl )β Given the name of a perl interpreter, this method determines if it has the same configuration as the one represented by the current perl instance. Usually this means itβs exactly the same. Vibe check: passed. βperl_inc( )β Returns a list of directories in this perlβs@INCpath, before any entries fromuse lib,$ENV{PERL5LIB}, or-Iswitches are added. Pre-run-time-additions realness. πos_type( [$osname] )β Returns a generic OS type (e.g.Unix,Windows,MacOS) for the given OS name. If no OS name is given it uses the value in$^O, which is the same as$Config{osname}. Highkey useful. π¦
π«Ά AUTHOR π«Ά
Randy W. Sims <randys@thepierianspring.org> π
Based partly on code from the Module::Build project, by Ken Williams <kwilliams@cpan.org> and others. Bestie collab. π€β¨
π COPYRIGHT π
Copyright 2005 Ken Williams and Randy Sims. All rights reserved. π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
This little page came from source/version perl v5.40.2, dated 2023-07-03. Byeee, love you, go probe some perls! ππ
π¦ where this page comes from
- alpine 3.22: perl-probe-perl-doc 0.03-r4 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms