Perl::Configure

Perl::Configure is a Perl module to answer Perl's ./Configure questions reproducibly.
Download

Perl::Configure Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Mike Schilli
  • Publisher web site:
  • http://search.cpan.org/~mschilli/X10-Home-0.03/Home.pm

Perl::Configure Tags


Perl::Configure Description

Perl::Configure is a Perl module to answer Perl's ./Configure questions reproducibly. Perl::Configure is a Perl module to answer Perl's ./Configure questions reproducibly.SYNOPSIS # Command line: $ perl-configure threads=y # Perl use Perl::Configure; my $configurator = Perl::Configure->new(); # Override certain default settings $configurator->define( "threads" => 'y', "perlio" => 'n', ); $configurator->run();Compling perl requires a number of configuration steps. Running ./Configure in a perl source distribution configures it for compilation on a given platform. It asks about a hundred questions and then creates a config.sh file, which will later be used to create a makefile.However, some answers cause several entries in config.sh to be modified. For example, if you say you want a threaded perl, Configure will modify 94 different values in config.sh.Perl::Configure to the rescue: It runs Configure, recognizes its questions, fills in preprogrammed answers and gives default answers otherwise. Perl::Configure is most useful for automatically reproducing perl builds with slight modifications.For example, to create a threaded perl with ithreads, use this: my $cfg = Perl::Configure->new(); $cfg->define( "threads" => 'y', "ithreads" => 'y', ); $cfg->run();This will go quickly through all the questions Configure throws at the user, press 'Enter' on pretty much all of them to accept the defaults, and will only answer 'y' to the questions Build a threading Perl?and Use the newer interpreter-based ithreads?which will then cause 94 variables to be set by Configure in config.sh. Modifying config.sh in this case would be a hopeless undertaking. While ./Configure will (almost) always generate a config.sh file that can be used later to build perl successfully, a hand-edited config.sh file is not guaranteed to work.Note that in most cases you can use Configure's command line options to accomplish the same thing: ./Configure -Dthreads=y -dHowever, this means you have to look at the Configure code and figure out which setting corresponds to the question.The mapping between a Perl::Configure token (like threads) and the corresponding question (like Build a threading Perl?) is defined in Perl::Configure::Questions. If Perl::Configure::Questions doesn't define a pattern to recognize a question Configure asks, the run() method will hang and time out after 60 seconds. If you see this, please send the question to the module maintainer (see below) to have it added to the existing collection and the next release of Perl::Configure. Requirements: · Perl


Perl::Configure Related Software