diff --git a/application.conf.example b/application.conf.example new file mode 100644 index 0000000..641690a --- /dev/null +++ b/application.conf.example @@ -0,0 +1,3 @@ +{ + password => '', +} \ No newline at end of file diff --git a/fotostore.pl b/fotostore.pl index c14b51a..a125e81 100644 --- a/fotostore.pl +++ b/fotostore.pl @@ -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);