summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver-async.pl15
1 files changed, 10 insertions, 5 deletions
diff --git a/driver-async.pl b/driver-async.pl
index 19b6c21..a996aaf 100644
--- a/driver-async.pl
+++ b/driver-async.pl
@@ -4,14 +4,19 @@ use warnings;
use 5.014;
use HomePanel::Driver;
use Path::Tiny;
+use Config::Any;
-my $template =
-my $key=$ARGV[0];
+my $cfg_set = Config::Any->load_files({
+ files => \@ARGV,
+ use_ext => 1,
+});
+
+my %config = map { %$_ } @$cfg_set;
my $hp = HomePanel::Driver->new({
- template_file => path(__FILE__)->parent->child('forecast.html.tt'),
- output_file => path(__FILE__)->parent->child('panel.html'),
- forecast_key => $ARGV[0],
+ 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},
});
$hp->start;