config file

This commit is contained in:
Denis Fedoseev 2017-07-19 13:49:54 +09:00
parent 51291f14f2
commit a337b473e3
2 changed files with 6 additions and 3 deletions

3
application.conf.example Normal file
View file

@ -0,0 +1,3 @@
{
password => '',
}

View file

@ -8,13 +8,13 @@ use File::Basename 'basename';
use File::Path 'mkpath';
use File::Spec 'catfile';
use Cwd;
use Getopt::Long;
use Imager;
my $config = plugin 'Config'=> {file => 'application.conf'};;
my $predefined_user = 'alpha6';
my $predefined_password = "";
GetOptions('password=s', \$predefined_password);
my $predefined_password = $config->{'password'};
die "No user password defined!" unless($predefined_password);