use ExtUtils::MakeMaker; my ( $config_file, $makefile ) = ask_config_questions(); write_config( %$config_file ); WriteMakefile( %$makefile ); sub ask_config_questions { my %config; print "What is your name? "; chomp( my $name = <> ); $config{'name'} = $name; # blah blah my %makefile = ('NAME' => 'foo::bar', 'VERSION_FROM' => 'bar.pm' ); # blah blah - ask more questions, modify %makefile... return \%config, \%makefile; } sub write_config { my %config = @_; open CONFIG, '/some/path/' or die "Can't write config $!\n"; print CONFIG "$_ = $config{$_}\n" for keys %config; close CONFIG }