25 Jul 2010 09:28:20 UTC
- Distribution: ExtUtils-InferConfig
- Module version: 1.04
- Source (raw)
- Browse (raw)
- How to Contribute
- Clone repository
- Issues (1)
- Testers (645 / 31 / 0)
- KwaliteeBus factor: 0
- 74.86% Coverage
- License: perl_5
- Activity24 month
- Download (5.02KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionSMUELLER Steffen Müller
- SEE ALSO
- COPYRIGHT AND LICENSE
ExtUtils::InferConfig - Infer Perl Configuration for non-running interpreters
use ExtUtils::InferConfig; my $eic = ExtUtils::InferConfig->new( perl => '/path/to/a/perl' ); # Get that interpreters %Config as hash ref my $Config = $eic->get_config; # Get that interpreters @INC as array ref my $INC = $eic->get_inc;
This module can determine the configuration and
@INCof a perl interpreter given its path and that it is runnable by the current user.
It runs the interpreter with a one-liner and grabs the
%Confighash via STDOUT capturing. Getting the module load paths,
@INC, works the same way for
@INCentries that are plain paths.
Requires one named parameter:
perl, the path to the perl interpreter to query for information.
debug => 1enables the debugging mode.
Returns a copy of the
%Config::Confighash of the intepreter which was specified as a parameter to the constructor.
The first time this method (or the get_inc method below) is called, the perl binary is run. For subsequent calls of this method, the information is cached.
Returns a copy of the
@INCarray of the intepreter which was specified as a parameter to the constructor. Caveat: This skips any references (subroutines,
ARRAYrefs, objects) in the
@INCarray because they cannot be reliably stringified!
The first time this method (or the get_config method avove) is called, the perl binary is run. For subsequent calls of this method, the information is cached.
This module cannot get the non-plain (i.e. non-string) entries of the
You can use this module with ExtUtils::Installed to get information about perl installations that aren't currently running.
Steffen Mueller, <firstname.lastname@example.org>
Copyright (C) 2007-2010 by Steffen Mueller
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6 or, at your option, any later version of Perl 5 you may have available.
Module Install Instructions
To install ExtUtils::InferConfig, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install ExtUtils::InferConfig
For more information on module installation, please visit the detailed CPAN module installation guide.