I changed the settings.pl to use regular key names instead of variables. If I want to interpret a file as perl code, I generally use an eval this way:
$ cat settings.pl
%default_settings = (
verbose => 1,
debug => 0,
help => 0,
game => "etqw"
);
$ cat app.pl
#!/usr/bin/perl -w
my $settings_file = "./settings.pl";
use strict;
my %default_settings = ();
open SETTINGS,$settings_file or die "cannot open $settings_file";
my @data = <SETTINGS>;
eval "@data";
close SETTINGS;
my %settings = %default_settings;
print $_,'->',$settings{$_},"\n" foreach (keys %settings);
$ ./app.pl
verbose->1
game->etqw
debug->0
help->0
This allows me to not 'require' anything at startup but rather gives me the flexibility to do what I need if I need it.
"The three principal virtues of a programmer are Laziness, Impatience, and Hubris. See the Camel Book for why." -- `man perl`