X-Git-Url: http://git.shiar.nl/sc2-widget/blobdiff_plain/82977cdaf6a7b9f8c11266424efb6f6e97cea4e7..7f3d75fcd1ed43c99397a99bda9c14f18b7e068c:/getsc2clan 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 )],