summaryrefslogtreecommitdiff
path: root/driver-async.pl
blob: a996aaf9e66b340dcc1274eafd1efc2bc3f25515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env perl 
use strict;
use warnings;
use 5.014;
use HomePanel::Driver;
use Path::Tiny;
use Config::Any;
 
my $cfg_set = Config::Any->load_files({
    files => \@ARGV,
    use_ext => 1,
});
 
my %config = map { %$_ } @$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'),
    forecast_key => $config{forecast_key},
});
 
$hp->start;
$hp->loop->run;