diff options
author | Gianni Ceccarelli <dakkar@thenautilus.net> | 2014-10-18 11:59:57 +0000 |
---|---|---|
committer | Gianni Ceccarelli <dakkar@thenautilus.net> | 2014-10-18 12:00:43 +0000 |
commit | c546aa25baf28aceeb0ce175c895910ec796bbe3 (patch) | |
tree | cc128374e2ab9cf7c8ce754fe79bcc18c6351f82 | |
parent | really fix init scripts (diff) | |
download | HomePanel-c546aa25baf28aceeb0ce175c895910ec796bbe3.tar.gz HomePanel-c546aa25baf28aceeb0ce175c895910ec796bbe3.tar.bz2 HomePanel-c546aa25baf28aceeb0ce175c895910ec796bbe3.zip |
fix config loading
-rwxr-xr-x[-rw-r--r--] | driver-async.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/driver-async.pl b/driver-async.pl index a996aaf..0d8e86a 100644..100755 --- a/driver-async.pl +++ b/driver-async.pl @@ -2,6 +2,7 @@ use strict; use warnings; use 5.014; +use lib 'lib'; use HomePanel::Driver; use Path::Tiny; use Config::Any; @@ -11,11 +12,11 @@ my $cfg_set = Config::Any->load_files({ use_ext => 1, }); -my %config = map { %$_ } @$cfg_set; +my %config = map { %{(values %$_)[0]} } @$cfg_set; my $hp = HomePanel::Driver->new({ - template_file => $config{template} || path(__FILE__)->parent->child('forecast.html.tt'), - output_file => $config{output_file} || path(__FILE__)->parent->child('forecast.html'), + template_file => ($config{template} || path(__FILE__)->parent->child('forecast.html.tt')), + output_file => ($config{output_file} || path(__FILE__)->parent->child('forecast.html')), forecast_key => $config{forecast_key}, }); |