NAME

Perl::Configure::Questions - Questions asked by perl's Configure

SYNOPSIS

use Perl::Configure::Questions;

my $q = Perl::Configure::Questions->new();

    # Add a new (customized) token/question
$q->add($token, $question, $answer)

    # These are used by Perl::Configure internally
my @questions = $q->questions();
my @patterns  = $q->patterns();
my @tokens    = $q->tokens();
my $by_key    = $q->by_key();

DESCRIPTION

questions() returns a list of questions asked by perl's Configure. patterns() just runs a quotemeta() on the strings returned by @questions. This module is used internally by Perl::Configure.

Question Format

The questions recognized by Perl::Configure are stored in YAML format in the __DATA__ section of Perl::Configure::Questions:

...
---
- vendor-specific-prefix
- Installation prefix to use for vendor-supplied add-ons?
- '/foobar'
---
...

The first line in each tuple (separated by --- according to YAML rules) holds the token, vendor-specific-prefix in the example above. The second line shows the question regular expression and the third line a yet unused 'sample answer'.

Note that regex metacharacters in the question line are not escaped. Instead, if a part of the question should match any text, use the ANY{...} clause:

...
---
- compiler-flags-special
- Any special flags to pass to ANY{cc -c} to compile shared library modules?
- '-fpic'
---
...

This will cause the question matcher to accept any text instead of cc -c, which comes in handy if Configure dynamically replaces these parts based on previous selections.

AUTHOR

Mike Schilli, m@perlmeister.com, 2006

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Mike Schilli

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.