#!/usr/bin/perl
###########################################
use strict;
use warnings;
use Pod::Usage;
use Perl::Configure;
use Getopt::Std;

getopts("h", \my %opts);

if($opts{h}) {
    pod2usage("");
}

my $cfg = Perl::Configure->new();
my @keyvalues = ();
for my $arg (@ARGV) {
    my($token, $value) = split /=/, $arg, 2;
    push @keyvalues, $token, $value;
    pod2usage("Invalid argument: $arg") unless defined $value;
}
$cfg->define(@keyvalues);
$cfg->run();

__END__

=head1 NAME

    perl-configure - Answer perl's Configure questions automatically

=head1 SYNOPSIS

    cd perl-x.y.z
    perl-configure token=value token=value ...

=head1 OPTIONS

=over 8

=item B<-h>

Prints this manual page in text format.

=back

=head1 DESCRIPTION

perl-configure blah blah blah.

=head1 EXAMPLES

  $ perl-configure -x foo bar

=head1 LEGALESE

Copyright 2006 by Mike Schilli, all rights reserved.
This program is free software, you can redistribute it and/or
modify it under the same terms as Perl itself.

=head1 AUTHOR

2006, Mike Schilli <cpan@perlmeister.com>
