From 10f5d826fe537c83902e44108ab7a7903e4d8d79 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 6 Jun 2019 18:44:03 +0200 Subject: [PATCH] improve error messages of failed password include --- getsc2clan | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/getsc2clan b/getsc2clan index c373051..1fbdd02 100755 --- a/getsc2clan +++ b/getsc2clan @@ -20,7 +20,9 @@ my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches || []}; sub blizget { state $bliz = do { - my %auth = do './.blizzard.passwd.pl' or die "no auth setup: $!\n"; + my @authdata = do './.blizzard.passwd.pl' and not $@ || $! + or die "No auth setup: ", $@ || $!, "\n"; + my %auth = @authdata; my $bliz = LWP::Authen::OAuth2->new(%auth, token_endpoint => 'https://eu.battle.net/oauth/token', request_required_params => [qw( client_id client_secret grant_type )], -- 2.30.0