commit 5685253f2f79095fccd3bbf215209fcd57c97e54 from: mischa date: Wed Jul 20 14:56:43 2022 UTC proper formatting of variable, added -> commit - 6be47f65362ce3b2302f25bea98de7efbc25f12b commit + 5685253f2f79095fccd3bbf215209fcd57c97e54 blob - 805e8cb097091f3003e77bfa4971c865144ce78d blob + fb9b0b95b9753d651d0b992372b932f187ff34f3 --- pushover.pl +++ pushover.pl @@ -40,8 +40,8 @@ END_USAGE $MESSAGE || die($USAGE); my @config_files = grep { -e } ('./_pushover.conf', './.pushover.conf', './pushover.conf', "$ENV{'HOME'}/_pushover.conf", "$ENV{'HOME'}/.pushover.conf", "$ENV{'HOME'}/pushover.conf"); my $config = Config::Tiny->read($config_files[-1], 'utf8'); -my $TOKEN = $config->{_}{token} || die("$USAGE\nError: TOKEN not found.\n"); -my $USER = $config->{_}{user} || die("$USAGE\nError: USER not found.\n"); +my $TOKEN = $config->{_}->{token} || die("$USAGE\nError: TOKEN not found.\n"); +my $USER = $config->{_}->{user} || die("$USAGE\nError: USER not found.\n"); my $http = HTTP::Tiny->new; my %HEADERS = ("Content-Type" => "application/json");