|
Probe::Perl - Information about the currently running perl |
Probe::Perl - Information about the currently running perl
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
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.
new()Config.pm data, it's necessary to create an
object to store the values in.
Config.pm value 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.
Config.pm data.
perl_is_same() to verify.
perl_version_to_float(). Uses $^V if your perl is
recent enough, otherwise uses $].
$version as a perl-styled version number like 5.008001.
@INC path, before
any entries from use lib, $ENV{PERL5LIB}, or -I switches are
added.
Randy W. Sims <randys@thepierianspring.org>
Based partly on code from the Module::Build project, by Ken Williams <kwilliams@cpan.org> and others.
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.
|
Probe::Perl - Information about the currently running perl |