version 1.1, 2009/04/17 21:13:43
|
version 1.2, 2009/05/06 17:54:07
|
|
|
#!perl -- |
#!/usr/bin/perl -- |
| |
# generate config scripts rather than follow the instructions | # generate config scripts rather than follow the instructions |
# and have to look at all of variables to change around, | # and have to look at all of variables to change around, |
|
|
use strict; | use strict; |
use warnings; | use warnings; |
use Data::Dumper; | use Data::Dumper; |
|
use ExtUtils::MakeMaker; |
| |
#### | #### |
# before we go any further ... | # before we go any further ... |
Line 72 my @fields = qw ( |
|
Line 73 my @fields = qw ( |
|
SUMS_GROUP | SUMS_GROUP |
SUMS_USER | SUMS_USER |
DRMS | DRMS |
|
|
); | ); |
| |
| |
|
|
| |
my $EOL = $verbose > 2 ? '' : "\n" ; | my $EOL = $verbose > 2 ? '' : "\n" ; |
| |
use ExtUtils::MakeMaker; |
|
if ($noprompt) { $ENV{'PERL_MM_USE_DEFAULT'} = 1 }; | if ($noprompt) { $ENV{'PERL_MM_USE_DEFAULT'} = 1 }; |
| |
if ($verbose > 2) { print <<EOF; } | if ($verbose > 2) { print <<EOF; } |
Line 214 while ( @template_file ) { |
|
Line 213 while ( @template_file ) { |
|
} | } |
| |
| |
|
# are there any config options in the template that were NOT in the hard coded list? |
|
# if so, we'll need to prompt for them, too. |
|
|
|
my %known_fields = map { $_ => undef } @fields; |
|
my @unknown_fields = grep { ! exists $known_fields{$_} } keys %template_defaults; |
|
|
|
if (@unknown_fields) { |
|
warn "Unknown field in template : @unknown_fields $EOL" if $verbose; |
|
push @fields, @unknown_fields; |
|
} |
|
|
|
|
##### | ##### |
| |
| |