ExtUtils::InferConfig

Current version is 1.04.

Download

Distribution from this site.
CPAN site

README

NAME
    ExtUtils::InferConfig - Infer Perl Configuration for non-running
    interpreters

SYNOPSIS
      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;

DESCRIPTION
    This module can determine the configuration and @INC of 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 %Config hash via
    STDOUT capturing. Getting the module load paths, @INC, works the same
    way for @INC entries that are plain paths.

METHODS
  new
    Requires one named parameter: "perl", the path to the perl interpreter
    to query for information.

  get_config
    Returns a copy of the %Config::Config hash 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.

  get_inc
    Returns a copy of the @INC array of the intepreter which was specified
    as a parameter to the constructor. Caveat: This skips any references
    (subroutines, "ARRAY" refs, objects) in the @INC array 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.

CAVEATS
    This module cannot get the non-plain (i.e. non-string) entries of the
    @INC array!

SEE ALSO
    You can use this module with ExtUtils::Installed to get information
    about perl installations that aren't currently running.

AUTHOR
    Steffen Mueller, 

COPYRIGHT AND LICENSE
    Copyright (C) 2007 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.

	

Documentation

ExtUtils::InferConfig

Change Log

Revision history for Perl extension ExtUtils-InferConfig.

1.04  Sun Jul 25 11:26 2008
        - Fixed problem with last field (Alexandr Ciornii)

1.03  Sat Nov 22 17:48 2008
        - Always use IPC::Run...

1.02  Fri Nov 14 15:09 2008
        - Fix strange overzealous code escaping/quoting.

1.01  Sun Oct 26 18:12 2008
        - Fix tests on stupid OS which set $^X to 'perl'.

1.00  Thu Aug 30 14:59 2007
	- Add IPC::Cmd as a dependency.
        - Should now work as far back as perl 5.004.

0.01  Sat Jan 27 12:18 2007
	- original version

    

(c) 2002-2010 Steffen Müller; All rights reserved.

Valid HTML 4.0!